Skip to content

Commit

Permalink
Reduce the expected availability to playlist duration plus target dur…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
robwalch committed Nov 20, 2024
1 parent 30c05b3 commit e9fd578
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/loader/level-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ export class LevelDetails {
get expired(): boolean {
if (this.live && this.age) {
const playlistWindowDuration = this.partEnd - this.fragmentStart;
return this.age > playlistWindowDuration + this.levelTargetDuration * 3;
return (
this.age >
Math.max(playlistWindowDuration, this.totalduration) +
this.levelTargetDuration
);
}
return false;
}
Expand Down

0 comments on commit e9fd578

Please sign in to comment.