Add HLS live mode

This commit is contained in:
Vanilagy
2026-03-31 14:13:00 +02:00
parent 6b677291cd
commit b06e407d65
13 changed files with 812 additions and 401 deletions
+4
View File
@@ -1172,6 +1172,7 @@ export type HlsOutputFormatOptions = {
segmentFormat: OutputFormat | OutputFormat[];
targetDuration?: number;
singleFilePerPlaylist?: boolean;
live?: boolean;
getPlaylistPath?: (info: HlsOutputPlaylistInfo) => MaybePromise<string>;
getSegmentPath?: (info: HlsOutputSegmentInfo) => MaybePromise<string>;
getInitPath?: (info: HlsOutputPlaylistInfo) => MaybePromise<string>;
@@ -1213,6 +1214,9 @@ export class HlsOutputFormat extends OutputFormat {
if (options.singleFilePerPlaylist !== undefined && typeof options.singleFilePerPlaylist !== 'boolean') {
throw new TypeError('options.singleFilePerPlaylist, when provided, must be a boolean.');
}
if (options.live !== undefined && typeof options.live !== 'boolean') {
throw new TypeError('options.live, when provided, must be a boolean.');
}
if (options.getPlaylistPath !== undefined && typeof options.getPlaylistPath !== 'function') {
throw new TypeError('options.getPlaylistPath, when provided, must be a function.');
}