Skip to content

Commit

Permalink
Merge pull request #1586 from canalplus/fix/samsung-seek-freezing
Browse files Browse the repository at this point in the history
fix(freeze-detector): perform a seek regardless of the wanted position
  • Loading branch information
peaBerberian authored Oct 25, 2024
2 parents 06c53f9 + 7cb4e3f commit 7a7395a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main_thread/init/utils/rebuffering_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,10 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
? freezing.timestamp
: prevFreezingState.attemptTimestamp;

if (
!position.isAwaitingFuturePosition() &&
now - referenceTimestamp > UNFREEZING_SEEK_DELAY
) {
if (now - referenceTimestamp > UNFREEZING_SEEK_DELAY) {
log.warn("Init: trying to seek to un-freeze player");
this._playbackObserver.setCurrentTime(
this._playbackObserver.getCurrentTime() + UNFREEZING_DELTA_POSITION,
observation.position.getWanted() + UNFREEZING_DELTA_POSITION,
);
prevFreezingState = { attemptTimestamp: now };
}
Expand Down Expand Up @@ -484,7 +481,7 @@ function generateDiscontinuityError(stalledPosition: number, seekTo: number): Me
"DISCONTINUITY_ENCOUNTERED",
"A discontinuity has been encountered at position " +
String(stalledPosition) +
", seeked at position " +
", seeking at position " +
String(seekTo),
);
}
Expand Down

0 comments on commit 7a7395a

Please sign in to comment.