<br>
<b>播放速度调整</b>
<script>
var mediaRate=document.MediaPlayer1.Rate;
var mediaVolume=document.MediaPlayer1.Volume;
var mediaCurrentPosition=document.MediaPlayer1.CurrentPosition;
function setRate(num)
{
mediaRate=num;
document.MediaPlayer1.Rate=num;
}
function addCurrentPosition(num)
{
mediaCurrentPosition=document.MediaPlayer1.CurrentPosition;
mediaCurrentPosition+=num;
if(mediaCurrentPosition<0)mediaCurrentPosition=0;
document.MediaPlayer1.CurrentPosition=mediaCurrentPosition;
}
function addVolume(num)
{
mediaVolume=document.MediaPlayer1.Volume;
if(num>0 && mediaVolume<-1)
{
mediaVolume+=num;
if(mediaVolume>-1)mediaVolume=-1;
document.MediaPlayer1.Volume=mediaVolume;
}
else
{
if(num<0 && mediaVolume>-9999)
{ mediaVolume +=num;
if(mediaVolume <-9999)mediaVolume=-9999;
document.MediaPlayer1.Volume=mediaVolume;
}
}
}
function addRate(num)
{
mediaRate=document.MediaPlayer1.Rate;
if(num>0 && mediaRate<12.0)
{
mediaRate+=num;
//if(mediaRate >2.0)mediaRate=2.0;
document.MediaPlayer1.Rate=mediaRate;
}
else
{
if(num<0 && mediaRate>0.1)
{ mediaRate +=num;
if(mediaRate <0.1)mediaRate=0.1;
document.MediaPlayer1.Rate=mediaRate;
}
}
}
function exchangeValue(obj)
{
if(obj==”0″)
{
obj=”-1″;
}
else
{
obj=”0″;
}
return obj;
}
</script>
<!–速度正常1.0
速度慢0.0<value<1.0
速度快1.0<value<2.0
–>
<span style=”cursor:hand” onClick=”setRate(1.2);”>较快</span> <span style=”cursor:hand” onClick=”addRate(0.1);”>加速</span>
<span style=”cursor:hand” onClick=”addRate(-0.1);”>减速</span> <span style=”cursor:hand” onClick=”setRate(0.8);”>较慢</span>
<span style=”cursor:hand” onClick=”setRate(1);”>正常</span> <span style=”cursor:hand” onClick=”alert(mediaRate);”>查看速度</span>
<br>
<b>播放声音调整</b> <span style=”cursor:hand” onClick=”document.MediaPlayer1.Mute=exchangeValue(document.MediaPlayer1.Mute);”>静音/取消</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.Mute);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-1″>最大</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-9999″>最小</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-180″>默认</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-259″>中大</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-399″>中等</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-999″>中小</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Volume=-1599″>小</span>
<span style=”cursor:hand” onClick=”addVolume(100);”>加大音量</span> <span style=”cursor:hand” onClick=”addVolume(-100);”>减少音量</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.Volume);”>查看</span>
<br>
<b>播放界面控制</b><br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowCaptioning=exchangeValue(document.MediaPlayer1.ShowCaptioning);”>显示/隐藏字幕</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowCaptioning);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowControls=exchangeValue(document.MediaPlayer1.ShowControls);”>显示/隐藏播放控制</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowControls);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowAudioControls=exchangeValue(document.MediaPlayer1.ShowAudioControls);”>显示/隐藏音量控制</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowAudioControls);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowDisplay=exchangeValue(document.MediaPlayer1.ShowDisplay);”>显示/隐藏节日信息</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowDisplay);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowGotoBar=exchangeValue(document.MediaPlayer1.ShowGotoBar);”>显示/隐藏GOTOBAR</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowGotoBar);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowPositionControls=exchangeValue(document.MediaPlayer1.ShowPositionControls);”>显示/隐藏位置控制</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowPositionControls);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowStatusBar=exchangeValue(document.MediaPlayer1.ShowStatusBar);”>显示/隐藏播放信息</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowStatusBar);”>查看</span>
<br>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.ShowTracker=exchangeValue(document.MediaPlayer1.ShowTracker);”>显示/隐藏播放跟踪条</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.ShowTracker);”>查看</span>
<br>
<b>声道切换</b> <span style=”cursor:hand” onClick=”document.MediaPlayer1.Balance=-9640;”>左声道</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Balance=9640;”>右声道</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.Balance=0;”>左右平衡</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.Balance);”>查看</span>
<br>
<b>视频窗口大小</b> <span style=”cursor:hand” onClick=”document.MediaPlayer1.DisplaySize=1;”>50%</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.DisplaySize=0;”>100%</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.DisplaySize=2;”>200%</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.DisplaySize=3;”>全屏</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.DisplaySize);”>查看</span>
<br>
<b>播放进度控制</b> <span style=”cursor:hand” onClick=”document.MediaPlayer1.CurrentPosition=0;”>回到开始</span>
<span style=”cursor:hand” onClick=”addCurrentPosition(60);”>前进一分钟</span>
<span style=”cursor:hand” onClick=”addCurrentPosition(-60);”>后退一分钟</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.CurrentPosition=99999;”>到最后</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.CurrentPosition);”>查看</span>
<br>
<b>选择伴音</b> <span style=”cursor:hand” onClick=”document.MediaPlayer1.SAMIFileName=http://xxzx.wems.net/jxggtd/wems-kj/kjk/yw3/1.MP3;”>天之痕</span>
<span style=”cursor:hand” onClick=”document.MediaPlayer1.SAMIFileName=;”>无</span>
<span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.SAMIFileName);”>查看</span>
(注意不能马上生效,点击后需要再重新播放歌曲) <span style=”cursor:hand” onClick=”alert(document.MediaPlayer1.maxlength);”>查看</span>
<script language=vbscript>
for each obj in document.MediaPlayer1.all
messagebox(obj)
next
</script>
</td></tr></table>