For live streams with negative TIME-OFFSET in EXT-X-START, the offset was incorrectly calculated from seekableEnd, which already has liveEdgeDelay subtracted. This caused playback to start further behind the live edge than intended. Per HLS spec, negative TIME-OFFSET should be relative to the end of the last Media Segment. This fix adds liveEdgeDelay back to seekableEnd before applying the offset, making VHS behavior consistent with native HLS implementations (e.g., Safari). Example: With liveEdgeDelay=18 and TIME-OFFSET=-18: - Before: startPoint = seekableEnd - 18 (36s behind actual live edge) - After: startPoint = seekableEnd (18s behind, matching Safari)
16 lines
236 B
Plaintext
16 lines
236 B
Plaintext
#EXTM3U
|
|
#EXT-X-START:TIME-OFFSET=-30,PRECISE=YES
|
|
#EXT-X-TARGETDURATION:10
|
|
#EXTINF:10,
|
|
media-00001.ts
|
|
#EXTINF:10,
|
|
media-00002.ts
|
|
#EXTINF:10,
|
|
media-00003.ts
|
|
#EXTINF:10,
|
|
media-00004.ts
|
|
#EXTINF:10,
|
|
media-00005.ts
|
|
#EXTINF:10,
|
|
media-00006.ts
|