mirror of https://github.com/calzoneman/sync.git
Fix leader
This commit is contained in:
parent
35500822d2
commit
62ed922c73
|
@ -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) ->
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue