@remotion/media-parser 4.0.537 → 4.0.538

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/aac-codecprivate.d.ts +2 -2
  2. package/dist/containers/avc/interpret-sps.js +2 -1
  3. package/dist/containers/avc/key.d.ts +1 -1
  4. package/dist/containers/flac/get-block-size.d.ts +1 -1
  5. package/dist/containers/flac/get-sample-rate.d.ts +1 -1
  6. package/dist/containers/flac/get-sample-rate.js +2 -1
  7. package/dist/containers/flac/parse-flac-frame.js +2 -1
  8. package/dist/containers/iso-base-media/collect-sample-positions-from-trak.d.ts +1 -1
  9. package/dist/containers/iso-base-media/find-track-to-seek.d.ts +1 -1
  10. package/dist/containers/iso-base-media/get-video-codec-from-iso-track.d.ts +1 -1
  11. package/dist/containers/iso-base-media/make-track.js +4 -3
  12. package/dist/containers/mp3/samples-per-mpeg-file.d.ts +1 -1
  13. package/dist/containers/riff/convert-queued-sample-to-mediaparser-sample.d.ts +4 -4
  14. package/dist/containers/riff/convert-queued-sample-to-mediaparser-sample.js +2 -1
  15. package/dist/containers/riff/has-index.js +2 -1
  16. package/dist/containers/riff/seeking-hints.js +2 -1
  17. package/dist/containers/transport-stream/process-audio.js +4 -2
  18. package/dist/containers/webm/seek/get-seeking-byte.js +4 -3
  19. package/dist/containers/webm/segments/all-segments.d.ts +563 -563
  20. package/dist/containers/webm/segments/block-simple-block-flags.d.ts +1 -1
  21. package/dist/containers/webm/traversal.js +2 -1
  22. package/dist/controller/emitter.js +5 -5
  23. package/dist/download-and-parse-media.js +2 -1
  24. package/dist/emit-available-info.js +31 -30
  25. package/dist/esm/index.mjs +1 -1
  26. package/dist/get-duration.d.ts +1 -1
  27. package/dist/get-duration.js +2 -1
  28. package/dist/get-fps.js +2 -1
  29. package/dist/get-number-of-audio-channels.js +2 -1
  30. package/dist/get-sample-rate.js +2 -1
  31. package/dist/get-tracks.js +2 -1
  32. package/dist/get-video-codec.js +2 -1
  33. package/dist/index.d.ts +454 -1056
  34. package/dist/log.d.ts +6 -6
  35. package/dist/metadata/metadata-from-iso.js +2 -1
  36. package/dist/register-track.d.ts +2 -2
  37. package/dist/state/iso-base-media/cached-sample-positions.js +2 -1
  38. package/dist/state/m3u-state.d.ts +2 -2
  39. package/dist/state/matroska/lazy-cues-fetch.js +4 -3
  40. package/dist/state/matroska/webm.d.ts +1 -1
  41. package/dist/state/parser-state.d.ts +37 -43
  42. package/dist/state/riff/lazy-idx1-fetch.d.ts +2 -2
  43. package/dist/state/riff/sample-counter.js +2 -1
  44. package/dist/state/riff.d.ts +2 -2
  45. package/dist/state/transport-stream/last-emitted-sample.d.ts +1 -1
  46. package/dist/state/transport-stream/observed-pes-header.d.ts +1 -1
  47. package/dist/state/transport-stream/transport-stream.d.ts +1 -1
  48. package/dist/state/video-section.d.ts +4 -10
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/package.json +6 -6
package/dist/log.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export declare const logLevels: readonly ["trace", "verbose", "info", "warn", "error"];
1
+ export declare const logLevels: readonly ['trace', 'verbose', 'info', 'warn', 'error'];
2
2
  export type MediaParserLogLevel = (typeof logLevels)[number];
3
3
  export declare const isEqualOrBelowLogLevel: (currentLevel: MediaParserLogLevel, level: MediaParserLogLevel) => boolean;
