更新 Windows 媒体播放器参数
我在页面中添加了一个 WMP,如下所示:
<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>
在 IE 处于页面就绪事件时,我检查 $('#mPlayer').html();
并且它已为 IE 生成所有默认参数,例如:
<PARAM NAME="URL" VALUE="">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
----- etc
我想为 URL PARAM 添加一个值。如果我添加新的 PARAM,它不会更改默认值。我尝试获取 $('PARAM','#mPlayer'),但它返回 0 项。任何帮助将不胜感激。
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 not change the default value. I tried to get $('PARAM','#mPlayer'), but it returns 0 item. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在这样做:
首先,这仅适用于 IE;我正在运行版本 8,但我认为它可以适用于早期版本
我确实插入了整个对象,没有“嵌入”:
然后,运行页面,用户操作会生成媒体文件的有效 URL,如果您将其放入地址栏播放媒体文件。假设您将其存储在变量 newMediaFile 中。到目前为止,我们还没有完成您的请求。
这是魔法:
如你所见,我没有使用 jQuery。我认为它可以与 jQuery 一起使用,但我还没有测试过。希望这对某人有帮助,这是我在 Stack O 中的第一个答案。
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":
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:
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.