View Full Version : HELP!!!<EMBED ...> Question
tcmleung
08-15-2002, 08:24 AM
I use <EMBED> to add music on the website:
<EMBED id='embMusic' src='best/0.mid' ></EMBED>
I want that after the song is finished, another song would play.
So how can I use javascript to check whether the song is still playing or already finished? Please help!!!
:confused:
Thank you
beetle
08-15-2002, 08:55 AM
Uh, I don't know of any unique properties that are exposed to the DOM for midi files via EMBED
I you know how long the song(s) are/is, then you could use setTimeout()
tcmleung
08-15-2002, 04:27 PM
Thanks for thinking the solution.
Yet, I found the solution.
To solve this question, you have to know all the properties and attribute in embed.
You can use the script
for (variable in document.all.embedName) {
alert(variable+" -->" + document.all.embedName[variable]);
}
I used the above script to find the properties in the embed tag and finally found the following useful properties.
1. CurrentPosition
The song/video's current position
2. Duration
The song/video's duration.
:thumbsup: :)
beetle
08-15-2002, 04:32 PM
Cool! thanks for the info!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.