Trying to fix embedded videoplayer

This commit is contained in:
Kasper Rynning-Tønnesen
2016-03-04 14:04:47 +01:00
parent 35397638b2
commit ea2f5406a7
4 changed files with 7 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -39,6 +39,7 @@ $(document).ready(function(){
socket = io.connect(''+add+':8880', connection_options); socket = io.connect(''+add+':8880', connection_options);
socket.on("get_list", function(){ socket.on("get_list", function(){
console.log(chan);
setTimeout(function(){socket.emit('list', chan.toLowerCase())},1000); setTimeout(function(){socket.emit('list', chan.toLowerCase())},1000);
}); });

View File

@@ -67,7 +67,7 @@ var Player = {
if(!paused){ if(!paused){
if(!mobile_beginning) if(!mobile_beginning)
Player.ytplayer.playVideo(); Player.ytplayer.playVideo();
if(!durationBegun) if(!durationBegun || embed)
Player.durationSetter(); Player.durationSetter();
mobile_beginning = false; mobile_beginning = false;
} }
@@ -77,7 +77,7 @@ var Player = {
setTimeout(function(){Player.loaded = true;},500); setTimeout(function(){Player.loaded = true;},500);
}catch(e){ }catch(e){
if(!durationBegun) if(!durationBegun || embed)
Player.durationSetter(); Player.durationSetter();
} }
} }
@@ -117,7 +117,7 @@ var Player = {
} }
break; break;
case 2: case 2:
if(window.mobilecheck()) if(window.mobilecheck() || embed)
{ {
paused = true; paused = true;
Playercontrols.play_pause_show(); Playercontrols.play_pause_show();
@@ -184,7 +184,7 @@ var Player = {
$(".playlist").css("opacity", "1"); $(".playlist").css("opacity", "1");
Player.ytplayer.loadVideoById(video_id); Player.ytplayer.loadVideoById(video_id);
if(autoplay && !window.mobilecheck()) Player.ytplayer.playVideo(); if(autoplay && !window.mobilecheck()) Player.ytplayer.playVideo();
if(!durationBegun) if(!durationBegun || embed)
Player.durationSetter(); Player.durationSetter();
if(embed){ if(embed){
setTimeout(function(){ setTimeout(function(){