100分求 嵌入的WMP播放器如何控制???!!!!!!
我在页面中嵌入一个Windows的WMP播放器(就是VS自带的那个插件)
在页面上还有几个按钮,我想在点击不同按钮时让播放器播放不同的WAV文件,请问如何实现?
[解决办法]
asp.net中?
那么只需要用js修改地址即可
<object classid= "clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 " width= "600 " height= "475 " align= "middle "
id= "MediaPlayer1 " style= "border-left:#666666 " VIEWASTEXT>
<param name= "filename " value= "1.wav ">
<param name= "AutoStart " value= "-1 ">
<param name= "Enabled " value= "1 ">
<param name= "ShowControls " value= "-1 ">
<param name= "ShowGotoBar " value= "0 ">
<param name= "ShowStatusBar " value= "-1 ">
<param name= "EnableFullScreenControls " value= "-1 ">
<param name= "loop " value= "0 ">
<param name= "EnablePositionControls\ " value= "-1 ">
<param name= "Volume " value= "-1 ">
<param name= "DisplaySize " value= "-1 ">
<param name= "DisplayMode " value= "-1 ">
<param name= "AllowChangeDisplaySize " value= "-1 ">
</object>
比如你有链接a b c
<a href= "void(0); " onclick= "javascript: document.getElementById( 'MediaPlayer1 ').filename= '1.wav ' "> a </a>
[解决办法]
最简单的办法 在工具箱添加Media Player播放器~~~在添加删除选项里 选COM组件 找到了直接用就可以了 楼上面的代码就自动生成了~~~省事:)不过那样别人是可以盗连的`~~~~最好用flash做播放器然后用 别人下不了 现在在线看东西都这样做
[解决办法]
注意classid
<object id= "MediaPlayer1 " width= "600px " height= "200px " classid= "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 "
codebase= "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 "
align= "baseline " border= "0 " standby= "Loading Microsoft Windows Media Player components... "
type= "application/x-oleobject ">
<param name= "AutoStart " value= "0 ">
</object>
<input type=button value= "开始 " onclick= "MediaPlayer1.URL= 'http://dotnet.aspx.cc/Play.asx ';MediaPlayer1.controls.play(); ">
通过 代码改变 URL即可
[解决办法]
http://www.aboutplayer.com/bbs/?action=View_topics&id=551