I asked a question in this link;
Streaming music background
function music(){
$txt = '<object type="application/x-shockwave-flash"
data="http://***.com/slim.swf?&autoplay=true&repeat=true&shuffle=true&song_url=http: //***.com/music.mp3&"
width="200" height="20">
<param name="movie"
value="http://***.com/slim.swf?&autoplay=true&repeat=true&shuffle=true& song_url=http://***.com/music.mp3&" />
<img src="noflash.gif"
width="0" height="0" alt="" />
</object>';
echo $txt;
}
I have added this player with a simple php fonction. The player is working perfect but when page changes, the music restarts. I want that I will be continued.
What is wrong in code?
Update: Ah, so you are in fact using a player with an autoresume function. Well, then turn on the autoresume, will ya?
By default, autoresume is off. To turn it on, you need to add &autoresume=1 to the end of the player URL, as shown here: [...]
Old answer:
I'm afraid I think you got this wrong. The answerer in the other question was talking about creating a whole site in Flash, something that would enable you to have continuous background music.
It's not easy to get continuous music on a HTML page. Check out this question for some pointers.
Related
I have a dating site project and I need to provide to customers possibility to upload embed code with pleer from 3rd part services like:
https://soundcloud.com/
http://joxi.ru/EA4zBRLsDloDzm
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/239151794&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
http://pleer.com/
http://joxi.ru/L21zEK6s6kR8RA
<object width="578" height="31"><param name="movie" value="http://embed.pleer.com/small/track?id=B2nq55Bgri8xfBumq&t=grey"></param><embed src="http://embed.pleer.com/small/track?id=B2nq55Bgri8xfBumq&t=grey" type="application/x-shockwave-flash" width="578" height="31"></embed></object><br> <small>Cкачать Linkin Park - Numb бесплатно на pleer.com</small>
e.t.c.
So any customer should be able to add embed pleer code from any(or most) 3rd part sound services. Now question - how can I create it secure way?
Or maybe someone can provide solution with validation for most popular services?
So customer fill some code and I need some way to validate is it real sound and is this code protected from injections.
Thanks!
I have a problem where my Modal Box pops up behind my Quick Time Movie when you click on the Magnifying Glass button to search.
http://www.vaal-used-cars.co.za
I came across someone who had the same type of problem but with FLV video and I went and did what the person who replied to him said he must do which was the following.
param name="wmode" value="transparent"
This is how I've put it into my code...
<th width="86%" scope="col"><embed src="images/vaalusedcars.mpg" width="480" height="290" volume="50" param name="wmode" value="transparent" autoplay="false"></embed></th>
I've uploaded the page again refreshed but it's still popping up behind the Movie.
Any help on how to get this fixed please ??
Thanx
Jolene
Try to add the wmode attribute:
<embed src="images/vaalusedcars.mpg" width="480" height="290" volume="50" wmode="opaque" autoplay="false"/>
The parameter you mentioned is used together with the <object> tag:
<object>
<param name="wmode" value="transparent">
</object>
You might think about using a flash player (like JWPlayer) instead as Flash it is installed on most clients. I only know a few people willing to install Quicktime Player.
So right now I can grab the url from already embedded soundcloud files in embed or iframe tags and use those urls on another page and display it in fancybox. Is there a way to get the right url or display in fancybox if a user offers a typical share url such as http://soundcloud.com/song-b/song-please or http://snd.sc/yp6VMo? I tried looking at the api documentation but I couldn't really find what I was looking for.
He is trying to get html to create a Soundcloud widget, not get the API url for a track. The oEmbed method "will serve the widget embed code for any SoundCloud URL pointing to a user, group, set or a playlist" and is recommended to make sure Soundclouds changes don't break your app (as opposed making your own Flash object or iframe). You can call it with a PHP web request to
http://soundcloud.com/oembed?format=js&url=[escaped_url]&iframe=true
Or with a JSON-P call (using jQuery for convenience)
$.getJSON('http://soundcloud.com/oembed?callback=?',
{format: 'js', url: 'http://snd.sc/yp6VMo', iframe: true},
function(data) {
// Stick the html content returned in the object into the page
$('#your_player_div').html(data['html'])
}
)
I'm adding iframe=true so you get the new HTML5 player, omit to get the old Flash object. It also works with the .sc short urls you are using.
you can try this for song url not for the id of song url
<iframe width="100%" height="166" scrolling="no" frameborder="no"src="http://w.soundcloud.com/player/?url=http://api.soundcloud.com/elissafranceschi/war&auto_play=false&color=915f33&theme_color=00FF00"></iframe>
I'm not exactly sure what you're asking here, but it sounds like you might need the "resolve" API endpoint. http://developers.soundcloud.com/docs/api/resolve
Example:
$ curl -v 'http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/matas/hobnotropic&client_id=YOUR_CLIENT_ID'
HTTP/1.1 302 Moved Temporarily
Location: http://api.soundcloud.com/tracks/49931.json
This will give you all the track information and that should be enough for whatever you need to do. Also don't forget that there's the HTML5 widget too.
I haven't tried this, modified code from here:
<object height="81" width="100%">
<param name="movie" value="http://player.soundcloud.com/player.swf?url=<?php echo $url; ?>&g=bb"></param>
<param name="allowscriptaccess" value="always"></param>
<embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=<?php echo $url; ?>&g=bb" type="application/x-shockwave-flash" width="100%"></embed>
</object>
<?php echo $url; ?>
I have 100 training, lecture, guide video files which has size 30MB to 1GB each of them. And they are all .mp4/mpg format. There is no web player i have found to play it in the inline html.
So this is what i am doing now let them download it. But i am looking for a way how to play those files using a web based media player so that the quality is not drop and it looks like same page without target="_blank", but with iframe?
Current code is like this:
<a href="/1/720p.mpg" target="_blank">
<img src="/img/icon/playivr.png" style="border:0px;">
</a>
<a href="/1/1080p.mpg" target="_blank">
<img src="/img/icon/playivr.png" style="border:0px;">
</a>
You could try use object tag for that:
<object data="data/test.mpg" type="video/mpeg" width="320" height="255">
<param name="src" value="data/test.mpg">
<param name="autoplay" value="false">
<param name="autoStart" value="0">
alt : test.mpg
</object>
But this will work only if user have a plugin.
The better way would be to convert videos to flv format using ffmpeg for example and play using some flash-based player. It's better since flash in installed on about 99% of computers.
Google chrome latest version supports HTML 5 tag "VIDEO"
<video width="1024" height="768" controls="controls">
<source src="file:HaveFun.mp4" type="video/mp4" />
</video>
Latest firefox browser supports the "video" tag but is unable to play mp4 files.
you can convert them to swf and run them as a flash or upload them to youtube then do the embedding thing. or be creative and use FLASH software and do your own player.
there is this Quick time thing but its isn't nice at all
I'm trying to create an audio captcha system for the visually impaired. I have a system that will glue several wave files together, but I'm having trouble embedding them in ie and firefox.
<script type="text/javascript">
function EvalSound(soundobj)
{
var thissound=document.getElementById(soundobj);
thissound.Play();
}
</script>
<embed src="createaudiocaptcha.php?x=46765" autostart="false" width="0" height="0" id="sound1" enablejavascript="true">
<img src="gfx/speaker.gif" border="0" alt="Audio capture for visually impaired">
using this works, however ie (vista) will just play the sound straight away, it should wait until the speaker has been clicked. IE on win xp seems to lock up for some reason.
I have tried changing the embed for this:
<object type="application/x-mplayer2" height="0" width="0" id="sound1">
<param name="src" value="createaudiocaptcha.php?x=19329">
<param name="autostart" value="0">
<param name="playcount" value="1">
</object>
however ie on winxp still sems to lock up - ie on vista plays the sound straight away and firefox will not play it saying no play() function.
does anybody know why ie on windows xp would lock up? -
Suggestion appreciated
There's an audio service that essentially does this exact thing called ReCaptcha (http://recaptcha.net/).
You can read a review of the service on ReadWriteWeb if you would like to know more about it.
Google also offers an audio captcha. There's an article on the official Google blog here.
I am doing the SAME thing as you with the SAME script. My IE begged me to install the plugin for Media Player. Once I clicked the ActiveX bar at the top if IE to install it... no more locking up. Check your Security Options in IE and/or update Java to the latest and greatest. For what it's worth... I did get mine working on IE and FF with 5 different sounds once the plugin was installed. Oh... and I put around the lines.... one in front and the /object at the end. Maybe that will help you??!?
Scriptaculos has a pretty good Sound library. You can play and stop with it; it should fulfill your needs.
Why not only embed the audio file as needed. Write the embed/object tag out with JavaScript only when someone has clicked "I need the audio captcha"
put some tags on the page like:
Please play the audio Captcha<br />
<div id="audioCaptcha">
</div>
Then the getMeTheAudio() function fills in the innerHTML of the audioCaptcha div with the embed/object. You could sniff the browser type if you want to be fancy.
You will find multiple possible options in the link below ,
http://www.phon.ucl.ac.uk/home/mark/audio/play.htm#