Add "Writing HLS" documentation, refine other stuff

This commit is contained in:
Vanilagy
2026-04-16 14:53:48 +02:00
parent 56b25fbdf8
commit 5465602344
5 changed files with 634 additions and 22 deletions
+4 -2
View File
@@ -54,7 +54,7 @@ type PlaylistSegment = {
timestamp: number;
byteSize: number;
byteOffset: number | null;
info?: HlsOutputSegmentInfo;
info: HlsOutputSegmentInfo | null;
};
type Playlist = {
@@ -905,6 +905,7 @@ export class HlsMuxer extends Muxer {
timestamp: 0,
byteSize: 0,
byteOffset: 0,
info: null,
};
const slice = playlist.singleFile.target.slice(playlist.singleFile.nextOffset);
@@ -927,6 +928,7 @@ export class HlsMuxer extends Muxer {
timestamp: 0,
byteSize: 0,
byteOffset: null,
info: null,
};
const target = await this.output._getTarget({
@@ -1035,7 +1037,7 @@ export class HlsMuxer extends Muxer {
byteOffset: playlist.singleFile
? playlist.singleFile.nextOffset
: null,
info: segmentInfo ?? undefined,
info: segmentInfo ?? null,
});
this.globalTargetDuration = Math.max(this.globalTargetDuration, segmentDuration);