Forum Moderators: open
It works for users of the Internet Explorer browser but not for Netscape users. Could someone give me the code?
This is the code for the embedded player, which DOES incorporate the EMBED command.
<object id="mediaplayer"
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="286" height="310"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="Filename" value="video1.wmv">
<param name="AnimationAtStart" value="-1">
<param name="AutoStart" value="-1">
<param name="ShowControls" value="-1">
<param name="TransparentAtStart" value="0">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"SRC="video1.wmv"
name="mediaplayer"
AutoStart="true"
HEIGHT="285" WIDTH="320"
</embed>
</OBJECT>
When the above web page runs, it DOES play the default video ['video1.wmv'] in both IE and Netscape. The below code for changing the video succeeds in playing a new video ['video2.wmv'] for IE users, but it doesn't change the video in Netscape.
Here is my code for changing the video:-
<a href="#"
onClick="window.document.mediaplayer.FileName='video2.wmv';return false">Video2</a>
I can see I need another line of code that references the EMBED SRC for Netscape users, but everything I try fails to work. It isn't:
window.document.mediaplayer.src='video2.wmv' OR
window.document.embed.mediplayer.src='video2.wmv'
Help?