mirror of https://github.com/calzoneman/sync.git
Fix leader bug
This commit is contained in:
parent
539d728df4
commit
8f190403f8
|
@ -640,16 +640,7 @@ Callbacks = {
|
||||||
// I'm a leader! Set up sync function
|
// I'm a leader! Set up sync function
|
||||||
if(LEADTMR)
|
if(LEADTMR)
|
||||||
clearInterval(LEADTMR);
|
clearInterval(LEADTMR);
|
||||||
LEADTMR = setInterval(function() {
|
LEADTMR = setInterval(sendVideoUpdate, 5000);
|
||||||
PLAYER.getTime(function(seconds) {
|
|
||||||
socket.emit("mediaUpdate", {
|
|
||||||
id: PLAYER.id,
|
|
||||||
currentTime: seconds,
|
|
||||||
paused: PLAYER.paused,
|
|
||||||
type: PLAYER.type
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}, 5000);
|
|
||||||
}
|
}
|
||||||
// I'm not a leader. Don't send syncs to the server
|
// I'm not a leader. Don't send syncs to the server
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue