@remotion/media-parser 4.0.289 → 4.0.290
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.
- package/dist/containers/flac/get-channel-count.d.ts +1 -1
- package/dist/containers/iso-base-media/get-video-codec-from-iso-track.d.ts +1 -1
- package/dist/containers/iso-base-media/seeking-hints.d.ts +1 -1
- package/dist/containers/mp3/get-duration.d.ts +5 -0
- package/dist/containers/wav/get-duration-from-wav.d.ts +0 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/state/mp3.d.ts +16 -5
- package/dist/state/mp3.js +7 -5
- package/dist/state/parser-state.d.ts +2 -2
- package/dist/state/riff/lazy-idx1-fetch.d.ts +2 -2
- package/dist/state/riff.d.ts +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { BufferIterator } from '../../iterator/buffer-iterator';
|
|
2
|
-
export declare const getChannelCount: (iterator: BufferIterator) =>
|
|
2
|
+
export declare const getChannelCount: (iterator: BufferIterator) => 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TrakBox } from './trak/trak';
|
|
2
|
-
export declare const getVideoCodecFromIsoTrak: (trakBox: TrakBox) => "
|
|
2
|
+
export declare const getVideoCodecFromIsoTrak: (trakBox: TrakBox) => "h264" | "av1" | "h265" | "prores";
|
|
@@ -10,7 +10,7 @@ export declare const getSeekingHintsFromMp4: ({ structureState, isoState, mp4Hea
|
|
|
10
10
|
mp4HeaderSegment: IsoBaseMediaStructure | null;
|
|
11
11
|
mediaSectionState: MediaSectionState;
|
|
12
12
|
}) => IsoBaseMediaSeekingHints | null;
|
|
13
|
-
export declare const setSeekingHintsForMp4: ({
|
|
13
|
+
export declare const setSeekingHintsForMp4: ({}: {
|
|
14
14
|
hints: IsoBaseMediaSeekingHints;
|
|
15
15
|
state: ParserState;
|
|
16
16
|
}) => void;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { ParserState } from '../../state/parser-state';
|
|
2
|
+
import type { XingData } from './parse-xing';
|
|
3
|
+
export declare const getDurationFromMp3Xing: ({ xingData, samplesPerFrame, }: {
|
|
4
|
+
xingData: XingData;
|
|
5
|
+
samplesPerFrame: number;
|
|
6
|
+
}) => number;
|
|
2
7
|
export declare const getDurationFromMp3: (state: ParserState) => number | null;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -16116,7 +16116,7 @@ var downloadAndParseMedia = async (options) => {
|
|
|
16116
16116
|
return returnValue;
|
|
16117
16117
|
};
|
|
16118
16118
|
// src/version.ts
|
|
16119
|
-
var VERSION = "4.0.
|
|
16119
|
+
var VERSION = "4.0.290";
|
|
16120
16120
|
|
|
16121
16121
|
// src/index.ts
|
|
16122
16122
|
var MediaParserInternals = {
|
package/dist/state/mp3.d.ts
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
|
+
import type { XingData } from '../containers/mp3/parse-xing';
|
|
1
2
|
export type Mp3Info = {
|
|
2
3
|
sampleRate: number;
|
|
3
4
|
mpegVersion: 1 | 2;
|
|
4
5
|
layer: number;
|
|
5
|
-
startOfMpegStream: number;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
8
|
-
|
|
7
|
+
export type VariableMp3BitrateInfo = {
|
|
8
|
+
type: 'variable';
|
|
9
|
+
xingData: XingData;
|
|
9
10
|
};
|
|
11
|
+
export type Mp3BitrateInfo = {
|
|
12
|
+
type: 'constant';
|
|
13
|
+
bitrateInKbit: number;
|
|
14
|
+
} | VariableMp3BitrateInfo;
|
|
10
15
|
export declare const makeMp3State: () => {
|
|
11
16
|
getMp3Info: () => Mp3Info | null;
|
|
12
17
|
setMp3Info: (info: Mp3Info) => void;
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
getMp3BitrateInfo: () => Mp3BitrateInfo | null;
|
|
19
|
+
setMp3BitrateInfo: (info: Mp3BitrateInfo) => void;
|
|
20
|
+
audioSamples: {
|
|
21
|
+
addSample: (audioSampleOffset: import("./audio-sample-map").AudioSampleOffset) => void;
|
|
22
|
+
getSamples: () => import("./audio-sample-map").AudioSampleOffset[];
|
|
23
|
+
setFromSeekingHints: (newMap: import("./audio-sample-map").AudioSampleOffset[]) => void;
|
|
24
|
+
};
|
|
15
25
|
};
|
|
26
|
+
export type Mp3State = ReturnType<typeof makeMp3State>;
|
package/dist/state/mp3.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeMp3State = void 0;
|
|
4
|
+
const audio_sample_map_1 = require("./audio-sample-map");
|
|
4
5
|
const makeMp3State = () => {
|
|
5
6
|
let mp3Info = null;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
let bitrateInfo = null;
|
|
8
|
+
const audioSamples = (0, audio_sample_map_1.audioSampleMapState)();
|
|
8
9
|
return {
|
|
9
10
|
getMp3Info: () => mp3Info,
|
|
10
11
|
setMp3Info: (info) => {
|
|
11
12
|
mp3Info = info;
|
|
12
13
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
getMp3BitrateInfo: () => bitrateInfo,
|
|
15
|
+
setMp3BitrateInfo: (info) => {
|
|
16
|
+
bitrateInfo = info;
|
|
16
17
|
},
|
|
18
|
+
audioSamples,
|
|
17
19
|
};
|
|
18
20
|
};
|
|
19
21
|
exports.makeMp3State = makeMp3State;
|
|
@@ -59,10 +59,10 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
|
|
|
59
59
|
videoTrackIndex: number | null;
|
|
60
60
|
} | null;
|
|
61
61
|
setFromSeekingHints: (hints: import("../containers/riff/seeking-hints").RiffSeekingHints) => void;
|
|
62
|
-
waitForLoaded: () => Promise<
|
|
62
|
+
waitForLoaded: () => Promise<{
|
|
63
63
|
entries: import("../containers/riff/riff-box").Idx1Entry[];
|
|
64
64
|
videoTrackIndex: number | null;
|
|
65
|
-
}>;
|
|
65
|
+
}> | Promise<null>;
|
|
66
66
|
};
|
|
67
67
|
sampleCounter: {
|
|
68
68
|
onAudioSample: (trackId: number, audioSample: import("../webcodec-sample-types").AudioOrVideoSample) => void;
|
|
@@ -22,9 +22,9 @@ export declare const lazyIdx1Fetch: ({ controller, logLevel, readerInterface, sr
|
|
|
22
22
|
videoTrackIndex: number | null;
|
|
23
23
|
} | null;
|
|
24
24
|
setFromSeekingHints: (hints: RiffSeekingHints) => void;
|
|
25
|
-
waitForLoaded: () => Promise<
|
|
25
|
+
waitForLoaded: () => Promise<{
|
|
26
26
|
entries: import("../../containers/riff/riff-box").Idx1Entry[];
|
|
27
27
|
videoTrackIndex: number | null;
|
|
28
|
-
}>;
|
|
28
|
+
}> | Promise<null>;
|
|
29
29
|
};
|
|
30
30
|
export type LazyIdx1Fetch = ReturnType<typeof lazyIdx1Fetch>;
|
package/dist/state/riff.d.ts
CHANGED
|
@@ -29,10 +29,10 @@ export declare const riffSpecificState: ({ controller, logLevel, readerInterface
|
|
|
29
29
|
videoTrackIndex: number | null;
|
|
30
30
|
} | null;
|
|
31
31
|
setFromSeekingHints: (hints: import("../containers/riff/seeking-hints").RiffSeekingHints) => void;
|
|
32
|
-
waitForLoaded: () => Promise<
|
|
32
|
+
waitForLoaded: () => Promise<{
|
|
33
33
|
entries: import("../containers/riff/riff-box").Idx1Entry[];
|
|
34
34
|
videoTrackIndex: number | null;
|
|
35
|
-
}>;
|
|
35
|
+
}> | Promise<null>;
|
|
36
36
|
};
|
|
37
37
|
sampleCounter: {
|
|
38
38
|
onAudioSample: (trackId: number, audioSample: import("..").AudioOrVideoSample) => void;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.290";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
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.
|
|
6
|
+
"version": "4.0.290",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@types/wicg-file-system-access": "2023.10.5",
|
|
11
11
|
"eslint": "9.19.0",
|
|
12
12
|
"@types/bun": "1.2.8",
|
|
13
|
-
"@remotion/example-videos": "4.0.
|
|
14
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
13
|
+
"@remotion/example-videos": "4.0.290",
|
|
14
|
+
"@remotion/eslint-config-internal": "4.0.290"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|