简体   繁体   English

阻止嵌入式Windows Media Player循环播放?

[英]Stop embedded Windows Media Player from looping?

I've got an embedded Windows Media player in an HTML page, and when the audio gets to the end, it just starts again from the beginning. 我在HTML页面中有一个嵌入式Windows Media Player,当音频结束时,它只是从头开始。

According to the documentation, there's an autorewind parameter/attribute and also a loop . 根据文档,其中有一个autorewind参数/属性以及一个loop

The problem is, I've set both of those to false (and/or zero) and it doesn't seem to make any difference. 问题是,我都将它们都设置为false (和/或零),而且似乎没有什么区别。

Might this be a bug? 可能是个错误吗? My client is WMP 10.00.00.4058. 我的客户是WMP 10.00.00.4058。 Maybe there's some kind of setting on the server which tells files to loop, is that a crazy idea? 服务器上可能有某种设置告诉文件循环,这是一个疯狂的主意吗?

WTH! WTH! param name=PlayCount value=1 参数名称= PlayCount值= 1

The issue, i believe, lies within your different embedding methods between the different browsers. 我认为,问题出在不同浏览器之间的不同嵌入方法之内。 Here's is some tested code where looping does not happen. 这是一些经过测试的代码,其中不会发生循环。

IE IE

<object id="contentPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="300" height="60"><!-- <param name='fileName' value=''> -->
<param name='animationatStart' value='false'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value='true'>
<param name='playState' VALUE='1'>
<param name='loop' value='false'>
</OBJECT>

Firefox 火狐

<object id="contentPlayer" name='contentPlayer' type="application/x-ms-wmp" data="" width="300" height="60"><!-- <param name='fileName' value=''> -->
<param name='animationatStart' value='false'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value='true'>
<param name='playState' VALUE='1'>
<param name='loop' value='false'>
</OBJECT>

The primary difference being that in IE I have a classid but in Firefox I have a "type" classification 主要区别在于,在IE中我有一个classid,但在Firefox中我有一个“类型”分类

compare your html code with this: 比较您的html代码与此:

stolen from http://www.programmingforums.org/post147977.html http://www.programmingforums.org/post147977.html被盗

 <object width="320" height="290" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1"> <param name="Filename" value="kids.mpg"> <param name="AutoStart" value="True"> <param name="ShowControls" value="True"> <param name="ShowStatusBar" value="False"> <param name="ShowDisplay" value="False"> <param name="AutoRewind" value="True"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="320" height="290" src="/support/dreamweaver/ts/documents/kids.mpg" filename="kids.mpg" autostart="True" showcontrols="True" showstatusbar="False" showdisplay="False" autorewind="True"> </embed> </object> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM