@remotion/media-parser 4.0.258 → 4.0.260

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.
@@ -1,2 +1,2 @@
1
1
  import type { BufferIterator } from '../../buffer-iterator';
2
- export declare const getChannelCount: (iterator: BufferIterator) => 2 | 8 | 1 | 7 | 3 | 4 | 5 | 6;
2
+ export declare const getChannelCount: (iterator: BufferIterator) => 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
@@ -11224,7 +11224,7 @@ var parseMedia = (options) => {
11224
11224
  });
11225
11225
  };
11226
11226
  // src/version.ts
11227
- var VERSION = "4.0.258";
11227
+ var VERSION = "4.0.260";
11228
11228
 
11229
11229
  // src/index.ts
11230
11230
  var MediaParserInternals = {
package/dist/index.d.ts CHANGED
@@ -17,11 +17,11 @@ export type { ReaderInterface } from './readers/reader';
17
17
  export type { CreateContent, Writer, WriterInterface } from './writers/writer';
18
18
  export declare const MediaParserInternals: {
19
19
  Log: {
20
- trace: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
21
- verbose: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
22
- info: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
23
- warn: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
24
- error: (...args: Parameters<typeof console.log>) => void;
20
+ trace: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
21
+ verbose: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
22
+ info: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
23
+ warn: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
24
+ error: (message?: any, ...optionalParams: any[]) => void;
25
25
  };
26
26
  createAacCodecPrivate: ({ audioObjectType, sampleRate, channelConfiguration, codecPrivate, }: {
27
27
  audioObjectType: number;
package/dist/log.d.ts CHANGED
@@ -2,9 +2,9 @@ export declare const logLevels: readonly ["trace", "verbose", "info", "warn", "e
2
2
  export type LogLevel = (typeof logLevels)[number];
3
3
  export declare const isEqualOrBelowLogLevel: (currentLevel: LogLevel, level: LogLevel) => boolean;
4
4
  export declare const Log: {
5
- trace: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
6
- verbose: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
7
- info: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
8
- warn: (logLevel: LogLevel, ...args: Parameters<typeof console.log>) => void;
9
- error: (...args: Parameters<typeof console.log>) => void;
5
+ trace: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
6
+ verbose: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
7
+ info: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
8
+ warn: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
9
+ error: (message?: any, ...optionalParams: any[]) => void;
10
10
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.258";
1
+ export declare const VERSION = "4.0.260";
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.258';
5
+ exports.VERSION = '4.0.260';
package/package.json CHANGED
@@ -3,14 +3,14 @@
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.258",
6
+ "version": "4.0.260",
7
7
  "main": "dist/index.js",
8
8
  "sideEffects": false,
9
9
  "devDependencies": {
10
10
  "@types/wicg-file-system-access": "2023.10.5",
11
- "eslint": "9.14.0",
12
- "@remotion/example-videos": "4.0.258",
13
- "@remotion/eslint-config-internal": "4.0.258"
11
+ "eslint": "9.19.0",
12
+ "@remotion/example-videos": "4.0.260",
13
+ "@remotion/eslint-config-internal": "4.0.260"
14
14
  },
15
15
  "publishConfig": {
16
16
  "access": "public"
package/dist/abort.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const hasBeenAborted: (error: unknown) => error is MediaParserAbortError;
package/dist/abort.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasBeenAborted = void 0;
4
- const hasBeenAborted = (error) => {
5
- return error instanceof MediaParserAbortError;
6
- };
7
- exports.hasBeenAborted = hasBeenAborted;
@@ -1,17 +0,0 @@
1
- import { MediaParserEmitter } from './emitter';
2
- import type { PauseSignal } from './pause-signal';
3
- export type MediaParserController = {
4
- abort: (reason?: any) => void;
5
- pause: PauseSignal['pause'];
6
- resume: PauseSignal['resume'];
7
- addEventListener: MediaParserEmitter['addEventListener'];
8
- removeEventListener: MediaParserEmitter['removeEventListener'];
9
- /**
10
- * @deprecated Not public API
11
- */
12
- _internals: {
13
- signal: AbortSignal;
14
- checkForAbortAndPause: () => Promise<void>;
15
- };
16
- };
17
- export declare const mediaParserController: () => MediaParserController;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mediaParserController = void 0;
4
- const emitter_1 = require("./emitter");
5
- const pause_signal_1 = require("./pause-signal");
6
- const mediaParserController = () => {
7
- const abortController = new AbortController();
8
- const emitter = new emitter_1.MediaParserEmitter();
9
- const pauseSignal = (0, pause_signal_1.makePauseSignal)(emitter);
10
- const checkForAbortAndPause = async () => {
11
- if (abortController.signal.aborted) {
12
- throw new Error('Aborted');
13
- }
14
- await pauseSignal.waitUntilResume();
15
- };
16
- return {
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
- abort: (reason) => {
19
- abortController.abort(reason);
20
- },
21
- pause: pauseSignal.pause,
22
- resume: pauseSignal.resume,
23
- addEventListener: emitter.addEventListener,
24
- removeEventListener: emitter.removeEventListener,
25
- _internals: {
26
- signal: abortController.signal,
27
- checkForAbortAndPause,
28
- },
29
- };
30
- };
31
- exports.mediaParserController = mediaParserController;
@@ -1,2 +0,0 @@
1
- import type { DownloadAndParseMedia } from './options';
2
- export declare const parseAndDownloadMedia: DownloadAndParseMedia;
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseAndDownloadMedia = void 0;
4
- const internal_parse_media_1 = require("./internal-parse-media");
5
- const from_fetch_1 = require("./readers/from-fetch");
6
- const parseAndDownloadMedia = async (options) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
8
- const content = await options.writer.createContent({
9
- filename: 'hmm',
10
- mimeType: 'shouldnotmatter',
11
- });
12
- const returnValue = await (0, internal_parse_media_1.internalParseMedia)({
13
- fields: (_a = options.fields) !== null && _a !== void 0 ? _a : null,
14
- logLevel: (_b = options.logLevel) !== null && _b !== void 0 ? _b : 'info',
15
- mode: 'download',
16
- onAudioCodec: (_c = options.onAudioCodec) !== null && _c !== void 0 ? _c : null,
17
- onAudioTrack: null,
18
- onContainer: (_d = options.onContainer) !== null && _d !== void 0 ? _d : null,
19
- onDimensions: (_e = options.onDimensions) !== null && _e !== void 0 ? _e : null,
20
- onDiscardedData: async (data) => {
21
- await content.write(data);
22
- },
23
- onDurationInSeconds: (_f = options.onDurationInSeconds) !== null && _f !== void 0 ? _f : null,
24
- onFps: (_g = options.onFps) !== null && _g !== void 0 ? _g : null,
25
- onImages: (_h = options.onImages) !== null && _h !== void 0 ? _h : null,
26
- onInternalStats: (_j = options.onInternalStats) !== null && _j !== void 0 ? _j : null,
27
- onIsHdr: (_k = options.onIsHdr) !== null && _k !== void 0 ? _k : null,
28
- onKeyframes: (_l = options.onKeyframes) !== null && _l !== void 0 ? _l : null,
29
- onLocation: (_m = options.onLocation) !== null && _m !== void 0 ? _m : null,
30
- onMetadata: (_o = options.onMetadata) !== null && _o !== void 0 ? _o : null,
31
- onMimeType: (_p = options.onMimeType) !== null && _p !== void 0 ? _p : null,
32
- onName: (_q = options.onName) !== null && _q !== void 0 ? _q : null,
33
- onNumberOfAudioChannels: (_r = options.onNumberOfAudioChannels) !== null && _r !== void 0 ? _r : null,
34
- onParseProgress: (_s = options.onParseProgress) !== null && _s !== void 0 ? _s : null,
35
- onRotation: (_t = options.onRotation) !== null && _t !== void 0 ? _t : null,
36
- onSampleRate: (_u = options.onSampleRate) !== null && _u !== void 0 ? _u : null,
37
- onSize: (_v = options.onSize) !== null && _v !== void 0 ? _v : null,
38
- onSlowAudioBitrate: (_w = options.onSlowAudioBitrate) !== null && _w !== void 0 ? _w : null,
39
- onSlowDurationInSeconds: (_x = options.onSlowDurationInSeconds) !== null && _x !== void 0 ? _x : null,
40
- onSlowFps: (_y = options.onSlowFps) !== null && _y !== void 0 ? _y : null,
41
- onSlowKeyframes: (_z = options.onSlowKeyframes) !== null && _z !== void 0 ? _z : null,
42
- onSlowNumberOfFrames: (_0 = options.onSlowNumberOfFrames) !== null && _0 !== void 0 ? _0 : null,
43
- onSlowVideoBitrate: (_1 = options.onSlowVideoBitrate) !== null && _1 !== void 0 ? _1 : null,
44
- onStructure: (_2 = options.onStructure) !== null && _2 !== void 0 ? _2 : null,
45
- onTracks: (_3 = options.onTracks) !== null && _3 !== void 0 ? _3 : null,
46
- onUnrotatedDimensions: (_4 = options.onUnrotatedDimensions) !== null && _4 !== void 0 ? _4 : null,
47
- onVideoCodec: (_5 = options.onVideoCodec) !== null && _5 !== void 0 ? _5 : null,
48
- onVideoTrack: null,
49
- progressIntervalInMs: (_6 = options.progressIntervalInMs) !== null && _6 !== void 0 ? _6 : null,
50
- reader: (_7 = options.reader) !== null && _7 !== void 0 ? _7 : from_fetch_1.fetchReader,
51
- signal: (_8 = options.signal) !== null && _8 !== void 0 ? _8 : undefined,
52
- src: options.src,
53
- });
54
- await content.finish();
55
- return returnValue;
56
- };
57
- exports.parseAndDownloadMedia = parseAndDownloadMedia;