@remotion/media-parser 4.0.237 → 4.0.239

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 (106) hide show
  1. package/dist/aac-codecprivate.d.ts +2 -9
  2. package/dist/aac-codecprivate.js +69 -34
  3. package/dist/add-avc-profile-to-track.js +4 -23
  4. package/dist/boxes/avc/codec-private.d.ts +2 -0
  5. package/dist/boxes/avc/codec-private.js +28 -0
  6. package/dist/boxes/avc/codec-string.d.ts +2 -0
  7. package/dist/boxes/avc/codec-string.js +7 -0
  8. package/dist/boxes/avc/color.d.ts +6 -0
  9. package/dist/boxes/avc/color.js +39 -0
  10. package/dist/boxes/avc/interpret-sps.d.ts +11 -0
  11. package/dist/boxes/avc/interpret-sps.js +44 -0
  12. package/dist/boxes/avc/key.d.ts +2 -0
  13. package/dist/boxes/avc/key.js +11 -0
  14. package/dist/boxes/avc/parse-avc.d.ts +36 -3
  15. package/dist/boxes/avc/parse-avc.js +161 -4
  16. package/dist/boxes/avc/sps-and-pps.d.ts +3 -0
  17. package/dist/boxes/avc/sps-and-pps.js +12 -0
  18. package/dist/boxes/iso-base-media/get-video-codec-from-iso-track.d.ts +2 -0
  19. package/dist/boxes/iso-base-media/get-video-codec-from-iso-track.js +55 -0
  20. package/dist/boxes/iso-base-media/make-track.js +2 -1
  21. package/dist/boxes/iso-base-media/mdat/mdat.js +8 -14
  22. package/dist/boxes/iso-base-media/process-box.js +1 -1
  23. package/dist/boxes/riff/parse-box.js +2 -2
  24. package/dist/boxes/riff/parse-movi.js +12 -14
  25. package/dist/boxes/transport-stream/adts-header.d.ts +7 -0
  26. package/dist/boxes/transport-stream/adts-header.js +56 -0
  27. package/dist/boxes/transport-stream/boxes.d.ts +41 -0
  28. package/dist/boxes/transport-stream/boxes.js +2 -0
  29. package/dist/boxes/transport-stream/discard-rest-of-packet.d.ts +3 -0
  30. package/dist/boxes/transport-stream/discard-rest-of-packet.js +13 -0
  31. package/dist/boxes/transport-stream/find-separator.d.ts +2 -0
  32. package/dist/boxes/transport-stream/find-separator.js +30 -0
  33. package/dist/boxes/transport-stream/get-tracks.d.ts +5 -0
  34. package/dist/boxes/transport-stream/get-tracks.js +33 -0
  35. package/dist/boxes/transport-stream/handle-aac-packet.d.ts +7 -0
  36. package/dist/boxes/transport-stream/handle-aac-packet.js +50 -0
  37. package/dist/boxes/transport-stream/handle-avc-packet.d.ts +8 -0
  38. package/dist/boxes/transport-stream/handle-avc-packet.js +60 -0
  39. package/dist/boxes/transport-stream/next-pes-header-store.d.ts +6 -0
  40. package/dist/boxes/transport-stream/next-pes-header-store.js +18 -0
  41. package/dist/boxes/transport-stream/parse-packet.d.ts +13 -0
  42. package/dist/boxes/transport-stream/parse-packet.js +80 -0
  43. package/dist/boxes/transport-stream/parse-pat.d.ts +8 -0
  44. package/dist/boxes/transport-stream/parse-pat.js +49 -0
  45. package/dist/boxes/transport-stream/parse-pes.d.ts +8 -0
  46. package/dist/boxes/transport-stream/parse-pes.js +76 -0
  47. package/dist/boxes/transport-stream/parse-pmt.d.ts +11 -0
  48. package/dist/boxes/transport-stream/parse-pmt.js +64 -0
  49. package/dist/boxes/transport-stream/parse-stream-packet.d.ts +15 -0
  50. package/dist/boxes/transport-stream/parse-stream-packet.js +107 -0
  51. package/dist/boxes/transport-stream/parse-transport-stream.d.ts +14 -0
  52. package/dist/boxes/transport-stream/parse-transport-stream.js +72 -0
  53. package/dist/boxes/transport-stream/process-stream-buffers.d.ts +19 -0
  54. package/dist/boxes/transport-stream/process-stream-buffers.js +42 -0
  55. package/dist/boxes/transport-stream/traversal.d.ts +6 -0
  56. package/dist/boxes/transport-stream/traversal.js +30 -0
  57. package/dist/boxes/webm/parse-ebml.js +1 -1
  58. package/dist/buffer-iterator.d.ts +2 -0
  59. package/dist/buffer-iterator.js +25 -0
  60. package/dist/convert-audio-or-video-sample.d.ts +2 -0
  61. package/dist/convert-audio-or-video-sample.js +17 -0
  62. package/dist/create/iso-base-media/create-iso-base-media.js +38 -19
  63. package/dist/create/iso-base-media/trak/mdia/minf/create-stbl.js +7 -1
  64. package/dist/create/iso-base-media/trak/mdia/minf/stbl/create-stts.js +3 -0
  65. package/dist/create/media-fn.d.ts +0 -1
  66. package/dist/create/progress-tracker.d.ts +2 -0
  67. package/dist/create/progress-tracker.js +32 -8
  68. package/dist/emit-available-info.js +1 -1
  69. package/dist/esm/index.mjs +1288 -252
  70. package/dist/get-container.d.ts +1 -1
  71. package/dist/get-container.js +3 -0
  72. package/dist/get-duration.js +4 -1
  73. package/dist/get-fps.js +8 -2
  74. package/dist/get-tracks.d.ts +4 -3
  75. package/dist/get-tracks.js +9 -2
  76. package/dist/get-video-codec.d.ts +1 -2
  77. package/dist/get-video-codec.js +9 -148
  78. package/dist/index.d.ts +2 -0
  79. package/dist/metadata/get-metadata.js +3 -0
  80. package/dist/options.d.ts +3 -3
  81. package/dist/parse-media.js +3 -3
  82. package/dist/parse-result.d.ts +7 -2
  83. package/dist/parse-video.js +15 -0
  84. package/dist/register-track.d.ts +5 -5
  85. package/dist/register-track.js +16 -10
  86. package/dist/state/has-tracks-section.d.ts +3 -0
  87. package/dist/state/has-tracks-section.js +5 -0
  88. package/dist/state/parser-state.d.ts +2 -0
  89. package/dist/version.d.ts +1 -1
  90. package/dist/version.js +1 -1
  91. package/dist/webcodec-sample-types.d.ts +9 -2
  92. package/package.json +3 -3
  93. package/dist/add-new-matroska-tracks.d.ts +0 -13
  94. package/dist/add-new-matroska-tracks.js +0 -29
  95. package/dist/boxes/iso-base-media/meta/keys.d.ts +0 -10
  96. package/dist/boxes/iso-base-media/meta/keys.js +0 -17
  97. package/dist/boxes/iso-base-media/meta/list.d.ts +0 -12
  98. package/dist/boxes/iso-base-media/meta/list.js +0 -33
  99. package/dist/boxes/riff/strf.d.ts +0 -7
  100. package/dist/boxes/riff/strf.js +0 -67
  101. package/dist/create/mp3/create-mp3.d.ts +0 -2
  102. package/dist/create/mp3/create-mp3.js +0 -49
  103. package/dist/get-metadata.d.ts +0 -7
  104. package/dist/get-metadata.js +0 -63
  105. package/dist/parser-state.d.ts +0 -33
  106. package/dist/parser-state.js +0 -162
