|
|
@ -71,9 +71,6 @@ const Player = () => { |
|
|
|
let targetTime = roomTime() / 1000; |
|
|
|
let targetTime = roomTime() / 1000; |
|
|
|
let diff = player.current.currentTime - targetTime; |
|
|
|
let diff = player.current.currentTime - targetTime; |
|
|
|
|
|
|
|
|
|
|
|
console.log('PLAYER DIFF', diff, |
|
|
|
|
|
|
|
'min req to seek: ', diffSecondsRequiredToSeekRunningPlayer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (player.current && Math.abs(diff) > diffSecondsRequiredToSeekRunningPlayer) { |
|
|
|
if (player.current && Math.abs(diff) > diffSecondsRequiredToSeekRunningPlayer) { |
|
|
|
if (room.speedFactor != 1 || manualAdjustment || timesSeeked < maxTimesSeekAllow) { |
|
|
|
if (room.speedFactor != 1 || manualAdjustment || timesSeeked < maxTimesSeekAllow) { |
|
|
|
player.current.currentTime = targetTime; |
|
|
|
player.current.currentTime = targetTime; |
|
|
@ -82,7 +79,6 @@ const Player = () => { |
|
|
|
if (!manualAdjustment) { |
|
|
|
if (!manualAdjustment) { |
|
|
|
setTimesSeeked(timesSeeked + 1); |
|
|
|
setTimesSeeked(timesSeeked + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('PLAYER SEEKED', 'Player was seeked (total: ' + timesSeeked + ')'); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
console.warn('The running player is off, but we\'ve changed the time ' + |
|
|
|
console.warn('The running player is off, but we\'ve changed the time ' + |
|
|
|
'too often, skipping synchronizing the player.'); |
|
|
|
'too often, skipping synchronizing the player.'); |
|
|
|