Stopping a range of functions

This commit is contained in:
Kasper Rynning-Tønnesen
2016-11-18 20:18:36 +01:00
parent 05a24e63ba
commit 48f14c644e
4 changed files with 7 additions and 7 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

@@ -308,7 +308,7 @@ function chromecastListener(evt, data){
console.log(data); console.log(data);
var json_parsed = JSON.parse(data); var json_parsed = JSON.parse(data);
switch(json_parsed){ switch(json_parsed){
case "-1": case -1:
socket.emit("end", {id: json_parsed.videoId, channel: chan.toLowerCase()}); socket.emit("end", {id: json_parsed.videoId, channel: chan.toLowerCase()});
break; break;
} }

View File

@@ -71,14 +71,14 @@ var Player = {
{ {
Player.loadVideoById(video_id); Player.loadVideoById(video_id);
Player.notifyUser(video_id, song_title); Player.notifyUser(video_id, song_title);
Player.seekTo(seekTo); if(!chromecastAvailable) Player.seekTo(seekTo);
if(paused) if(paused)
Player.pauseVideo(); Player.pauseVideo();
} }
if(!paused){ if(!paused){
if(!mobile_beginning) if(!mobile_beginning)
Player.playVideo(); if(!chromecastAvailable)Player.playVideo();
if(!durationBegun) if(!chromecastAvailable && !durationBegun)
Player.durationSetter(); Player.durationSetter();
} }
if(Player.player.getDuration() > seekTo || Player.player.getDuration() === 0 || chromecastAvailable) if(Player.player.getDuration() > seekTo || Player.player.getDuration() === 0 || chromecastAvailable)