利用JAVASCRIPT控制MEDIA PLAYER的功能实现_网页播放器教程-查字典教程网
利用JAVASCRIPT控制MEDIA PLAYER的功能实现
利用JAVASCRIPT控制MEDIA PLAYER的功能实现
发布时间:2016-12-29 来源:查字典编辑
摘要:varvolv=phx.settings.volume;setInterval("if(phx.playState==3){time.inn...

<scriptlanguage=javascriptdefer>

varvolv=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);

functionvolup(){

if(volv<100){

volv+=5;

phx.settings.volume=volv;

time.innerText=volv;}

else{time.innerText='最大';}

}

functionvoldown(){

if(volv>0){

volv-=5;

phx.settings.volume=volv;

time.innerText=volv;}

else{time.innerText='最小';}

}

</script>

<p>

<objectclassid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"id="phx"width="245"height="240">

<paramname="URL"value="http://www.wfzx.net/wf-phx/music/she_superstar.wmv">

<paramname="rate"value="1">

<paramname="balance"value="0">

<paramname="currentPosition"value="0">

<paramname="defaultFrame"value>

<paramname="playCount"value="1">

<paramname="autoStart"value="-1">

<paramname="currentMarker"value="0">

<paramname="invokeURLs"value="-1">

<paramname="baseURL"value>

<paramname="volume"value="50">

<paramname="mute"value="0">

<paramname="uiMode"value="full">

<paramname="stretchToFit"value="0">

<paramname="windowlessVideo"value="0">

<paramname="enabled"value="-1">

<paramname="enableContextMenu"value="-1">

<paramname="fullScreen"value="0">

<paramname="SAMIStyle"value>

<paramname="SAMILang"value>

<paramname="SAMIFilename"value>

<paramname="captioningID"value>

<paramname="enableErrorDialogs"value="0">

<paramname="_cx"value="6482">

<paramname="_cy"value="6350">

</object>

</p>

<inputtype=buttonvalue=muteonclick=phx.settings.mute=phx.settings.mute==true?false:true;time.innerText=phx.settings.mute==true?'静音':'关闭静音';>

<inputtype=buttonvalue=playonclick=phx.controls.play();time.innerText='播放';>

<inputtype=buttonvalue=pauseonclick=phx.controls.pause();time.innerText='暂停';>

<inputtype=buttonvalue=stoponclick=phx.controls.stop();time.innerText='停止';>

<inputtype=buttonvalue=modeonclick=phx.settings.balance=phx.settings.balance=='100'?'-100':'100';time.innerText=phx.settings.balance=='100'?'右声道':'左声道';>

<inputtype=buttonvalue=vol++onclick=volup();>

<inputtype=buttonvalue=vol--onclick=voldown();>

<inputtype=buttonvalue=fullscreenonclick="if(phx.playState==3)phx.fullscreen=1;">

<br>

<divid="time">正在加载媒体。。。</div>

<tableid=bar>

<tr>

<tdid=itcnbgcolor=#f70968></td>

<tdid=bar2></td>

</tr>

</table>

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新网页播放器学习
    热门网页播放器学习
    编程开发子分类