Click to See Complete Forum and Search --> : Help in Javascript
Jin Liying
May 1st, 2002, 09:08 PM
Hi,
I want to embed windows media player in my web page, how can I write the code in javascript?
Thanks every body can help me!
susad
May 3rd, 2002, 05:35 AM
You could embed the MP with the object-tag like this:
<OBJECT ID="MyMediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE= "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="210" height="23" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<PARAM NAME="FileName" VALUE="http://antenne.unit.net/project/stream-wmt-spot.cfm?preStream=0&stream=192&spot=0">
<PARAM NAME="TransparentAtStart" Value="true">
<PARAM NAME="AutoStart" Value="true">
<PARAM NAME="AnimationatStart" Value="true">
<PARAM NAME="ShowStatusBar" Value="true">
<PARAM NAME="ShowControls" Value="false">
<PARAM NAME="autoSize" Value="true">
<PARAM NAME="displaySize" Value="false">
<PARAM NAME="ShowAudioControls" Value="false">
<PARAM NAME="ShowPositionControls" Value="false">
</OBJECT>
And with JavaScript you can control this object like this:
document.MyMediaPlayer.Play();
document.MyMediaPlayer.Stop();
Hope that helps,
susad
anupam kant
May 9th, 2002, 07:44 AM
works fine in IE, but what about Netscape Browser?
How can I EMBED (and not popped up player) Media player in NS browser.
I am using <embed> tag but it pops up player itself, and I lost control over it.
Please Help.
Anupam.
PI Softek Ltd. India
susad
May 16th, 2002, 02:02 PM
The problem is, that the NS browser isn't able to implement ActiveX-Objects. :(
greets
susad
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.