update Window media player Param
I added a WMP to my page as follow:
<object id="mPlayer" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject">
<embed name="mPlayer" pluginspage="http://www.microsoft.com/Windows/MediaPlayer" />
</object>
with IE in page ready event i check the $('#mPlayer').html();
and it has generated all default param for IE such as:
<PARAM NAME="URL" VALUE="">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
----- etc
I would like to add a value for the URL PARAM. if i add a new PARAM it does n开发者_JAVA百科ot change the default value. I tried to get $('PARAM','#mPlayer'), but it returns 0 item. Any help would be greatly appreciated.
Im doing this:
In the first place, this works for IE only; Im running version 8 but I think it can work for earlier versions
I do insert the whole object, without the "embed":
<object id='PlayerCorte' width='320' height='320' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-oleobject' standby='Loading Media Player'> <PARAM NAME='url' VALUE=''> <param name='AutoStart' value='true'> <param name='ShowControls' value='true'> <param name='ShowStatusBar' value='true'> <param name='DisplaySize' value='4'> <param name='ShowStatusBar' value='true'> <param name='DisplaySize' value='4'> <param name='SendPlayStateChangeEvents' VALUE='true'> <param name='stretchToFit' value='true'> <PARAM name='uiMode' value='full'> <PARAM name='PlayCount' value='1'> <PARAM NAME='AutoRewind' VALUE='0'> </object>;
Then, run the page, and the user actions produces a valid URL for a media file, something that if you put in the address bar plays the media file. Lets say you store it in the variable newMediaFile. Until now, we have accomplished nothing of your request.
Here is the magik:
myPlayer = document.getElementByID('PlayerCorte'); myPlayer.url = newMediaFile;
As you can see, I have used NO jQuery. I think it can work with jQuery, but I have not tested it. Hope this helps someone, its my first-ever answer in Stack O.
精彩评论