Jump to content

Archived

This topic is now archived and is closed to further replies.

zhahaman2001

go to new page on when song is done....?

Recommended Posts

ok i have a page that has a song on it

[code]
<embed volume=100 src=song1.mp3 width=300 height=45 autostart=true loop=FALSE></embed>
[/code]

and i want it so when the song is done playing (it got to the end) that it loads a new page (in the same window) ......so this page is song.php and when the song is done i want it to go to song.php?songdone=true how would i do that ?

Share this post


Link to post
Share on other sites
my best suggestion is that you open the song in a player, find out EXACTLY how many seconds long it is, then use a window.location = song.php function to redirect the page, and set the body to onload=setTimeOut(xxxx('redirect()'), xxxx being the time(in milliseconds) of the song. This is done using javascript, btw

Share this post


Link to post
Share on other sites
It's possible that the EMBED tag (which, btw, should be OBJECT) has methods than can be queried, or handlers that can be added.

Share this post


Link to post
Share on other sites
well, with my method, you could make a javascript counter or something that counts down or up until the end of the song, when the user presses the 'pause' button, have the counter stop also. once the counter hits a certain number(the end of the song), have it go to the new page.

By the way, if you wanna find out the song exact song length, just convert the file type of the song to .WAV, and open it up in the sound recorder program.

Share this post


Link to post
Share on other sites
Timeouts won't be useful, since there's loading time you can't account for, plus other delays... I'm assuming there are onload / onfinish or related methods.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.