<body onload="MusicPlay()">
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="Player" width="300" height="62">
<param name="url" value="
http://lyx789.com/down/song/不要在我寂寞的时候说爱我.mp3">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="playCount" value="1">
<param name="autoStart" value="1">
<param name="volume" value="10">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="stretchToFit" value="-1">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="0">
<param name="fullScreen" value="0">
<param name="enableErrorDialogs" value="0">
</object><br>
播放状态: <span style="color:red" id="Text"></span> <br>
播放进度: <span style="color:red" id="Timer"></span> <br>
<script>
function MusicPlay() {
var MTypes=document.Player.playState;
document.getElementById("Text").innerHTML=MTypes;
document.getElementById("Timer").innerHTML=document.Player.controls.currentPositionString+'|'+ document.Player.currentMedia.durationString;
window.setTimeout("MusicPlay()",1000);
}
</script>
<br>
判断PlayState 的值 (即上面子中的"播放状态")
1=停止
2=暂停中
3=正在播放
4=向前搜索
5=向后搜索
6=缓冲中
7=等待中
8=播放完毕
9=转换曲目
10=准备就绪
posted on 2007-12-19 11:19
汪杰 阅读(239)
评论(0) 编辑 收藏 引用 所属分类:
others