Skip to content

Commit

Permalink
Fix live frag finding after detach and re-attach past live window (#5742
Browse files Browse the repository at this point in the history
)

Fixes #5741
  • Loading branch information
robwalch committed Aug 16, 2023
1 parent a983d0f commit c6395f9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/controller/base-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,12 +1040,13 @@ export default class BaseStreamController
// Do not load using live logic if the starting frag is requested - we want to use getFragmentAtPosition() so that
// we get the fragment matching that start time
if (
!levelDetails.PTSKnown &&
!this.startFragRequested &&
this.startPosition === -1
(!levelDetails.PTSKnown &&
!this.startFragRequested &&
this.startPosition === -1) ||
pos < start
) {
frag = this.getInitialLiveFragment(levelDetails, fragments);
this.startPosition = frag
this.startPosition = this.nextLoadPosition = frag
? this.hls.liveSyncPosition || frag.start
: pos;
}
Expand Down

0 comments on commit c6395f9

Please sign in to comment.