Skip to content

Commit

Permalink
Update src/controller/base-stream-controller.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch authored Apr 26, 2023
1 parent 11d5b8e commit 6d712ae
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/controller/base-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,16 +655,13 @@ export default class BaseStreamController

// Only load Low-Latency parts when the playhead is near the live edge
const partList = details.partList;
const playbackNearLowLatencyEdge =
const loadLowLatencyParts =
this.config.lowLatencyMode &&
!!progressCallback &&
frag.sn !== 'initSegment' &&
partList?.length &&
!!partList?.length &&
details.edge - this.getLoadPosition() < details.targetduration * 3;
if (
this.config.lowLatencyMode &&
playbackNearLowLatencyEdge &&
partList &&
progressCallback
) {
if (loadLowLatencyParts) {
if (targetBufferTime > frag.end && details.fragmentHint) {
frag = details.fragmentHint;
}
Expand Down

0 comments on commit 6d712ae

Please sign in to comment.