Fix server not taking over after leadership is removed; fix soundcloud sync bug [untested]

This commit is contained in:
calzoneman 2013-03-05 12:37:06 -06:00
parent 7d36f3e87a
commit 1e1e51a4ca
2 changed files with 4 additions and 3 deletions

View file

@ -264,7 +264,7 @@ function updateSC(data) {
// Soundcloud's API is async
// Query the playback position and compare that with the sync packet
PLAYER.getPosition(function(pos) {
if(Math.abs(pos - data.currentTime * 1000) > SYNC_THRESHOLD) {
if(Math.abs(pos / 1000 - data.currentTime) > SYNC_THRESHOLD) {
PLAYER.seekTo(data.currentTime * 1000);
}
});