Skip to content

Commit

Permalink
Add comment describing additional live start gap allowance
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch authored Aug 4, 2020
1 parent d04d775 commit 51176bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controller/gap-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export default class GapController {
// Jump start gaps within jump threshold
const startJump = Math.max(nextStart, bufferInfo.start || 0) - currentTime;

// When joining a live stream with audio tracks, account for live playlist window sliding by allowing
// a larger jump over start gaps caused by the audio-stream-controller buffering a start fragment
// that begins over 1 target duration after the video start position.
const level = this.hls.levels ? this.hls.levels[this.hls.currentLevel] : null;
const isLive = level?.details?.live;
const maxStartGapJump = isLive ? level.details.targetduration * 2 : MAX_START_GAP_JUMP;
Expand Down

0 comments on commit 51176bb

Please sign in to comment.