@@ -1,12 +0,0 @@
1
- import type { BufferIterator } from '../../../buffer-iterator';
2
- import type { BaseBox } from '../base-type';
3
- export interface HdlrBox extends BaseBox {
4
- type: 'hdlr-box';
5
- hdlrType: string;
6
- componentName: string;
7
- }
8
- export declare const parseHdlr: ({ iterator, size, offset, }: {
9
- iterator: BufferIterator;
10
- size: number;
11
- offset: number;
12
- }) => Promise<HdlrBox>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseHdlr = void 0;
4
- const parseHdlr = ({ iterator, size, offset, }) => {
5
- const box = iterator.startBox(size - 8);
6
- const version = iterator.getUint8();
7
- if (version !== 0) {
8
- throw new Error(`Unsupported hdlr version: ${version}`);
9
- }
10
- // version
11
- iterator.discard(3);
12
- // predefined
13
- iterator.discard(4);
14
- // type
15
- const hdlrType = iterator.getByteString(4);
16
- // component manufactor
17
- iterator.discard(4);
18
- // component flags
19
- iterator.discard(4);
20
- // component flags mask
21
- iterator.discard(4);
22
- // component name
23
- const componentName = iterator.readUntilNullTerminator();
24
- box.discardRest();
25
- return Promise.resolve({
26
- type: 'hdlr-box',
27
- boxSize: size,
28
- offset,
29
- hdlrType,
30
- componentName,
31
- });
32
- };
33
- exports.parseHdlr = parseHdlr;
@@ -1,7 +0,0 @@
1
- import type { BufferIterator } from '../../buffer-iterator';
2
- import type { RiffBox } from './riff-box';
3
- export declare const parseStrf: ({ iterator, size, boxes, }: {
4
- iterator: BufferIterator;
5
- size: number;
6
- boxes: RiffBox[];
7
- }) => RiffBox;
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStrf = void 0;
4
- const parseStrfAudio = ({ iterator, size, }) => {
5
- const box = iterator.startBox(size);
6
- const formatTag = iterator.getUint16Le();
7
- const numberOfChannels = iterator.getUint16Le();
8
- const samplesPerSec = iterator.getUint32Le();
9
- const avgBytesPerSec = iterator.getUint32Le();
10
- const blockAlign = iterator.getUint16Le();
11
- const bitsPerSample = iterator.getUint16Le();
12
- const cbSize = iterator.getUint16Le();
13
- box.expectNoMoreBytes();
14
- return {
15
- type: 'strf-box-audio',
16
- avgBytesPerSecond: avgBytesPerSec,
17
- bitsPerSample,
18
- blockAlign,
19
- cbSize,
20
- formatTag,
21
- numberOfChannels,
22
- sampleRate: samplesPerSec,
23
- };
24
- };
25
- const parseStrfVideo = ({ iterator, size, }) => {
26
- const box = iterator.startBox(size);
27
- const biSize = iterator.getUint32Le();
28
- const width = iterator.getInt32Le();
29
- const height = iterator.getInt32Le();
30
- const planes = iterator.getUint16Le();
31
- const bitCount = iterator.getUint16Le();
32
- const compression = iterator.getByteString(4);
33
- const sizeImage = iterator.getUint32Le();
34
- const xPelsPerMeter = iterator.getInt32Le();
35
- const yPelsPerMeter = iterator.getInt32Le();
36
- const clrUsed = iterator.getUint32Le();
37
- const clrImportant = iterator.getUint32Le();
38
- box.expectNoMoreBytes();
39
- return {
40
- type: 'strf-box-video',
41
- biSize,
42
- bitCount,
43
- clrImportant,
44
- clrUsed,
45
- compression,
46
- height,
47
- planes,
48
- sizeImage,
49
- width,
50
- xPelsPerMeter,
51
- yPelsPerMeter,
52
- };
53
- };
54
- const parseStrf = ({ iterator, size, boxes, }) => {
55
- const strh = boxes.find((b) => b.type === 'strh-box');
56
- if (!strh) {
57
- throw new Error('strh box not found');
58
- }
59
- if (strh.fccType === 'vids') {
60
- return parseStrfVideo({ iterator, size });
61
- }
62
- if (strh.fccType === 'auds') {
63
- return parseStrfAudio({ iterator, size });
64
- }
65
- throw new Error(`Unsupported fccType: ${strh.fccType}`);
66
- };
67
- exports.parseStrf = parseStrf;
@@ -1,2 +0,0 @@
1
- import type { MediaFn, MediaFnGeneratorInput } from '../media-fn';
2
- export declare const createMp3: ({ filename, logLevel, onBytesProgress, onMillisecondsProgress, writer, }: MediaFnGeneratorInput) => Promise<MediaFn>;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createMp3 = void 0;
4
- const log_1 = require("../../log");
5
- const createMp3 = async ({ filename, logLevel, onBytesProgress, onMillisecondsProgress, writer, }) => {
6
- const w = await writer.createContent({ filename, mimeType: 'audio/mpeg' });
7
- const operationProm = { current: Promise.resolve() };
8
- const addSample = async (chunk) => {
9
- var _a;
10
- await w.write(chunk.data);
11
- onMillisecondsProgress(chunk.timestamp + ((_a = chunk.duration) !== null && _a !== void 0 ? _a : 0));
12
- onBytesProgress(w.getWrittenByteCount());
13
- };
14
- const waitForFinishPromises = [];
15
- return {
16
- save: () => {
17
- return w.save();
18
- },
19
- remove: () => {
20
- return w.remove();
21
- },
22
- addSample: ({ chunk, trackNumber }) => {
23
- if (trackNumber !== 1) {
24
- throw new Error('Only one track supported for WAV');
25
- }
26
- operationProm.current = operationProm.current.then(() => addSample(chunk));
27
- return operationProm.current;
28
- },
29
- updateTrackSampleRate: () => {
30
- throw new Error('updateTrackSampleRate() not implemented for WAV encoder');
31
- },
32
- addWaitForFinishPromise(promise) {
33
- waitForFinishPromises.push(promise);
34
- },
35
- async waitForFinish() {
36
- log_1.Log.verbose(logLevel, 'All write operations queued. Waiting for finish...');
37
- await Promise.all(waitForFinishPromises.map((p) => p()));
38
- await operationProm.current;
39
- await w.waitForFinish();
40
- },
41
- addTrack: (track) => {
42
- if (track.type !== 'audio') {
43
- throw new Error('Only audio tracks supported for WAV');
44
- }
45
- return Promise.resolve({ trackNumber: 1 });
46
- },
47
- };
48
- };
49
- exports.createMp3 = createMp3;
@@ -1,7 +0,0 @@
1
- import type { Structure } from './parse-result';
2
- export type MetadataEntry = {
3
- key: string;
4
- value: string | number;
5
- trackId: number | null;
6
- };
7
- export declare const getMetadata: (structure: Structure) => MetadataEntry[];
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMetadata = void 0;
4
- const traversal_1 = require("./boxes/iso-base-media/traversal");
5
- const truthy_1 = require("./truthy");
6
- const parseIsoMetaBox = (meta, trackId) => {
7
- const ilstBox = meta.children.find((b) => b.type === 'ilst-box');
8
- const keysBox = meta.children.find((b) => b.type === 'keys-box');
9
- if (!ilstBox || !keysBox) {
10
- return [];
11
- }
12
- if (ilstBox.entries.length !== keysBox.entries.length) {
13
- throw new Error('Number of entries in ilst and keys box do not match');
14
- }
15
- const entries = [];
16
- for (let i = 0; i < ilstBox.entries.length; i++) {
17
- const ilstEntry = ilstBox.entries[i];
18
- const keysEntry = keysBox.entries[i];
19
- if (ilstEntry.value.type !== 'unknown') {
20
- entries.push({
21
- key: keysEntry.value,
22
- value: ilstEntry.value.value,
23
- trackId,
24
- });
25
- }
26
- }
27
- return entries;
28
- };
29
- const getMetadataFromIsoBase = (isoBase) => {
30
- const moov = (0, traversal_1.getMoovBox)(isoBase.boxes);
31
- if (!moov) {
32
- return [];
33
- }
34
- const traks = (0, traversal_1.getTraks)(moov);
35
- const meta = moov.children.find((b) => b.type === 'regular-box' && b.boxType === 'meta');
36
- const metaInTracks = traks
37
- .map((t) => {
38
- const metaBox = t.children.find((child) => child.type === 'regular-box' && child.boxType === 'meta');
39
- if (metaBox) {
40
- const tkhd = (0, traversal_1.getTkhdBox)(t);
41
- if (!tkhd) {
42
- throw new Error('No tkhd box found');
43
- }
44
- return parseIsoMetaBox(metaBox, tkhd.trackId);
45
- }
46
- return null;
47
- })
48
- .filter(truthy_1.truthy);
49
- if (!meta) {
50
- return metaInTracks.flat(1);
51
- }
52
- return [...parseIsoMetaBox(meta, null), ...metaInTracks.flat(1)];
53
- };
54
- const getMetadata = (structure) => {
55
- if (structure.type === 'matroska') {
56
- return [];
57
- }
58
- if (structure.type === 'riff') {
59
- return [];
60
- }
61
- return getMetadataFromIsoBase(structure);
62
- };
63
- exports.getMetadata = getMetadata;
@@ -1,33 +0,0 @@
1
- import type { AvcPPs, AvcProfileInfo } from './boxes/avc/parse-avc';
2
- import type { OnTrackEntrySegment } from './boxes/webm/segments';
3
- import type { TrackInfo } from './boxes/webm/segments/track-entry';
4
- import type { AudioOrVideoSample, OnAudioSample, OnVideoSample } from './webcodec-sample-types';
5
- export type InternalStats = {};
6
- export type SpsAndPps = {
7
- sps: AvcProfileInfo;
8
- pps: AvcPPs;
9
- };
10
- type AvcProfileInfoCallback = (profile: SpsAndPps) => Promise<void>;
11
- export declare const makeParserState: ({ hasAudioCallbacks, hasVideoCallbacks, signal, }: {
12
- hasAudioCallbacks: boolean;
13
- hasVideoCallbacks: boolean;
14
- signal: AbortSignal | undefined;
15
- }) => {
16
- onTrackEntrySegment: OnTrackEntrySegment;
17
- onProfile: (profile: SpsAndPps) => Promise<void>;
18
- registerOnAvcProfileCallback: (callback: AvcProfileInfoCallback) => void;
19
- getTrackInfoByNumber: (id: number) => TrackInfo;
20
- registerVideoSampleCallback: (id: number, callback: OnVideoSample | null) => Promise<void>;
21
- setTimestampOffset: (byteOffset: number, timestamp: number) => void;
22
- getTimestampOffsetForByteOffset: (byteOffset: number) => number | undefined;
23
- registerAudioSampleCallback: (id: number, callback: OnAudioSample | null) => Promise<void>;
24
- onAudioSample: (trackId: number, audioSample: AudioOrVideoSample) => Promise<void>;
25
- onVideoSample: (trackId: number, videoSample: AudioOrVideoSample) => Promise<void>;
26
- getInternalStats: () => {};
27
- getTimescale: () => number;
28
- setTimescale: (newTimescale: number) => void;
29
- getSamplesForTrack: (trackId: number) => number;
30
- getAvcProfile: () => SpsAndPps | null;
31
- };
32
- export type ParserState = ReturnType<typeof makeParserState>;
33
- export {};
@@ -1,162 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeParserState = void 0;
4
- const traversal_1 = require("./boxes/webm/traversal");
5
- const makeParserState = ({ hasAudioCallbacks, hasVideoCallbacks, signal, }) => {
6
- const trackEntries = {};
7
- const onTrackEntrySegment = (trackEntry) => {
8
- var _a;
9
- const trackId = (0, traversal_1.getTrackId)(trackEntry);
10
- if (!trackId) {
11
- throw new Error('Expected track id');
12
- }
13
- if (trackEntries[trackId]) {
14
- return;
15
- }
16
- const codec = (0, traversal_1.getTrackCodec)(trackEntry);
17
- if (!codec) {
18
- throw new Error('Expected codec');
19
- }
20
- const trackTimescale = (0, traversal_1.getTrackTimestampScale)(trackEntry);
21
- trackEntries[trackId] = {
22
- codec: codec.value,
23
- trackTimescale: (_a = trackTimescale === null || trackTimescale === void 0 ? void 0 : trackTimescale.value) !== null && _a !== void 0 ? _a : null,
24
- };
25
- };
26
- const videoSampleCallbacks = {};
27
- const audioSampleCallbacks = {};
28
- const queuedAudioSamples = {};
29
- const queuedVideoSamples = {};
30
- const declinedTrackNumbers = [];
31
- let timescale = null;
32
- const getTimescale = () => {
33
- // https://www.matroska.org/technical/notes.html
34
- // When using the default value of TimestampScale of “1,000,000”, one Segment Tick represents one millisecond.
35
- if (timescale === null) {
36
- return 1000000;
37
- }
38
- return timescale;
39
- };
40
- const setTimescale = (newTimescale) => {
41
- timescale = newTimescale;
42
- };
43
- const timestampMap = new Map();
44
- const setTimestampOffset = (byteOffset, timestamp) => {
45
- timestampMap.set(byteOffset, timestamp);
46
- };
47
- const getTimestampOffsetForByteOffset = (byteOffset) => {
48
- const entries = Array.from(timestampMap.entries());
49
- const sortedByByteOffset = entries
50
- .sort((a, b) => {
51
- return a[0] - b[0];
52
- })
53
- .reverse();
54
- for (const [offset, timestamp] of sortedByByteOffset) {
55
- if (offset >= byteOffset) {
56
- continue;
57
- }
58
- return timestamp;
59
- }
60
- return timestampMap.get(byteOffset);
61
- };
62
- const samplesForTrack = {};
63
- const profileCallbacks = [];
64
- const registerOnAvcProfileCallback = (callback) => {
65
- profileCallbacks.push(callback);
66
- };
67
- let avcProfile = null;
68
- const onProfile = async (profile) => {
69
- avcProfile = profile;
70
- for (const callback of profileCallbacks) {
71
- await callback(profile);
72
- }
73
- profileCallbacks.length = 0;
74
- };
75
- return {
76
- onTrackEntrySegment,
77
- onProfile,
78
- registerOnAvcProfileCallback,
79
- getTrackInfoByNumber: (id) => trackEntries[id],
80
- registerVideoSampleCallback: async (id, callback) => {
81
- var _a;
82
- if (callback === null) {
83
- delete videoSampleCallbacks[id];
84
- declinedTrackNumbers.push(id);
85
- return;
86
- }
87
- videoSampleCallbacks[id] = callback;
88
- for (const queued of (_a = queuedVideoSamples[id]) !== null && _a !== void 0 ? _a : []) {
89
- await callback(queued);
90
- }
91
- queuedVideoSamples[id] = [];
92
- },
93
- setTimestampOffset,
94
- getTimestampOffsetForByteOffset,
95
- registerAudioSampleCallback: async (id, callback) => {
96
- var _a;
97
- if (callback === null) {
98
- delete audioSampleCallbacks[id];
99
- declinedTrackNumbers.push(id);
100
- return;
101
- }
102
- audioSampleCallbacks[id] = callback;
103
- for (const queued of (_a = queuedAudioSamples[id]) !== null && _a !== void 0 ? _a : []) {
104
- await callback(queued);
105
- }
106
- queuedAudioSamples[id] = [];
107
- },
108
- onAudioSample: async (trackId, audioSample) => {
109
- if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
110
- throw new Error('Aborted');
111
- }
112
- if (typeof samplesForTrack[trackId] === 'undefined') {
113
- samplesForTrack[trackId] = 0;
114
- }
115
- samplesForTrack[trackId]++;
116
- const callback = audioSampleCallbacks[trackId];
117
- if (callback) {
118
- await callback(audioSample);
119
- }
120
- else {
121
- if (declinedTrackNumbers.includes(trackId)) {
122
- return;
123
- }
124
- if (!hasAudioCallbacks) {
125
- throw new Error('No audio callbacks registered');
126
- }
127
- }
128
- },
129
- onVideoSample: async (trackId, videoSample) => {
130
- if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
131
- throw new Error('Aborted');
132
- }
133
- if (typeof samplesForTrack[trackId] === 'undefined') {
134
- samplesForTrack[trackId] = 0;
135
- }
136
- samplesForTrack[trackId]++;
137
- const callback = videoSampleCallbacks[trackId];
138
- if (callback) {
139
- await callback(videoSample);
140
- }
141
- else {
142
- if (declinedTrackNumbers.includes(trackId)) {
143
- return;
144
- }
145
- if (!hasVideoCallbacks) {
146
- throw new Error('No video callbacks registered');
147
- }
148
- }
149
- },
150
- getInternalStats: () => ({}),
151
- getTimescale,
152
- setTimescale,
153
- getSamplesForTrack: (trackId) => {
154
- var _a;
155
- return (_a = samplesForTrack[trackId]) !== null && _a !== void 0 ? _a : 0;
156
- },
157
- getAvcProfile: () => {
158
- return avcProfile;
159
- },
160
- };
161
- };
162
- exports.makeParserState = makeParserState;