📄 windowsmediaplayercontrol.js
字号:
function playWindowsMediaPlayerFileMusic(filePath){
WindowsMediaPlayerPlus.URL=filePath;
updateEvent=setInterval('updateWMPInfo()',500);
}
function clearWindowsMediaPlayerEvent(){
clearTimeout(updateEvent);
WindowsMediaPlayerPlus.controls.stop();
}
function updateWMPInfo(){
var position=WindowsMediaPlayerPlus.controls.currentPositionString;
var duration=WindowsMediaPlayerPlus.currentMedia.durationString;
window.document.S2Player.SetVariable("WindowsMediaPlayerSound.position",WindowsMediaPlayerPlus.controls.currentPosition);
window.document.S2Player.SetVariable("WindowsMediaPlayerSound.duration",WindowsMediaPlayerPlus.currentMedia.duration);
}
function WMPGoWhere(po){
WindowsMediaPlayerPlus.controls.currentPosition=po*WindowsMediaPlayerPlus.currentMedia.duration;
}
function setWindowsMediaPlayerVolume(volumeNum){
WindowsMediaPlayerPlus.settings.volume=volumeNum;
}
function WMPRePlay(){
WindowsMediaPlayerPlus.controls.stop();
WindowsMediaPlayerPlus.controls.play();
}
function WMPStop(){
WindowsMediaPlayerPlus.controls.stop();
window.document.S2Player.SetVariable("WindowsMediaPlayerSound.position",0);
}
function WMPPlay(){
WindowsMediaPlayerPlus.controls.play();
}
function WMPPause(){
WindowsMediaPlayerPlus.controls.Pause();
}
function WMPNext(){
window.document.S2Player.TCallFrame("WMPAPI",2);
}
function WMPEvent(f){
if(f == 8) medTT = setTimeout("WMPNext();",500);;
var fs = ["未定义","已停止","已暂停","正在播放","向前搜索","向后搜索","缓冲中..","等待中..", "播放完毕","正在连接","准备就绪"];
if(f<0 || f>=fs.length) return;
window.document.S2Player.SetVariable("WindowsMediaPlayerSound.state",fs[f]+":::::::::::");
window.document.S2Player.TCallFrame("WMPAPI",1);
}
function WMPError(f){
medTT = setTimeout("WMPNext();",500);;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -