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

View File

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

View File

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