当前位置: 代码网 > it编程>网页制作>网页播放器 > 利用JAVASCRIPT控制MEDIA PLAYER的功能实现

利用JAVASCRIPT控制MEDIA PLAYER的功能实现

2024年05月15日 网页播放器 我要评论
<scriptlanguage=javascriptdefer> varvolv=phx.settings.volume; setinterval("if(phx.playstate==3
<script language=javascript defer>
var volv=phx.settings.volume;
setinterval("if(phx.playstate==3){time.innertext=phx.controls.currentpositionstring+\'|\'+
phx.currentmedia.durationstring}",1000);
setinterval("if(phx.playstate==3){itcn.style.width=parseint(245*(phx.controls.currentposition/phx.currentmedia.duration))}",1000);
function volup(){
if (volv<100){
volv+=5;
phx.settings.volume=volv;
time.innertext=volv;}
else{time.innertext=\'最大\';}
}
function voldown(){
if (volv>0){
volv-=5;
phx.settings.volume=volv;
time.innertext=volv;}
else{time.innertext=\'最小\';}
}
</script>
<p> 
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" id="phx" width="245" height="240">
<param name="url" value="http://www.wfzx.net/wf-phx/music/she_superstar.wmv">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentposition" value="0">
<param name="defaultframe" value>
<param name="playcount" value="1">
<param name="autostart" value="-1">
<param name="currentmarker" value="0">
<param name="invokeurls" value="-1">
<param name="baseurl" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uimode" value="full">
<param name="stretchtofit" value="0">
<param name="windowlessvideo" value="0">
<param name="enabled" value="-1">
<param name="enablecontextmenu" value="-1">
<param name="fullscreen" value="0">
<param name="samistyle" value>
<param name="samilang" value>
<param name="samifilename" value>
<param name="captioningid" value>
<param name="enableerrordialogs" value="0">
<param name="_cx" value="6482">
<param name="_cy" value="6350">
</object>
</p>
<input type=button value=mute onclick=phx.settings.mute=phx.settings.mute==true?false:true;time.innertext=phx.settings.mute==true?\'静音\':\'关闭静音\';>
<input type=button value=play onclick=phx.controls.play();time.innertext=\'播放\';>
<input type=button value=pause onclick=phx.controls.pause();time.innertext=\'暂停\';>
<input type=button value=stop onclick=phx.controls.stop();time.innertext=\'停止\';>
<input type=button value=mode onclick=phx.settings.balance=phx.settings.balance==\'100\'?\'-100\':\'100\';time.innertext=phx.settings.balance==\'100\'?\'右声道\':\'左声道\';>
<input type=button value=vol++ onclick=volup();>
<input type=button value=vol-- onclick=voldown();>
<input type=button value=fullscreen onclick="if(phx.playstate==3)phx.fullscreen=1;">
<br>
<div id="time" style="background:#f2f3f7;width:245">正在加载媒体。。。</div>
<table id=bar style="width:245;height:10px;border:1px black solid;">
<tr> 
<td id=itcn bgcolor=#f70968 style="width:0"></td>
<td id=bar2 style="width:245"></td>
</tr>
</table>
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com