Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix live duration override by interstitials #6991

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/controller/buffer-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1254,8 +1254,6 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => (key === 'i
}
const playlistEnd = details.edge;
if (details.live && this.hls.config.liveDurationInfinity) {
// Override duration to Infinity
mediaSource.duration = Infinity;
const len = details.fragments.length;
if (len && details.live && !!mediaSource.setLiveSeekableRange) {
const start = Math.max(0, details.fragmentStart);
Expand All @@ -1267,6 +1265,9 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => (key === 'i
}
const overrideDuration = this.overrides?.duration;
if (overrideDuration) {
if (!Number.isFinite(overrideDuration)) {
return null;
}
return { duration: overrideDuration };
}
const mediaDuration = this.media.duration;
Expand Down
Loading