,如果你要嵌入的WMP,你可以通过JavaScript使用所有控件这是相当简单的。有一个伟大的MSDN部分,但我似乎无法找到它。
编辑:我发现在MSDN上的this它包含嵌入的WMP将接受的属性,那么你所要做的就是通过javascript调用方法。
<OBJECT id="VIDEO" width="320" height="240"
style="position:absolute; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<PARAM NAME="URL" VALUE="your file or url">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>
那么对于JavaScript的
<script type="javascript">
obj = document.getElementById("VIDEO"); //Where video is the id of the object above.
obj.URL="filename"; //You can use this to both start and change the current file.
obj.controls.stop(); //Will stop
obj.controls.Pause(); //Pause
</script>
某处在这里我有一些代码,甚至控制音量。
前一段时间,我为纯粹使用HTML和JavaScript的客户端构建了一个自定义(外观)播放器。