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
PLAYER.seekTo(data.currentTime)
PLAYER.pause()
else if PLAYER.paused
else if PLAYER.paused and not data.paused
PLAYER.play()
PLAYER.getTime((seconds) ->

View File

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

View File

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