Fix leader

This commit is contained in:
Calvin Montgomery 2015-07-05 13:29:06 -07:00
parent 35500822d2
commit 62ed922c73
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ window.handleMediaUpdate = (data) ->
if data.paused and not PLAYER.paused if data.paused and not PLAYER.paused
PLAYER.seekTo(data.currentTime) PLAYER.seekTo(data.currentTime)
PLAYER.pause() PLAYER.pause()
else if PLAYER.paused else if PLAYER.paused and not data.paused
PLAYER.play() PLAYER.play()
PLAYER.getTime((seconds) -> PLAYER.getTime((seconds) ->

View File

@ -1142,7 +1142,7 @@
if (data.paused && !PLAYER.paused) { if (data.paused && !PLAYER.paused) {
PLAYER.seekTo(data.currentTime); PLAYER.seekTo(data.currentTime);
PLAYER.pause(); PLAYER.pause();
} else if (PLAYER.paused) { } else if (PLAYER.paused && !data.paused) {
PLAYER.play(); PLAYER.play();
} }
return PLAYER.getTime(function(seconds) { return PLAYER.getTime(function(seconds) {

View File

@ -1378,10 +1378,10 @@ function sendVideoUpdate() {
} }
PLAYER.getTime(function (seconds) { PLAYER.getTime(function (seconds) {
socket.emit("mediaUpdate", { socket.emit("mediaUpdate", {
id: PLAYER.videoId, id: PLAYER.mediaId,
currentTime: seconds, currentTime: seconds,
paused: PLAYER.paused, paused: PLAYER.paused,
type: PLAYER.type type: PLAYER.mediaType
}); });
}); });
} }