详细参数可查询MSDNhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay/mmp_sdk/settingsobject.asp <br>var state;</p> <p>//初始化<br>function playerinit()<br>{<br> player.url="mp3.m3u";<br> player.settings.autoStart = false ;<br>}</p> <p>//播放<br>function play()<br>{<br> if (player.controls.isavailable('play'))<br> {<br> player.controls.play();<br> state=setInterval("updatetime()",1000);<br> playerinfo.innerHTML = "播放";<br> }<br>}</p> <p>//暂停<br>function pause()<br>{<br> if (player.controls.isavailable('pause'))<br> {<br> player.controls.pause();<br> clearInterval(state);<br> playerinfo.innerHTML = "暂停";<br> }<br>}</p> <p>//停止<br>function stop()<br>{<br> if (player.controls.isavailable('stop'))<br> {<br> player.controls.stop();<br> clearInterval(state);<br> playerinfo.innerHTML = "停止";<br> }<br>}</p> <p>//前首<br>function previous()<br>{<br> if (player.controls.isavailable( 'previous' ))<br> {<br> player.controls.previous();<br> playerinfo.innerHTML = "前一首";<br> }<br>}</p> <p>//后首<br>function next()<br>{<br> if (player.controls.isavailable( 'next' ))<br> {<br> player.controls.next();<br> playerinfo.innerHTML = "下一首";<br> }<br>}</p> <p>//?<br>function step()<br>{<br> if (player.controls.isavailable( 'step' ))<br> player.controls.step( 1 );<br>}</p> <p>//音量-<br>function voldown()<br>{<br> if ( player.settings.volume < 5 )<BR> {<BR> player.settings.volume = 0;<BR> playerinfo.innerHTML = "0";<BR> }<BR> else<BR> {<BR> player.settings.volume -= 5;<BR> playerinfo.innerHTML = player.settings.volume;<BR> }<BR>}</P> <P>//音量+<BR>function volup()<BR>{<BR> if ( player.settings.volume > 95 )<br> {<br> player.settings.volume = 100;<br> playerinfo.innerHTML = "100";<br> }<br> else<br> {<br> player.settings.volume += 5;<br> playerinfo.innerHTML = player.settings.volume;<br> }<br>}</p> <p>//静音<br>function mute()<br>{<br> player.settings.mute = !player.settings.mute;<br>}</p> <p>//声道<br>function balance()<br>{<br> switch (player.settings.balance)<br> {<br> case 0:<br> player.settings.balance = 100;<br> playerinfo.innerHTML = '左声道';<br> break;<br> case 100:<br> player.settings.balance = -100;<br> playerinfo.innerHTML = '右声道';<br> break;<br> case -100:<br> player.settings.balance = 0;<br> playerinfo.innerHTML = '全声道';<br> break;<br> default :<br> player.settings.balance = 0;<br> playerinfo.innerHTML = '全声道';<br> break;<br> }<br>}</p> <p>//更新时间<br>function updatetime()<br>{<br> playerinfo.innerHTML = player.controls.currentPositionString + " | " + player.currentMedia.durationString;<br>}</p> <p> <br> 스위치(newstate){<br> 사례 1:<br> playerinfo.innerHTML = "stop";<br> break;<br> 사례 2:<br> playerinfo.innerHTML = "pause";<br> break;<br> 사례 3:<br> playerinfo.innerHTML = "Playing";<br> break;<br> 사례 4:<br> playerinfo.innerHTML = "4";<br> break;<br> 사례 5: <br> playerinfo.innerHTML = "5";<br> break;<br> 사례 6:<br> playerinfo.innerHTML = "버퍼링...";<br> break;<br> 사례 7:<br> playerinfo .innerHTML = "7";<br> break;<br> 사례 8:<br> playerinfo.innerHTML = "8";<br> break;<br> 사례 9:<br> playerinfo.innerHTML = " 연결 중입니다. ..";<br> 중단;<br> 사례 10:<br> playerinfo.innerHTML = "준비<a href='http://www.knowsky.com'>http ://www.knowsky.com< ;/a>";<br> break;<br> 사례 11:<br> playerinfo.innerHTML = "11";<br> break;<br> 기본값:<br> playerinfo .innerHTML = "";<br>}<br>