🎥 Make videos programmatically with React
nice
Jonny Burgerb13d0fe505ee
diff --git a/packages/media-parser/src/containers/iso-base-media/get-seeking-from-mp4.ts b/packages/media-parser/src/containers/iso-base-media/get-seeking-from-mp4.tsindex 48b7fb497c..915a3b6eb0 100644--- a/packages/media-parser/src/containers/iso-base-media/get-seeking-from-mp4.ts+++ b/packages/media-parser/src/containers/iso-base-media/get-seeking-from-mp4.ts@@ -5,7 +5,6 @@ import {Log} from '../../log';import type {ParseMediaSrc} from '../../options';import type {ReaderInterface} from '../../readers/reader';import type {IsoBaseMediaSeekingInfo} from '../../seeking-info';-import type {SampleCallbacks} from '../../state/sample-callbacks';import type {VideoSectionState} from '../../state/video-section';import {getCurrentVideoSection,@@ -32,7 +31,6 @@ export const getSeekingByteFromIsoBaseMedia = async ({controller,readerInterface,videoSectionState,- callbacks,}: {info: IsoBaseMediaSeekingInfo;time: number;@@ -43,7 +41,6 @@ export const getSeekingByteFromIsoBaseMedia = async ({controller: MediaParserController;readerInterface: ReaderInterface;videoSectionState: VideoSectionState;- callbacks: SampleCallbacks;}): Promise<SeekResolution> => {const tracks = getTracksFromMoovBox(info.moovBox);const allTracks = [@@ -84,7 +81,7 @@ export const getSeekingByteFromIsoBaseMedia = async ({size: parentSize - 8,state: null,videoSectionState,- callbacks,+ callbacks: null,});mfraAtom.destroy();}diff --git a/packages/media-parser/src/get-seeking-info.ts b/packages/media-parser/src/get-seeking-info.tsindex 4dd58766bf..8709ae2471 100644--- a/packages/media-parser/src/get-seeking-info.ts+++ b/packages/media-parser/src/get-seeking-info.ts@@ -7,21 +7,20 @@ import type {IsoBaseMediaStructure} from './parse-result';import type {ReaderInterface} from './readers/reader';import type {SeekingInfo} from './seeking-info';import type {IsoBaseMediaState} from './state/iso-base-media/iso-state';-import type {SampleCallbacks} from './state/sample-callbacks';import type {StructureState} from './state/structure';import type {VideoSectionState} from './state/video-section';import type {SeekResolution} from './work-on-seek-request';export const getSeekingInfo = ({structureState,- isoState,mp4HeaderSegment,videoSectionState,+ isoState,}: {structureState: StructureState;- isoState: IsoBaseMediaState;mp4HeaderSegment: IsoBaseMediaStructure | null;videoSectionState: VideoSectionState;+ isoState: IsoBaseMediaState;}): SeekingInfo | null => {const structure = structureState.getStructureOrNull();@@ -51,7 +50,6 @@ export const getSeekingByte = ({controller,readerInterface,videoSectionState,- callbacks,}: {info: SeekingInfo;time: number;@@ -62,7 +60,6 @@ export const getSeekingByte = ({controller: MediaParserController;readerInterface: ReaderInterface;videoSectionState: VideoSectionState;- callbacks: SampleCallbacks;}): Promise<SeekResolution> => {if (info.type === 'iso-base-media-seeking-info') {return getSeekingByteFromIsoBaseMedia({@@ -75,7 +72,6 @@ export const getSeekingByte = ({controller,readerInterface,videoSectionState,- callbacks,});}diff --git a/packages/media-parser/src/work-on-seek-request.ts b/packages/media-parser/src/work-on-seek-request.tsindex 31f7983289..d768265e19 100644--- a/packages/media-parser/src/work-on-seek-request.ts+++ b/packages/media-parser/src/work-on-seek-request.ts@@ -24,11 +24,10 @@ const turnSeekIntoByte = async ({readerInterface,src,controller,- callbacks,- isoState,iterator,structureState,mp4HeaderSegment,+ isoState,}: {seek: Seek;videoSectionState: VideoSectionState;@@ -37,11 +36,10 @@ const turnSeekIntoByte = async ({src: ParseMediaSrc;readerInterface: ReaderInterface;controller: MediaParserController;- callbacks: SampleCallbacks;- isoState: IsoBaseMediaState;iterator: BufferIterator;structureState: StructureState;mp4HeaderSegment: IsoBaseMediaStructure | null;+ isoState: IsoBaseMediaState;}): Promise<SeekResolution> => {const videoSections = videoSectionState.getVideoSections();if (videoSections.length === 0) {@@ -54,9 +52,9 @@ const turnSeekIntoByte = async ({if (seek.type === 'keyframe-before-time-in-seconds') {const seekingInfo = getSeekingInfo({structureState,- isoState,mp4HeaderSegment,videoSectionState,+ isoState,});if (!seekingInfo) {Log.trace(logLevel, 'No seeking info, cannot seek yet');@@ -75,7 +73,6 @@ const turnSeekIntoByte = async ({controller,readerInterface,videoSectionState,- callbacks,});return seekingByte;@@ -142,11 +139,10 @@ export const workOnSeekRequest = async ({src,readerInterface,controller,- callbacks,- isoState,iterator,structureState,mp4HeaderSegment,+ isoState,});Log.trace(logLevel, `Seek action: ${JSON.stringify(resolution)}`);