function test() { alert('test'); } function SetPlayer() { // alert(parent._player); if(parent._player==false) { startCount(); player.play(); parent._player=true; } } function SetPause() { //alert(parent._player); if(parent._player==true) { stopCount(); player.pause(); parent._player=false; } } 
$(document).ready(function(){ parent.$('.videoItem').hide(); }); //获取窗口高度 function getWindowHeight() { var windowHeight = 0; if (typeof (window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else { if (document.body && document.body.clientHeight) { windowHeight = document.body.clientHeight; } } } return windowHeight; } //获取窗口宽度 function getWindowWidth() { var windowWidth = 0; if (typeof (window.innerWidth) == 'number') { windowWidth = window.innerWidth; } else { if (document.documentElement && document.documentElement.clientWidth) { windowWidth = document.documentElement.clientWidth; } else { if (document.body && document.body.clientWidth) { windowWidth = document.body.clientWidth; } } } return windowWidth; } function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"); var r = window.location.search.substr(1).match(reg); if (r!=null) return (r[2]); return null; } var _website =window.location.host; var _protocol= window.location.protocol; var loc =GetQueryString("url"); var isview =GetQueryString("view"); var _site =GetQueryString("site"); var _warning =GetQueryString("warning"); var _width=GetQueryString("width"); var _height= GetQueryString("height"); var pic = GetQueryString("pic"); var _VideoTypeID=GetQueryString("VideoTypeID");//视频类型 var _partloc=loc; if(_width==null ||_height==null) { // _width=606; // _height= 400; _width=getWindowWidth(); _height=getWindowHeight(); if(_width==0||_height==0){ _width=parent._showframewidth; _height=parent._showframeheight; } } var swf=""; var url = window.location.search; //var loc = url.substring(url.lastIndexOf('=')+1, url.length); if(loc==null || loc==''){ alert('找不到视频资源'); //return false; } else { swf='//jfbeac01vjanara1ta7.exp.bcevod.com/'+loc+'/'+loc+'.mp4' //直接输入新版vod地址 if(swf.indexOf("mtnetsvideo")>-1 ||swf.indexOf("videoworks")>-1) { swf=loc; if(swf!="") { _partloc=swf.split("videoworks/")[1].split("/industry")[0]; } } if(pic==null) { pic='//jfbeac01vjanara1ta7.exp.bcevod.com/'+loc+'/'+loc+'.jpg'; } if(isview=='show')//view { _width=780; _height= 480; } else if(isview=='in_pro') //行业站产品 { _width="423"; _height= "365"; } else if(isview=='standshowvideo1') //视频栏目 { _width="606"; _height= "347"; } else if(isview=='stand_pro') //102 { _width="660"; _height= "347"; } else if(isview=='stand_pro101') { _width="337"; _height= "289"; } else if(isview=='chem17_pro') { _width="448"; _height= "303"; } } //vod新版地址 if(_VideoTypeID==7){ var _workkeyid=GetQueryString("WorksKeyID"); swf='//mtnetsvideo.cdn.bcebos.com/'+_workkeyid+''; pic="//mtnetsvideo.cdn.bcebos.com/"+_workkeyid.replace("z/bos-","p/bos-").replace(".mp4",".jpg").replace(".MP4",".jpg"); } var _link=_protocol+"//"+_website; var player = cyberplayer("playercontainer").setup({ width: _width, height: _height, file:swf, image: pic, autostart: false, stretching: "uniform", repeat: false, playRate: false, volume: 20, controls: true, starttime: 0, controlbar: { barLogo: false }, rightclick: [ // 右键配置 { title: "网站首页", // 标题1 link: _link// 跳转链接 } ], ak: 'c71e5c9720054062901bac7fe80bf8c3' }); player.on('beforePlay', function (e) { if(_warning=="0") { setTimeout(function() { player.remove(); window.parent.document.getElementsByClassName("Warning")[0].style.display='block'; }, 5000); }else { //10秒后扣流量 } }); player.on('play', function (e) { //alert('play'); parent._player=true; startCount() ; }); player.on('pause', function (e) { //alert('pause'); parent._player=false; stopCount() ; }); player.on('complete', function (e) { c=0; stopCount() ; }); function clock() { alert('a'); }