OR PRESS OK TO ENABLE SOUND.
',6,true); } parent.first_play=false; }); //video_vod.muted=false; return; } }catch(err){ parent.set_info('ERROR SOURCE'); //url='video.php?url='+parent.urlencode(url)+'&autoplay=1&ext=.mp4'; //window.location.href=url; return; } ///////////////////////// if(parent.last_cover_stream!='') { video_vod.style.background='url('+parent.default_bg_tv+')'; video_vod.style.backgroundSize='cover'; } else video_vod.style.backgroundColor='#000000'; if( (getPlatform()=='ios') //||(ua.replace(' ','').indexOf('linux;')>0)//lg smarttv ||(ua.replace(' ','').indexOf('wow64')>0)//safari ||(ua.replace(' ','').indexOf('ko-kr')>0) //||(ua.replace(' ','').indexOf('sm-g930f')>0) ||(ua.replace(' ','').indexOf('rv:83')>0) ||(ua.replace(' ','').indexOf('linux/smarttv')>0) ||(ua.replace(' ','').indexOf('rku')>0) ||(ua.replace(' ','').indexOf('fire')>0) ||(ua.replace(' ','').indexOf('androidtv')>0) ) { try{ var source=addSourceToVideo(video_vod, url, 'video/MP2T'); video_vod.src=url; source.src=url; video_vod.autoplay=true; video_vod.style.visibility='visible'; if(parent.first_play==true) video_vod.muted=true; else video_vod.muted=false; video_vod.addEventListener('canplay',function() { if(video_vod.canplay_checked==true)return; video_vod.canplay_checked=true; /* if(parent.first_play==true) parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); */ parent.first_play=false; }); _hls = new Hls(config); _hls.cur_url=url; _hls.attachMedia(video_vod); _hls.loadSource(url); video_vod.ontimeupdate = function(event){ video_vod.last_time_updated=Math.floor((new Date()).getTime()/1000); }; }catch(err){} return; } ///////////////////////// recheck_loading(10000); try{ _hls = new Hls(config); _hls.cur_url=url; //if (ua.indexOf('windows')==-1) video_vod.autoplay=false; if((getPlatform()=='ios') ) video_vod.autoplay=true; if(parent.first_play==true) video_vod.muted=true; else video_vod.muted=false; _hls.attachMedia(video_vod); video_vod.style.visibility='visible'; _hls.loadSource(url); /* video_vod.onerror = function() { parent.set_info("Error " + video_vod.error.code + "; details: " + video_vod.error.message,10,true); parent.replay_m3u8(); return true; } */ _hls.on(Hls.Events.FRAG_LOADING , function (event, data) { if(video_vod.buffer_created==true)return; try{clearInterval(interval_loading);}catch(err){} interval_loading=setInterval(function(){ if(data.frag.length>0) { video_vod.buffer_created=true; parent.set_info('BUFFERING FOR START..
PLEASE WAIT A MOMENT.',3,true); try{clearInterval(interval_loading);}catch(err){} } },200); }); _hls.on(Hls.Events.ERROR , function (event, data) { if(data.details=='bufferAppendError') { parent.replay_m3u8(); //parent.set_info(data.details); //_hls.recoverMediaError(); //video_vod.play(); } //_hls.loadSource(url); //video_vod.play(); }); _hls.on(Hls.Events.INIT_PTS_FOUND , function (event, data) { //try{parent.set_info(data.frag.destroy());}catch(err){} // _hls.fragmentLoader.destroy(); //video_vod.addEventListener('canplay', function(event){ if(video_vod.m3u8_loaded==true)return; video_vod.m3u8_loaded=true; //if (ua.indexOf('windows')>=0) if(!video_vod.autoplay) { //parent.set_info('SUCCESS..',3,true); video_vod.play(); video_vod.last_time_updated=Math.floor((new Date()).getTime()/1000); } }); video_vod.ontimeupdate = function(event){ video_vod.last_time_updated=Math.floor((new Date()).getTime()/1000); }; video_vod.addEventListener('canplay', function(event){ if(video_vod.canplay_checked==true)return; video_vod.canplay_checked=true; recheck_first_play(video_vod.last_time_updated); if (ua.indexOf('windows')>=0) { try{ if(parent.first_play==false) { parent.set_info('STARTING PLAY..',3,true); video_vod.muted=false; } else { //parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); } }catch(err){ //parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); } } else { //parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); } parent.first_play=false; }); }catch(err){} return; }
',6,true); } parent.first_play=false; }); //video_vod.muted=false; return; } }catch(err){ parent.set_info('ERROR SOURCE'); //url='video.php?url='+parent.urlencode(url)+'&autoplay=1&ext=.mp4'; //window.location.href=url; return; } ///////////////////////// if(parent.last_cover_stream!='') { video_vod.style.background='url('+parent.default_bg_tv+')'; video_vod.style.backgroundSize='cover'; } else video_vod.style.backgroundColor='#000000'; if( (getPlatform()=='ios') //||(ua.replace(' ','').indexOf('linux;')>0)//lg smarttv ||(ua.replace(' ','').indexOf('wow64')>0)//safari ||(ua.replace(' ','').indexOf('ko-kr')>0) //||(ua.replace(' ','').indexOf('sm-g930f')>0) ||(ua.replace(' ','').indexOf('rv:83')>0) ||(ua.replace(' ','').indexOf('linux/smarttv')>0) ||(ua.replace(' ','').indexOf('rku')>0) ||(ua.replace(' ','').indexOf('fire')>0) ||(ua.replace(' ','').indexOf('androidtv')>0) ) { try{ var source=addSourceToVideo(video_vod, url, 'video/MP2T'); video_vod.src=url; source.src=url; video_vod.autoplay=true; video_vod.style.visibility='visible'; if(parent.first_play==true) video_vod.muted=true; else video_vod.muted=false; video_vod.addEventListener('canplay',function() { if(video_vod.canplay_checked==true)return; video_vod.canplay_checked=true; /* if(parent.first_play==true) parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); */ parent.first_play=false; }); _hls = new Hls(config); _hls.cur_url=url; _hls.attachMedia(video_vod); _hls.loadSource(url); video_vod.ontimeupdate = function(event){ video_vod.last_time_updated=Math.floor((new Date()).getTime()/1000); }; }catch(err){} return; } ///////////////////////// recheck_loading(10000); try{ _hls = new Hls(config); _hls.cur_url=url; //if (ua.indexOf('windows')==-1) video_vod.autoplay=false; if((getPlatform()=='ios') ) video_vod.autoplay=true; if(parent.first_play==true) video_vod.muted=true; else video_vod.muted=false; _hls.attachMedia(video_vod); video_vod.style.visibility='visible'; _hls.loadSource(url); /* video_vod.onerror = function() { parent.set_info("Error " + video_vod.error.code + "; details: " + video_vod.error.message,10,true); parent.replay_m3u8(); return true; } */ _hls.on(Hls.Events.FRAG_LOADING , function (event, data) { if(video_vod.buffer_created==true)return; try{clearInterval(interval_loading);}catch(err){} interval_loading=setInterval(function(){ if(data.frag.length>0) { video_vod.buffer_created=true; parent.set_info('BUFFERING FOR START..
PLEASE WAIT A MOMENT.',3,true); try{clearInterval(interval_loading);}catch(err){} } },200); }); _hls.on(Hls.Events.ERROR , function (event, data) { if(data.details=='bufferAppendError') { parent.replay_m3u8(); //parent.set_info(data.details); //_hls.recoverMediaError(); //video_vod.play(); } //_hls.loadSource(url); //video_vod.play(); }); _hls.on(Hls.Events.INIT_PTS_FOUND , function (event, data) { //try{parent.set_info(data.frag.destroy());}catch(err){} // _hls.fragmentLoader.destroy(); //video_vod.addEventListener('canplay', function(event){ if(video_vod.m3u8_loaded==true)return; video_vod.m3u8_loaded=true; //if (ua.indexOf('windows')>=0) if(!video_vod.autoplay) { //parent.set_info('SUCCESS..',3,true); video_vod.play(); video_vod.last_time_updated=Math.floor((new Date()).getTime()/1000); } }); video_vod.ontimeupdate = function(event){ video_vod.last_time_updated=Math.floor((new Date()).getTime()/1000); }; video_vod.addEventListener('canplay', function(event){ if(video_vod.canplay_checked==true)return; video_vod.canplay_checked=true; recheck_first_play(video_vod.last_time_updated); if (ua.indexOf('windows')>=0) { try{ if(parent.first_play==false) { parent.set_info('STARTING PLAY..',3,true); video_vod.muted=false; } else { //parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); } }catch(err){ //parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); } } else { //parent.set_info('STARTING PLAY..
CLICK INTO SCREEN
OR PRESS OK TO ENABLE SOUND.
',6,true); } parent.first_play=false; }); }catch(err){} return; }