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
|
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) ->
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue