|
|
|
@ -28,10 +28,13 @@ const Player = () => { |
|
|
|
|
'Time required to seek (seconds): ', diffSecondsRequiredToSeekRunningPlayer); |
|
|
|
|
|
|
|
|
|
if (Math.abs(diff) > diffSecondsRequiredToSeekRunningPlayer) { |
|
|
|
|
if (timesSeeked < maxTimesSeekAllow) { |
|
|
|
|
if (roomRunning.speedFactor != 1 || timesSeeked < maxTimesSeekAllow) { |
|
|
|
|
player.current.currentTime = targetTime; |
|
|
|
|
|
|
|
|
|
player.current.playbackRate = Math.max(Math.min(4.0, roomRunning.speedFactor), 0.25); |
|
|
|
|
|
|
|
|
|
setTimesSeeked(timesSeeked + 1); |
|
|
|
|
console.log('SEEKED', 'The running player time was seeked, times seeked: ' + timesSeeked); |
|
|
|
|
console.log('SEEKED', 'The running player time was seeked, times seeked in total: ' + timesSeeked); |
|
|
|
|
} else { |
|
|
|
|
console.warn('The running player is off, but we\'ve changed the time ' + |
|
|
|
|
'too often, skipping synchronizing the player.'); |
|
|
|
|