mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 20:33:55 +02:00
Add HLS live mode
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user