function SetStop() { try { if (player.getState() == "playing") { player.pause(); //播放器bug,暂停2次是播放 catch (ex) { player.pause(); function SetPlayer() { // alert(parent._player); if (parent._player == false) { startCount(); if (typeof (jQuery(".xgplayer-icon-play").html()) != "") {// jQuery(".xgplayer-icon-play").click(); else { player.play(); parent._player = true; function SetPause() { //alert(parent._player); if (parent._player == true) { stopCount(); player.pause(); parent._player = false; function SetRemove() { player.destroy(); else { t = setTimeout(function () { timedCount() , 1000); c = c + 1; //console.log(c); //回放扣流量 function timedCountBack() { //每15秒后扣流量,播放结束停止 if (d / 15 == 1) { d = 0; parent.PlayVideo(videoid); console.log(videoid); parent._IsPlayed = false; //重置,再次调用PlayVideo tt = setTimeout(function () { timedCountBack() , 1000); d = d + 1; function startCount() { // alert(timer_is_on); if (timer_is_on == 0) { timer_is_on = 1; if (_isprotimeflag != null) { timedCount(); else { timedCountBack(); function stopCount() { if (_isprotimeflag != null) { clearTimeout(t); else { clearTimeout(tt); timer_is_on = 0;

九五至尊网站

//获取窗口高度 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 isTrident() { //是否内核,判断ie内核 var ua = navigator.userAgent; var tridentPattern = /Trident\/(\d+)/; return tridentPattern.test(ua); // 判断是否在360兼容模式,进行滚动条样式适配 function is360CompatibilityMode() { const userAgent = navigator.userAgent; // 打印用户代理字符串以便调试 //console.log("User Agent: ", userAgent); // 检查用户代理字符串中是否包含 '360' 和 'Trident' const is360 = userAgent.indexOf('360') !== -1; const isIE = userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident') !== -1; // 如果没有 '360' 但有 'Trident',也可以认为是在兼容模式下 return is360 || isIE; // 如果满足任一条件则返回 true // 判断是否火狐 function isFirefox() { const userAgent = navigator.userAgent; // 打印用户代理字符串以便调试 //console.log("User Agent: ", userAgent); // 检查用户代理字符串中是否包含 '360' 和 'Trident' const is360 = userAgent.indexOf('Firefox') !== -1; const isIE = userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident') !== -1; // 如果没有 '360' 但有 'Trident',也可以认为是在兼容模式下 return is360 || isIE; // 如果满足任一条件则返回 true 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 _url =GetQueryString("url"); var isview =GetQueryString("view"); var _site =GetQueryString("site"); var _warning =GetQueryString("warning"); var _warningnumber =GetQueryString("warningnumber"); var _width=GetQueryString("width"); var _height= GetQueryString("height"); var _isprotimeflag= GetQueryString("isprotimeflag");//10秒后刷新(其他按时间扣) var _VideoTypeID=GetQueryString("VideoTypeID");//视频类型 var pic=GetQueryString("pic"); var _volume=GetQueryString("volume"); //声音自定义 //签到参数 var _IsOpenQD=GetQueryString("IsOpenQD"); //直播签到开关 var _OnlineExpoIsOpenQD=GetQueryString("OnlineExpoIsOpenQD"); //展馆签到开关 var _OnlineExpoID=GetQueryString("OnlineExpoID"); //展馆ID var _QDVideoType=GetQueryString("QDVideoType"); //直播视频类型 0:行业,1:企业, var _VideoID=GetQueryString("VideoID"); //直播ID var _warningcss =GetQueryString("warningcss"); //返回无信号的提示框样式 var _autoplay=true;//默认自动播放 //没有签到图片的时候,默认不自动 if(parent.jQuery(".video .image").is(":hidden")==true) { _autoplay=true; if(_warningcss==null || _warningcss=="") { _warningcss="warning"; if(_volume==null ||_volume=="") { _volume=1; if(_volume>1) { _volume=_volume/100; 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 videoid="";//扣视频的id var swf='//xmvideo.mtnets.com/';//默认必须是百度视频地址 var url = window.location.search; //var loc = url.substring(url.lastIndexOf('=')+1, url.length); if(_url==null || _url==''){ alert('找不到视频资源'); else if(_VideoTypeID==null || _VideoTypeID==0 || _VideoTypeID==7 || _VideoTypeID==8 || _url.toLocaleLowerCase().indexOf(".mp4")>-1 || _url.indexOf(".m3u8")>-1 || _url.indexOf(",")>-1){ //ie内核 var _workkeyid=GetQueryString("WorksKeyID"); // _workkeyid=_workkeyid.replace('http://mtnets-video.oss-cn-shanghai.aliyuncs.com/','https://shortvideo.mtnets.com/'); if(_url.toLocaleLowerCase().indexOf(".mp4")>-1) { swf=_url;//直接MP4地址 if(_VideoTypeID==8) { swf=_workkeyid; if(_VideoTypeID==7) { swf='https://video.mtnets.com/'+_workkeyid+''; if(pic==null){ pic="https://video.mtnets.com/"+_workkeyid.replace("z/bos-","p/bos-").replace(".mp4",".jpg").replace(".MP4",".jpg"); if(_VideoTypeID==null || _VideoTypeID==0) { if(_url.indexOf("http")==-1) { swf='https://xmvideo.mtnets.com/'+_url+'/mp41080p/'+_url+'.mp4'; if(pic==null) { pic='//xmvideo.mtnets.com/'+_url+'/'+_url+'.jpg'; //多个视频的时候,用百度的(前面排掉后,这里一个多是多个地址的) var tempurl2=_url.split(","); var _file1=""; var _file2=""; var _file3=""; if(_url.indexOf(".m3u8")>-1 || _url.indexOf(",")>-1){ //最多取3条 if(tempurl2.length==1) { _file1=tempurl2[0]; swf=_file1; else if(tempurl2.length==2) { _file1=tempurl2[0]; _file2=tempurl2[1];//一个视频的播放器url if(_file1.indexOf("mda")>-1){_file1='//xmvideo.mtnets.com/'+_file1+'/mp41080p/'+_file1+'.mp4'; if(_file2.indexOf("mda")>-1){_file2='//xmvideo.mtnets.com/'+_file2+'/mp41080p/'+_file2+'.mp4'; else if(tempurl2.length==3) { _file1=tempurl2[0]; _file2=tempurl2[1]; _file3=tempurl2[2]; if(_file1.indexOf("mda")>-1){_file1='//xmvideo.mtnets.com/'+_file1+'/mp41080p/'+_file1+'.mp4'; if(_file2.indexOf("mda")>-1){_file2='//xmvideo.mtnets.com/'+_file2+'/mp41080p/'+_file2+'.mp4'; if(_file3.indexOf("mda")>-1){_file3='//xmvideo.mtnets.com/'+_file3+'/mp41080p/'+_file3+'.mp4'; videoid=_file1.replace("https://llsvideo2019.bcebos.com/","");//视频id得到用户信息 videoid=videoid.replace("https://js-llsvideo2019.bcebos.com/",""); videoid=videoid.replace("https://gz-llsvideo2019.bcebos.com/",""); videoid=videoid.replace("https://gz-llsvideo.bcebos.com/",""); videoid=videoid.replace("https://js-llsvideo.bcebos.com/",""); videoid=videoid.replace("https://llsvideo.bcebos.com/",""); if(_url.indexOf(".m3u8")>-1) { //m3u8 开始 if(tempurl2.length==0 || tempurl2.length==1) { var player = new HlsPlayer({ id: 'playercontainer', width: _width, height: _height, poster:pic, url: swf, volume:_volume, autoplay:_autoplay, controls: true,disableProgress: true, loop:true,plugins: [window.HlsPlayer] ); else if(tempurl2.length==2) { var player = new HlsPlayer({ id: 'playercontainer', width: _width, height: _height, poster:pic, url: _file1, autoplay:_autoplay, controls: true,disableProgress: true, loop:false, playNext: { urlList: [ _file2 ] ,plugins: [window.HlsPlayer] ); //只支持最大3个地址 else if(tempurl2.length==3) { var player = new HlsPlayer({ id: 'playercontainer', width: _width, height: _height, poster:pic, url: _file1, autoplay:_autoplay, controls: true,disableProgress: true, loop:false, playNext: { urlList: [ _file2, _file3 ] ,plugins: [window.HlsPlayer] ); //m3u8结束 else{ //只单个视频的时候 if(tempurl2.length==0 || tempurl2.length==1) { var player = new Player({ id: 'playercontainer', width: _width, height: _height, poster:pic, url: swf, volume:_volume, autoplay:_autoplay, controls: true,disableProgress: true, loop:true ); else if(tempurl2.length==2) { var player = new Player({ id: 'playercontainer', width: _width, height: _height, poster:pic, url: _file1, autoplay:_autoplay, controls: true,disableProgress: true, loop:false, playNext: { urlList: [ _file2 ] ); //只支持最大3个地址 else if(tempurl2.length==3) { var player = new Player({ id: 'playercontainer', width: _width, height: _height, poster:pic, url: _file1, autoplay:_autoplay, controls: true,disableProgress: true, loop:false, playNext: { urlList: [ _file2, _file3 ] ); //mp4 end else if(_url.indexOf("qq.com")>-1) { //https://v.qq.com/x/page/z0869aqlk7k.html var _qqheight="540"; if(getWindowHeight()>0) { _qqheight=getWindowHeight()-10; var qqurl=GetQueryString("url"); var vid=qqurl.replace("https://v.qq.com/x/page/","").replace(".html",""); document.writeln(''); else { document.getElementById("youkuplayer").style.width = getWindowWidth() + "px"; document.getElementById("youkuplayer").style.height = getWindowHeight() + "px"; var player2 = new YKU.Player('youkuplayer',{ styleid: '8', client_id: '3af02c54a414d225', vid: GetQueryString("url") ); //通用方法 //以下播放器通用 player.on('play', function (e) { // alert('play'); parent._player=true; startCount() ; if(_warning=="0") { if(_warningnumber==null) { _warningnumber=0; //只能看5秒,没有流量时 setTimeout(function() { player.destroy(); window.parent.document.getElementsByClassName("warning")[_warningnumber].style.display='block'; , 5000); else { //10秒后扣流量 //入口: 商铺首页, 行业站视频首页 if(_QDVideoType>=1)//直播视频类型 0:行业,1:企业(取页面中的展馆值), { _OnlineExpoIsOpenQD=parent.jQuery("#hidOnlineExpoIsOpenQD").val(); //展馆签到开关 _OnlineExpoID=parent.jQuery("#hidOnlineExpoID").val(); //展馆ID if(_IsOpenQD>=1 || _OnlineExpoIsOpenQD>=1) { //parent.jQuery(".enrollTitle a").hide();//隐藏关闭按钮 parent.jQuery("#hid_NewsID").val(_VideoID); parent.UpdatePartuserInfo(); //延时2秒粗发 setTimeout(function() { if(parent.jQuery(".enroll").css("display")=="block") { player.pause(); , 2000); ); //player.on('play', function (e) { // //alert('play'); // parent._player=true; // startCount() ; // ); player.on('pause', function (e) { // alert('pause'); parent._player=false; stopCount() ; ); player.once('complete', function (e) { c=0; stopCount() ; ); ); function resize() { //console.log(_w); //console.log(_h); if (player != null) { var _w = getWindowWidth(); var _h = getWindowHeight(); if (_w != 0 && _h != 0) { try { player.resize(_w, _h); catch (ex) {
)();
document.write("")