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