Skip to content

Commit

Permalink
Use main playlist details to determine start position of audio and su…
Browse files Browse the repository at this point in the history
…btitle streaming controllers

Fixes video-dev#6126
  • Loading branch information
robwalch committed Feb 7, 2024
1 parent 1781ae7 commit 35c773d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controller/audio-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ class AudioStreamController

// compute start position if we are aligned with the main playlist
if (!this.startFragRequested && (this.mainDetails || !newDetails.live)) {
this.setStartPosition(track.details, sliding);
this.setStartPosition(this.mainDetails || newDetails, sliding);
}
// only switch back to IDLE state if we were waiting for track to start downloading a new fragment
if (
Expand Down
2 changes: 1 addition & 1 deletion src/controller/subtitle-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export class SubtitleStreamController
this.levelLastLoaded = track;

if (!this.startFragRequested && (this.mainDetails || !newDetails.live)) {
this.setStartPosition(track.details, sliding);
this.setStartPosition(this.mainDetails || newDetails, sliding);
}

// trigger handler right now
Expand Down

0 comments on commit 35c773d

Please sign in to comment.