From e9fd5782acd20c054b8018184b7233846ecaa389 Mon Sep 17 00:00:00 2001 From: Rob Walch Date: Wed, 20 Nov 2024 15:40:44 -0800 Subject: [PATCH] Reduce the expected availability to playlist duration plus target duration --- src/loader/level-details.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/loader/level-details.ts b/src/loader/level-details.ts index 337c9bfd0b2..34c3e554fce 100644 --- a/src/loader/level-details.ts +++ b/src/loader/level-details.ts @@ -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; }