Forum Moderators: open

Message Too Old, No Replies

Embedded Video For Netscape Users

         

leonhawthorne

2:41 pm on Dec 30, 2002 (gmt 0)



Could someone help me? I am designing a web page with an embedded Windows Media Player. The user is given a list of several video titles. When one title is clicked, it triggers that video to play in the embedded player.

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?

tedster

4:55 am on Dec 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, leonhawthorne.

It may just be a typo in your post -- but if you did a copy/paste, this bit could make trouble. Look at the opening of the <embed> tag - there's no > to finish it off. So, there IS no embed tag here, in reality.