4
4
  export declare const Log: {
5
- trace: (logLevel: MediaParserLogLevel, message?: any, ...optionalParams: any[]) => void;
6
- verbose: (logLevel: MediaParserLogLevel, message?: any, ...optionalParams: any[]) => void;
7
- info: (logLevel: MediaParserLogLevel, message?: any, ...optionalParams: any[]) => void;
8
- warn: (logLevel: MediaParserLogLevel, message?: any, ...optionalParams: any[]) => void;
9
- error: (message?: any, ...optionalParams: any[]) => void;
5
+ trace: (logLevel: MediaParserLogLevel, ...args: Parameters<typeof console.log>) => void;
6
+ verbose: (logLevel: MediaParserLogLevel, ...args: Parameters<typeof console.log>) => void;
7
+ info: (logLevel: MediaParserLogLevel, ...args: Parameters<typeof console.log>) => void;
8
+ warn: (logLevel: MediaParserLogLevel, ...args: Parameters<typeof console.log>) => void;
9
+ error: (...args: Parameters<typeof console.log>) => void;
10
10
  };
@@ -116,7 +116,8 @@ const parseIsoMetaBox = (meta, trackId) => {
116
116
  };
117
117
  exports.parseIsoMetaBox = parseIsoMetaBox;
118
118
  const getMetadataFromIsoBase = (state) => {
119
- var _a, _b;
119
+ var _a;
120
+ var _b;
120
121
  const moov = (0, traversal_1.getMoovBoxFromState)({
121
122
  structureState: state.structure,
122
123
  isoState: state.iso,
@@ -10,7 +10,7 @@ export declare const registerVideoTrack: ({ track, container, logLevel, onVideoT
10
10
  container: MediaParserContainer;
11
11
  logLevel: MediaParserLogLevel;
12
12
  onVideoTrack: MediaParserOnVideoTrack | null;
13
- registerVideoSampleCallback: CallbacksState["registerVideoSampleCallback"];
13
+ registerVideoSampleCallback: CallbacksState['registerVideoSampleCallback'];
14
14
  tracks: TracksState;
15
15
  }) => Promise<import("./webcodec-sample-types").MediaParserOnVideoSample | null>;
16
16
  export declare const registerAudioTrack: ({ track, container, tracks, logLevel, onAudioTrack, registerAudioSampleCallback, }: {
@@ -19,7 +19,7 @@ export declare const registerAudioTrack: ({ track, container, tracks, logLevel,
19
19
  tracks: TracksState;
20
20
  logLevel: MediaParserLogLevel;
21
21
  onAudioTrack: MediaParserOnAudioTrack | null;
22
- registerAudioSampleCallback: CallbacksState["registerAudioSampleCallback"];
22
+ registerAudioSampleCallback: CallbacksState['registerAudioSampleCallback'];
23
23
  }) => Promise<import("./webcodec-sample-types").MediaParserOnAudioSample | null>;
24
24
  export declare const registerVideoTrackWhenProfileIsAvailable: ({ state, track, container, }: {
25
25
  state: ParserState;
@@ -8,7 +8,8 @@ const get_tracks_1 = require("../../get-tracks");
8
8
  const log_1 = require("../../log");
9
9
  const precomputed_tfra_1 = require("./precomputed-tfra");
10
10
  const calculateSamplePositions = ({ state, mediaSectionStart, trackIds, }) => {
11
- var _a, _b;
11
+ var _a;
12
+ var _b;
12
13
  const tracks = (0, get_tracks_1.getTracks)(state, true);
13
14
  const moofBoxes = (0, traversal_1.getMoofBoxes)(state.structure.getIsoStructure().boxes);
14
15
  const tfraBoxes = (0, precomputed_tfra_1.deduplicateTfraBoxesByOffset)([
@@ -49,8 +49,8 @@ export declare const m3uState: (logLevel: MediaParserLogLevel) => {
49
49
  addAudioStreamToConsider: (src: string, callback: MediaParserOnAudioSample) => void;
50
50
  hasAudioStreamToConsider: (src: string) => boolean;
51
51
  hasVideoStreamToConsider: (src: string) => boolean;
52
- addAudioSample: (src: string, sample: import("../webcodec-sample-types").MediaParserAudioSample) => Promise<void>;
53
- addVideoSample: (src: string, sample: import("../webcodec-sample-types").MediaParserVideoSample) => Promise<void>;
52
+ addAudioSample: (src: string, sample: import("..").MediaParserAudioSample) => Promise<void>;
53
+ addVideoSample: (src: string, sample: import("..").MediaParserVideoSample) => Promise<void>;
54
54
  getNextStreamToRun: (streams: string[]) => string;
55
55
  };
56
56
  setMp4HeaderSegment: (playlistUrl: string, structure: IsoBaseMediaStructure) => void;
@@ -71,9 +71,10 @@ const lazyCuesFetch = ({ controller, logLevel, readerInterface, src, prefetchCac
71
71
  return null;
72
72
  };
73
73
  const setFromSeekingHints = (hints) => {
74
- var _a, _b, _c, _d;
75
- result = (_b = (_a = hints.loadedCues) === null || _a === void 0 ? void 0 : _a.cues) !== null && _b !== void 0 ? _b : null;
76
- sOffset = (_d = (_c = hints.loadedCues) === null || _c === void 0 ? void 0 : _c.segmentOffset) !== null && _d !== void 0 ? _d : null;
74
+ var _a, _b;
75
+ var _c, _d;
76
+ result = (_c = (_a = hints.loadedCues) === null || _a === void 0 ? void 0 : _a.cues) !== null && _c !== void 0 ? _c : null;
77
+ sOffset = (_d = (_b = hints.loadedCues) === null || _b === void 0 ? void 0 : _b.segmentOffset) !== null && _d !== void 0 ? _d : null;
77
78
  };
78
79
  return {
79
80
  triggerLoad,
@@ -44,7 +44,7 @@ export declare const webmState: ({ controller, logLevel, readerInterface, src, p
44
44
  setTimeStampMapForSeekingHints: (newTimestampMap: Map<number, number>) => void;
45
45
  getTimescale: () => number;
46
46
  setTimescale: (newTimescale: number) => void;
47
- addSegment: (seg: Omit<SegmentSection, "index">) => void;
47
+ addSegment: (seg: Omit<SegmentSection, 'index'>) => void;
48
48
  addCluster: (cluster: ClusterSection) => void;
49
49
  getFirstCluster: () => ClusterSection | undefined;
50
50
  isInsideSegment: (iterator: BufferIterator) => SegmentSection | null;
@@ -76,15 +76,15 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
76
76
  videoTrackIndex: number | null;
77
77
  } | null;
78
78
  setFromSeekingHints: (hints: import("../containers/riff/seeking-hints").RiffSeekingHints) => void;
79
- waitForLoaded: () => Promise<{
79
+ waitForLoaded: () => Promise<null> | Promise<{
80
80
  entries: import("../containers/riff/riff-box").Idx1Entry[];
81
81
  videoTrackIndex: number | null;
82
- }> | Promise<null>;
82
+ }>;
83
83
  };
84
84
  sampleCounter: {
85
- onAudioSample: (trackId: number, audioSample: import("../webcodec-sample-types").MediaParserAudioSample) => void;
85
+ onAudioSample: (trackId: number, audioSample: import("..").MediaParserAudioSample) => void;
86
86
  onVideoSample: ({ trackId, videoSample, }: {
87
- videoSample: import("../webcodec-sample-types").MediaParserVideoSample;
87
+ videoSample: import("..").MediaParserVideoSample;
88
88
  trackId: number;
89
89
  }) => void;
90
90
  getSampleCountForTrack: ({ trackId }: {
@@ -128,8 +128,8 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
128
128
  };
129
129
  resetBeforeSeek: () => void;
130
130
  lastEmittedSample: {
131
- setLastEmittedSample: (sample: import("../webcodec-sample-types").MediaParserAudioSample | import("../webcodec-sample-types").MediaParserVideoSample) => void;
132
- getLastEmittedSample: () => import("../webcodec-sample-types").MediaParserVideoSample | import("../webcodec-sample-types").MediaParserAudioSample | null;
131
+ setLastEmittedSample: (sample: import("..").MediaParserAudioSample | import("..").MediaParserVideoSample) => void;
132
+ getLastEmittedSample: () => import("..").MediaParserAudioSample | import("..").MediaParserVideoSample | null;
133
133
  resetLastEmittedSample: () => void;
134
134
  };
135
135
  };
@@ -154,7 +154,7 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
154
154
  setTimeStampMapForSeekingHints: (newTimestampMap: Map<number, number>) => void;
155
155
  getTimescale: () => number;
156
156
  setTimescale: (newTimescale: number) => void;
157
- addSegment: (seg: Omit<import("./matroska/webm").SegmentSection, "index">) => void;
157
+ addSegment: (seg: Omit<import("./matroska/webm").SegmentSection, 'index'>) => void;
158
158
  addCluster: (cluster: import("./matroska/webm").ClusterSection) => void;
159
159
  getFirstCluster: () => import("./matroska/webm").ClusterSection | undefined;
160
160
  isInsideSegment: (iterator: BufferIterator) => import("./matroska/webm").SegmentSection | null;
@@ -247,10 +247,10 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
247
247
  m3u: {
248
248
  setSelectedMainPlaylist: (stream: import("./m3u-state").M3uStreamOrInitialUrl) => void;
249
249
  getSelectedMainPlaylist: () => import("./m3u-state").M3uStreamOrInitialUrl | null;
250
- setHasEmittedVideoTrack: (src: string, callback: import("../webcodec-sample-types").MediaParserOnVideoSample | null) => void;
251
- hasEmittedVideoTrack: (src: string) => false | import("../webcodec-sample-types").MediaParserOnVideoSample | null;
252
- setHasEmittedAudioTrack: (src: string, callback: import("../webcodec-sample-types").MediaParserOnAudioSample | null) => void;
253
- hasEmittedAudioTrack: (src: string) => false | import("../webcodec-sample-types").MediaParserOnAudioSample | null;
250
+ setHasEmittedVideoTrack: (src: string, callback: import("..").MediaParserOnVideoSample | null) => void;
251
+ hasEmittedVideoTrack: (src: string) => false | import("..").MediaParserOnVideoSample | null;
252
+ setHasEmittedAudioTrack: (src: string, callback: import("..").MediaParserOnAudioSample | null) => void;
253
+ hasEmittedAudioTrack: (src: string) => false | import("..").MediaParserOnAudioSample | null;
254
254
  setHasEmittedDoneWithTracks: (src: string) => void;
255
255
  hasEmittedDoneWithTracks: (src: string) => boolean;
256
256
  setReadyToIterateOverM3u: () => void;
@@ -273,12 +273,12 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
273
273
  sampleSorter: {
274
274
  clearSamples: () => void;
275
275
  addToStreamWithTrack: (src: string) => void;
276
- addVideoStreamToConsider: (src: string, callback: import("../webcodec-sample-types").MediaParserOnVideoSample) => void;
277
- addAudioStreamToConsider: (src: string, callback: import("../webcodec-sample-types").MediaParserOnAudioSample) => void;
276
+ addVideoStreamToConsider: (src: string, callback: import("..").MediaParserOnVideoSample) => void;
277
+ addAudioStreamToConsider: (src: string, callback: import("..").MediaParserOnAudioSample) => void;
278
278
  hasAudioStreamToConsider: (src: string) => boolean;
279
279
  hasVideoStreamToConsider: (src: string) => boolean;
280
- addAudioSample: (src: string, sample: import("../webcodec-sample-types").MediaParserAudioSample) => Promise<void>;
281
- addVideoSample: (src: string, sample: import("../webcodec-sample-types").MediaParserVideoSample) => Promise<void>;
280
+ addAudioSample: (src: string, sample: import("..").MediaParserAudioSample) => Promise<void>;
281
+ addVideoSample: (src: string, sample: import("..").MediaParserVideoSample) => Promise<void>;
282
282
  getNextStreamToRun: (streams: string[]) => string;
283
283
  };
284
284
  setMp4HeaderSegment: (playlistUrl: string, structure: import("../parse-result").IsoBaseMediaStructure) => void;
@@ -301,20 +301,20 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
301
301
  timeInParseLoop: number;
302
302
  };
303
303
  callbacks: {
304
- registerVideoSampleCallback: (id: number, callback: import("../webcodec-sample-types").MediaParserOnVideoSample | null) => Promise<void>;
304
+ registerVideoSampleCallback: (id: number, callback: import("..").MediaParserOnVideoSample | null) => Promise<void>;
305
305
  onAudioSample: ({ audioSample, trackId, }: {
306
306
  trackId: number;
307
- audioSample: import("../webcodec-sample-types").MediaParserAudioSample;
307
+ audioSample: import("..").MediaParserAudioSample;
308
308
  }) => Promise<void>;
309
309
  onVideoSample: ({ trackId, videoSample, }: {
310
310
  trackId: number;
311
- videoSample: import("../webcodec-sample-types").MediaParserVideoSample;
311
+ videoSample: import("..").MediaParserVideoSample;
312
312
  }) => Promise<void>;
313
313
  canSkipTracksState: {
314
314
  doFieldsNeedTracks: () => boolean;
315
315
  canSkipTracks: () => boolean;
316
316
  };
317
- registerAudioSampleCallback: (id: number, callback: import("../webcodec-sample-types").MediaParserOnAudioSample | null) => Promise<void>;
317
+ registerAudioSampleCallback: (id: number, callback: import("..").MediaParserOnAudioSample | null) => Promise<void>;
318
318
  tracks: {
319
319
  hasAllTracks: () => boolean;
320
320
  getIsDone: () => boolean;
@@ -323,8 +323,8 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
323
323
  getTracks: () => import("..").MediaParserTrack[];
324
324
  ensureHasTracksAtEnd: (fields: Options<ParseMediaFields>) => void;
325
325
  };
326
- audioSampleCallbacks: Record<number, import("../webcodec-sample-types").MediaParserOnAudioSample>;
327
- videoSampleCallbacks: Record<number, import("../webcodec-sample-types").MediaParserOnVideoSample>;
326
+ audioSampleCallbacks: Record<number, import("..").MediaParserOnAudioSample>;
327
+ videoSampleCallbacks: Record<number, import("..").MediaParserOnVideoSample>;
328
328
  hasAudioTrackHandlers: boolean;
329
329
  hasVideoTrackHandlers: boolean;
330
330
  callTracksDoneCallback: () => Promise<void>;
@@ -333,9 +333,9 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
333
333
  getSkipBytes: () => number;
334
334
  increaseSkippedBytes: (bytes: number) => void;
335
335
  keyframes: {
336
- addKeyframe: (keyframe: import("../options").MediaParserKeyframe) => void;
337
- getKeyframes: () => import("../options").MediaParserKeyframe[];
338
- setFromSeekingHints: (keyframesFromHints: import("../options").MediaParserKeyframe[]) => void;
336
+ addKeyframe: (keyframe: import("..").MediaParserKeyframe) => void;
337
+ getKeyframes: () => import("..").MediaParserKeyframe[];
338
+ setFromSeekingHints: (keyframesFromHints: import("..").MediaParserKeyframe[]) => void;
339
339
  };
340
340
  structure: {
341
341
  getStructureOrNull: () => import("../parse-result").MediaParserStructureUnstable | null;
@@ -352,11 +352,11 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
352
352
  };
353
353
  onAudioTrack: MediaParserOnAudioTrack | null;
354
354
  onVideoTrack: MediaParserOnVideoTrack | null;
355
- emittedFields: import("../fields").AllOptions<ParseMediaFields>;
356
- fields: Partial<import("../fields").AllOptions<ParseMediaFields>>;
355
+ emittedFields: import("..").AllOptions<ParseMediaFields>;
356
+ fields: Partial<import("..").AllOptions<ParseMediaFields>>;
357
357
  samplesObserved: {
358
- addVideoSample: (videoSample: import("../webcodec-sample-types").MediaParserVideoSample) => void;
359
- addAudioSample: (audioSample: import("../webcodec-sample-types").MediaParserAudioSample) => void;
358
+ addVideoSample: (videoSample: import("..").MediaParserVideoSample) => void;
359
+ addAudioSample: (audioSample: import("..").MediaParserAudioSample) => void;
360
360
  getSlowDurationInSeconds: () => number;
361
361
  getFps: () => number;
362
362
  getSlowNumberOfFrames: () => number;
@@ -374,19 +374,13 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
374
374
  mediaSection: {
375
375
  addMediaSection: (section: import("./video-section").MediaSection) => void;
376
376
  getMediaSections: () => import("./video-section").MediaSection[];
377
- isCurrentByteInMediaSection: (iterator: BufferIterator) => "no-section-defined" | "in-section" | "outside-section";
378
- isByteInMediaSection: ({ position, mediaSections, }: {
379
- position: number;
380
- mediaSections: import("./video-section").MediaSection[];
381
- }) => "no-section-defined" | "in-section" | "outside-section";
382
- getCurrentMediaSection: ({ offset, mediaSections, }: {
383
- offset: number;
384
- mediaSections: import("./video-section").MediaSection[];
385
- }) => import("./video-section").MediaSection | null;
377
+ isCurrentByteInMediaSection: (iterator: BufferIterator) => 'no-section-defined' | 'in-section' | 'outside-section';
378
+ isByteInMediaSection: typeof import("./video-section").isByteInMediaSection;
379
+ getCurrentMediaSection: typeof import("./video-section").getCurrentMediaSection;
386
380
  getMediaSectionAssertOnlyOne: () => import("./video-section").MediaSection;
387
381
  mediaSections: import("./video-section").MediaSection[];
388
382
  };
389
- logLevel: "trace" | "verbose" | "info" | "warn" | "error";
383
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
390
384
  iterator: {
391
385
  startReadingBits: () => void;
392
386
  stopReadingBits: () => void;
@@ -485,13 +479,13 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
485
479
  internalStats: InternalStats;
486
480
  size: number | null;
487
481
  name: string;
488
- container: import("../options").MediaParserContainer;
482
+ container: import("..").MediaParserContainer;
489
483
  isHdr: boolean;
490
484
  metadata: import("..").MediaParserMetadataEntry[];
491
485
  location: import("..").MediaParserLocation | null;
492
486
  mimeType: string | null;
493
- keyframes: import("../options").MediaParserKeyframe[] | null;
494
- slowKeyframes: import("../options").MediaParserKeyframe[];
487
+ keyframes: import("..").MediaParserKeyframe[] | null;
488
+ slowKeyframes: import("..").MediaParserKeyframe[];
495
489
  images: import("./images").MediaParserEmbeddedImage[];
496
490
  sampleRate: number | null;
497
491
  numberOfAudioChannels: number | null;
@@ -499,8 +493,8 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
499
493
  slowAudioBitrate: number | null;
500
494
  m3uStreams: import("..").M3uStream[] | null;
501
495
  };
502
- callbackFunctions: Partial<import("../options").ParseMediaCallbacksMandatory>;
503
- fieldsInReturnValue: Partial<import("../fields").AllOptions<ParseMediaFields>>;
496
+ callbackFunctions: Partial<import("..").ParseMediaCallbacksMandatory>;
497
+ fieldsInReturnValue: Partial<import("..").AllOptions<ParseMediaFields>>;
504
498
  mimeType: string | null;
505
499
  errored: Error | null;
506
500
  currentReader: {
@@ -25,9 +25,9 @@ export declare const lazyIdx1Fetch: ({ controller, logLevel, readerInterface, sr
25
25
  videoTrackIndex: number | null;
26
26
  } | null;
27
27
  setFromSeekingHints: (hints: RiffSeekingHints) => void;
28
- waitForLoaded: () => Promise<{
28
+ waitForLoaded: () => Promise<null> | Promise<{
29
29
  entries: import("../../containers/riff/riff-box").Idx1Entry[];
30
30
  videoTrackIndex: number | null;
31
- }> | Promise<null>;
31
+ }>;
32
32
  };
33
33
  export type LazyIdx1Fetch = ReturnType<typeof lazyIdx1Fetch>;
@@ -58,7 +58,8 @@ const riffSampleCounter = () => {
58
58
  return pocsAtKeyframeOffset[keyframeOffset];
59
59
  };
60
60
  const getKeyframeAtOffset = (sample) => {
61
- var _a, _b;
61
+ var _a;
62
+ var _b;
62
63
  if (sample.type === 'key') {
63
64
  return sample.offset;
64
65
  }
@@ -48,10 +48,10 @@ export declare const riffSpecificState: ({ controller, logLevel, readerInterface
48
48
  videoTrackIndex: number | null;
49
49
  } | null;
50
50
  setFromSeekingHints: (hints: import("../containers/riff/seeking-hints").RiffSeekingHints) => void;
51
- waitForLoaded: () => Promise<{
51
+ waitForLoaded: () => Promise<null> | Promise<{
52
52
  entries: import("../containers/riff/riff-box").Idx1Entry[];
53
53
  videoTrackIndex: number | null;
54
- }> | Promise<null>;
54
+ }>;
55
55
  };
56
56
  sampleCounter: {
57
57
  onAudioSample: (trackId: number, audioSample: import("..").MediaParserAudioSample) => void;
@@ -1,6 +1,6 @@
1
1
  import type { MediaParserAudioSample, MediaParserVideoSample } from '../../webcodec-sample-types';
2
2
  export declare const lastEmittedSampleState: () => {
3
3
  setLastEmittedSample: (sample: MediaParserAudioSample | MediaParserVideoSample) => void;
4
- getLastEmittedSample: () => MediaParserVideoSample | MediaParserAudioSample | null;
4
+ getLastEmittedSample: () => MediaParserAudioSample | MediaParserVideoSample | null;
5
5
  resetLastEmittedSample: () => void;
6
6
  };
@@ -9,7 +9,7 @@ export declare const makeObservedPesHeader: () => {
9
9
  };
10
10
  export type ObservedPesHeaderState = ReturnType<typeof makeObservedPesHeader>;
11
11
  export declare const getLastKeyFrameBeforeTimeInSeconds: ({ observedPesHeaders, timeInSeconds, ptsStartOffset, }: {
12
- observedPesHeaders: ObservedPesHeaderState["pesHeaders"];
12
+ observedPesHeaders: ObservedPesHeaderState['pesHeaders'];
13
13
  timeInSeconds: number;
14
14
  ptsStartOffset: number;
15
15
  }) => PacketPes | undefined;
@@ -22,7 +22,7 @@ export declare const transportStreamState: () => {
22
22
  resetBeforeSeek: () => void;
23
23
  lastEmittedSample: {
24
24
  setLastEmittedSample: (sample: import("../..").MediaParserAudioSample | import("../..").MediaParserVideoSample) => void;
25
- getLastEmittedSample: () => import("../..").MediaParserVideoSample | import("../..").MediaParserAudioSample | null;
25
+ getLastEmittedSample: () => import("../..").MediaParserAudioSample | import("../..").MediaParserVideoSample | null;
26
26
  resetLastEmittedSample: () => void;
27
27
  };
28
28
  };
@@ -11,7 +11,7 @@ export type MediaSection = {
11
11
  export declare const isByteInMediaSection: ({ position, mediaSections, }: {
12
12
  position: number;
13
13
  mediaSections: MediaSection[];
14
- }) => "no-section-defined" | "in-section" | "outside-section";
14
+ }) => 'no-section-defined' | 'in-section' | 'outside-section';
15
15
  export declare const getCurrentMediaSection: ({ offset, mediaSections, }: {
16
16
  offset: number;
17
17
  mediaSections: MediaSection[];
@@ -19,15 +19,9 @@ export declare const getCurrentMediaSection: ({ offset, mediaSections, }: {
19
19
  export declare const mediaSectionState: () => {
20
20
  addMediaSection: (section: MediaSection) => void;
21
21
  getMediaSections: () => MediaSection[];
22
- isCurrentByteInMediaSection: (iterator: BufferIterator) => "no-section-defined" | "in-section" | "outside-section";
23
- isByteInMediaSection: ({ position, mediaSections, }: {
24
- position: number;
25
- mediaSections: MediaSection[];
26
- }) => "no-section-defined" | "in-section" | "outside-section";
27
- getCurrentMediaSection: ({ offset, mediaSections, }: {
28
- offset: number;
29
- mediaSections: MediaSection[];
30
- }) => MediaSection | null;
22
+ isCurrentByteInMediaSection: (iterator: BufferIterator) => 'no-section-defined' | 'in-section' | 'outside-section';
23
+ isByteInMediaSection: typeof isByteInMediaSection;
24
+ getCurrentMediaSection: typeof getCurrentMediaSection;
31
25
  getMediaSectionAssertOnlyOne: () => MediaSection;
32
26
  mediaSections: MediaSection[];
33
27
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.537";
1
+ export declare const VERSION = "4.0.538";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '4.0.537';
5
+ exports.VERSION = '4.0.538';
package/package.json CHANGED
@@ -3,23 +3,23 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/media-parser"
4
4
  },
5
5
  "name": "@remotion/media-parser",
6
- "version": "4.0.537",
6
+ "version": "4.0.538",
7
7
  "main": "dist/index.js",
8
8
  "scripts": {
9
9
  "formatting": "oxfmt src --check",
10
10
  "format": "oxfmt src",
11
11
  "lint": "eslint src",
12
- "make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts",
12
+ "make": "tsc -d && bun --env-file=../.env.bundle bundle.ts",
13
13
  "prepublishOnly": "bun ensure-correct-version.ts"
14
14
  },
15
15
  "devDependencies": {
16
- "@remotion/example-videos": "4.0.537",
16
+ "@remotion/example-videos": "4.0.538",
17
17
  "@types/wicg-file-system-access": "2023.10.5",
18
- "@remotion/eslint-config-internal": "4.0.537",
18
+ "@remotion/eslint-config-internal": "4.0.538",
19
19
  "eslint": "9.19.0",
20
- "mediabunny": "1.61.6",
20
+ "mediabunny": "1.62.0",
21
21
  "@types/bun": "1.4.2",
22
- "@typescript/native-preview": "7.0.0-dev.20260217.1"
22
+ "typescript": "7.1.0-beta"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"