🎥 Make videos programmatically with React
progress
Jonny Burger0dd4ea5a9897
diff --git a/packages/media-parser/src/containers/iso-base-media/collect-sample-positions-from-moof-boxes.ts b/packages/media-parser/src/containers/iso-base-media/collect-sample-positions-from-moof-boxes.tsindex b3448c8962..b47919227c 100644--- a/packages/media-parser/src/containers/iso-base-media/collect-sample-positions-from-moof-boxes.ts+++ b/packages/media-parser/src/containers/iso-base-media/collect-sample-positions-from-moof-boxes.ts@@ -12,13 +12,9 @@ export const collectSamplePositionsFromMoofBoxes = ({tfraBoxes: TfraBox[];tkhdBox: TkhdBox;}) => {- // In a fragmented MP4, the tfra boxes are present, then the number of tfra and moof boxes must be the same-- // In a m3u8, there are no tfra, and only 1 moofconst isComplete =- tfraBoxes.length === 0 ||- (tfraBoxes.length > 0 &&- tfraBoxes.every((t) => t.entries.length === moofBoxes.length));+ tfraBoxes.length > 0 &&+ tfraBoxes.every((t) => t.entries.length === moofBoxes.length);const samplePositions = moofBoxes.map((m, index) => {const isLastFragment = index === moofBoxes.length - 1 && isComplete;diff --git a/packages/media-parser/src/state/m3u-state.ts b/packages/media-parser/src/state/m3u-state.tsindex 23a7adb8c7..2101c8abb3 100644--- a/packages/media-parser/src/state/m3u-state.ts+++ b/packages/media-parser/src/state/m3u-state.ts@@ -185,7 +185,7 @@ export const m3uState = (logLevel: LogLevel) => {seekToSecondsToProcess[playlistUrl] = m3uSeek;},getSeekToSecondsToProcess: (playlistUrl: string) =>- seekToSecondsToProcess[playlistUrl],+ seekToSecondsToProcess[playlistUrl] ?? null,setNextSeekShouldSubtractChunks: (playlistUrl: string, chunks: number) => {nextSeekShouldSubtractChunks[playlistUrl] = chunks;},