重庆交通广播电台在线节目收听
<script language="javascript">var bDrm = false;
var bHasAd = false;
var MovTime;
function pageLoad()
{
bDrm = false;
if(bDrm)
{
//DRM的话,在这儿做预发放证书获取客户端的信息
bDrm = true;
var info = netobj.GetSystemInfo();
document.all.preGetLicense.src = "../drm/preGetLicense.jsp?type=1&fileId=203&clientInfo=" + info;
}
else
{
initOther();
}
}
//DRM证书颁发成功后调用此方法
function drmBack()
{
initOther();
}
//广告和分段文件的初始化
function initOther()
{
//如果有广告系统的话,需要控制播放过程中的广告
if(false)
{
bHasAd = true;
setInterval('stateCheck()',1000);
}
else
{
document.all.MediaPlayer.URL = document.all.playURL.value;
}
}
</script>
<script language="javascript">
var nextADG =0;
var nextAD =0;
var nowplayp = 0;
var nowUrl = "";
var sAdPlay = false;
var nIfSegment = 0;
//校验当前状态是否需要切换到广告播放
function stateCheck()
{
//切换到播放广告
if(sAdPlay && MediaPlayer.playState == 1)
{
if(nextAD<value.length)
{
//一个播放组中还有广告
MediaPlayer.URL = value;
MediaPlayer.controls.play();
sAdPlay = true;
nextAD++;
}
else
{
//这个组中的广告已经播完
nextAD=0;
if(MediaPlayer.controls.duration != nowplayp)
{
//正式内容还没有播完
MediaPlayer.URL = nowUrl;
MediaPlayer.controls.currentPosition = nowplayp;
MediaPlayer.controls.play();
if(nIfSegment == 1)
{
SegmentTime = setInterval('listenMediaPlayerState()',1000);
}
nextADG++;
document.all.play_block.style.display="";
document.all.PB.disabled=false;
document.all.SB.disabled=false;
document.all.PAB.disabled=false;
document.all.adMQ.style.display="none";
MovTime = setInterval('loadMovTime()',1000);
}
else
{
//正式内容已经播完了
nextADG++;
document.all.play_block.style.display="";
document.all.PB.disabled=false;
document.all.SB.disabled=false;
document.all.PAB.disabled=false;
document.all.adMQ.style.display="none";
MovTime = setInterval('loadMovTime()',1000);
}
sAdPlay = false;
}
}
//影片结束时播放片尾广告
if(!sAdPlay && MediaPlayer.playState == 1)
{
if(nextADG<key.length)
{
if(nextAD<value.length)
{
clearInterval(MovTime);
if(nIfSegment == 1)
{
clearInterval(SegmentTime);
}
document.all.play_block.style.display="none";
document.all.PB.disabled=true;
document.all.SB.disabled=true;
document.all.PAB.disabled=true;
document.all.adMQ.style.display="";
nowplayp = MediaPlayer.controls.duration;
MediaPlayer.controls.stop();
nowUrl = MediaPlayer.URL;
MediaPlayer.URL = value;
MediaPlayer.controls.play();
sAdPlay = true;
nextAD++;
}
}
}
//影片开始时播放片头广告
if(!sAdPlay && MediaPlayer.playState==0 && MediaPlayer.URL=="")
{
if(key.length>0 && key==0)
{
clearInterval(MovTime);
document.all.play_block.style.display="none";
document.all.PB.disabled=true;
document.all.SB.disabled=true;
document.all.PAB.disabled=true;
document.all.adMQ.style.display="";
nowUrl = document.all.playURL.value;
MediaPlayer.URL = value;
MediaPlayer.controls.play();
sAdPlay = true;
nextAD++;
}
else
{
document.all.MediaPlayer.URL = document.all.playURL.value;
if(nIfSegment == 1)
{
setInterval('listenMediaPlayerState()',1000);
}
}
}
}
//滚动条的控制
function getAbsLeft(e)
{
var l=e.offsetLeft;
while(e=e.offsetParent)
l += e.offsetLeft;
return l;
}
function getAbsTop(e)
{
var t=e.offsetTop;
while(e=e.offsetParent)
t += e.offsetTop;
return t;
}
//滚动条的控制
function loadMovTime()
{
}
//进度条拖动控制
function MovStartDrag()
{
}
function MovEndDrag()
{
}
//声音条拖动处理
function Vol_EndDrag()
{
vol = (getAbsLeft(vol_block)-355)/30*100;
VolumeUp(vol);
}
function Vol_ondrag(block , start , end)
{
mouses = event.clientX-10;
if (getAbsLeft(block) >= end && mouses > getAbsLeft(block))
{
block.style.pixelLeft = end;
return;
}
if (getAbsLeft(block) <= start && mouses < getAbsLeft(block))
{
block.style.pixelLeft = start;
return;
}
block.style.pixelLeft = mouses;
}
//禁音
function Mute()
{
if(MediaPlayer.settings.mute == true)
{
MediaPlayer.settings.mute = "false";
}else{
MediaPlayer.settings.mute = "true";
}
}
//设置声音
function VolumeUp(vol)
{
document.MediaPlayer.settings.volume = vol;
}
//全频操作
function fullscreen()
{
var state = MediaPlayer.playState;
if(state == 3)
{
document.all.MediaPlayer.fullScreen = 1;
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body onload="pageLoad()">
<table id="__01" width="300" height="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><OBJECT ID="MediaPlayer" name="MediaPlayer" CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="300" height="100">
<param name="URL" value="">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="1">
<param name="_cx" value="6482">
<param name="_cy" value="6350">
</OBJECT></td>
</tr>
</table>
<OBJECT name=netobj style="hidden" classid=clsid:A9FC132B-096D-460B-B7D5-1DB0FAE0C062 height=0 id=netobj width=0></OBJECT>
<input type="hidden" name="playURL" value="mms://v1.cbg.cn/jiaotong">
<iframe name="preGetLicense" style="display:none" src=""></iframe>
</body>
</html>
<!-- 显示播放器状态_开始 -->
<script language="JScript">
var showMessage;
var playerStatus;
var showMessage2;
function showPlayerStatus()
{
showMessage2 = showMessage2 + ".";
if(showMessage2.length > 8)
{
showMessage2 = "";
}
var state = MediaPlayer.playState;
switch(state)
{
case 0:
showMessage = "正在确定媒体位置" + showMessage2;
break;
case 1:
showMessage = "停止";
break;
case 2:
showMessage = "暂停.";
break;
case 3:
showMessage = "正在播放.";
break;
case 6:
showMessage = "缓冲处理: " + MediaPlayer.network.bufferingProgress + "%";
break;
case 9:
showMessage = "正在连接到媒体" + showMessage2;
break;
default:
showMessage = "准备就绪.";
break;
}
document.all.playerMsg.innerHTML = showMessage;
}
playerStatus = setInterval('showPlayerStatus()',200);
</script>
<!-- 显示播放器状态_结束 --> 也可以用CMMB看路况台:lol 我晕咯,还可以也。。。。。。。。。。 2楼的你有用过CMMB?? 效果不错的说! 不错:) :) :) :) 效果不错的说!
页:
[1]