@remotion/media-parser 4.0.309 → 4.0.311
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/esm/index.mjs +1 -1
- package/dist/esm/server-worker.mjs +3 -1
- package/dist/esm/worker-server-entry.mjs +8 -0
- package/dist/esm/worker-web-entry.mjs +8 -0
- package/dist/esm/worker.mjs +3 -1
- package/dist/parse-media-on-worker-entry.js +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/serialize-error.js +14 -4
- package/dist/worker/worker-types.d.ts +4 -1
- package/package.json +3 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -17699,7 +17699,7 @@ var downloadAndParseMedia = async (options) => {
|
|
|
17699
17699
|
return returnValue;
|
|
17700
17700
|
};
|
|
17701
17701
|
// src/version.ts
|
|
17702
|
-
var VERSION = "4.0.
|
|
17702
|
+
var VERSION = "4.0.311";
|
|
17703
17703
|
|
|
17704
17704
|
// src/index.ts
|
|
17705
17705
|
var MediaParserInternals = {
|
|
@@ -121,6 +121,8 @@ var deserializeError = (error) => {
|
|
|
121
121
|
return new Error(error.errorMessage);
|
|
122
122
|
case "NotReadableError":
|
|
123
123
|
return new Error(error.errorMessage);
|
|
124
|
+
case "TypeError":
|
|
125
|
+
return new TypeError(error.errorMessage);
|
|
124
126
|
default:
|
|
125
127
|
throw new Error(`Unknown error name: ${error}`);
|
|
126
128
|
}
|
|
@@ -201,7 +203,7 @@ var convertToWorkerPayload = (payload) => {
|
|
|
201
203
|
postM3uAssociatedPlaylistsSelection: Boolean(selectM3uAssociatedPlaylists),
|
|
202
204
|
postOnAudioTrack: Boolean(onAudioTrack),
|
|
203
205
|
postOnVideoTrack: Boolean(onVideoTrack),
|
|
204
|
-
src
|
|
206
|
+
src: src instanceof URL ? src.toString() : src
|
|
205
207
|
};
|
|
206
208
|
};
|
|
207
209
|
var post = (worker, payload) => {
|
|
@@ -17832,6 +17832,14 @@ var serializeError = ({
|
|
|
17832
17832
|
seekingHints
|
|
17833
17833
|
};
|
|
17834
17834
|
}
|
|
17835
|
+
if (error instanceof TypeError) {
|
|
17836
|
+
return {
|
|
17837
|
+
type: "response-error",
|
|
17838
|
+
errorName: "TypeError",
|
|
17839
|
+
errorMessage: error.message,
|
|
17840
|
+
errorStack: error.stack ?? ""
|
|
17841
|
+
};
|
|
17842
|
+
}
|
|
17835
17843
|
if (error.name === "AbortError") {
|
|
17836
17844
|
return {
|
|
17837
17845
|
type: "response-error",
|
|
@@ -17701,6 +17701,14 @@ var serializeError = ({
|
|
|
17701
17701
|
seekingHints
|
|
17702
17702
|
};
|
|
17703
17703
|
}
|
|
17704
|
+
if (error instanceof TypeError) {
|
|
17705
|
+
return {
|
|
17706
|
+
type: "response-error",
|
|
17707
|
+
errorName: "TypeError",
|
|
17708
|
+
errorMessage: error.message,
|
|
17709
|
+
errorStack: error.stack ?? ""
|
|
17710
|
+
};
|
|
17711
|
+
}
|
|
17704
17712
|
if (error.name === "AbortError") {
|
|
17705
17713
|
return {
|
|
17706
17714
|
type: "response-error",
|
package/dist/esm/worker.mjs
CHANGED
|
@@ -121,6 +121,8 @@ var deserializeError = (error) => {
|
|
|
121
121
|
return new Error(error.errorMessage);
|
|
122
122
|
case "NotReadableError":
|
|
123
123
|
return new Error(error.errorMessage);
|
|
124
|
+
case "TypeError":
|
|
125
|
+
return new TypeError(error.errorMessage);
|
|
124
126
|
default:
|
|
125
127
|
throw new Error(`Unknown error name: ${error}`);
|
|
126
128
|
}
|
|
@@ -201,7 +203,7 @@ var convertToWorkerPayload = (payload) => {
|
|
|
201
203
|
postM3uAssociatedPlaylistsSelection: Boolean(selectM3uAssociatedPlaylists),
|
|
202
204
|
postOnAudioTrack: Boolean(onAudioTrack),
|
|
203
205
|
postOnVideoTrack: Boolean(onVideoTrack),
|
|
204
|
-
src
|
|
206
|
+
src: src instanceof URL ? src.toString() : src
|
|
205
207
|
};
|
|
206
208
|
};
|
|
207
209
|
var post = (worker, payload) => {
|
|
@@ -43,7 +43,8 @@ payload) => {
|
|
|
43
43
|
postM3uAssociatedPlaylistsSelection: Boolean(selectM3uAssociatedPlaylists),
|
|
44
44
|
postOnAudioTrack: Boolean(onAudioTrack),
|
|
45
45
|
postOnVideoTrack: Boolean(onVideoTrack),
|
|
46
|
-
|
|
46
|
+
// URL cannot be serialized, so we convert it to a string
|
|
47
|
+
src: src instanceof URL ? src.toString() : src,
|
|
47
48
|
};
|
|
48
49
|
};
|
|
49
50
|
const post = (worker, payload) => {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.311";
|
package/dist/version.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.deserializeError = exports.serializeError = void 0;
|
|
|
4
4
|
const errors_1 = require("../errors");
|
|
5
5
|
const log_1 = require("../log");
|
|
6
6
|
const serializeError = ({ error, logLevel, seekingHints, }) => {
|
|
7
|
-
var _a, _b, _c, _d, _e, _f;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
8
8
|
if (error instanceof errors_1.IsAnImageError) {
|
|
9
9
|
return {
|
|
10
10
|
type: 'response-error',
|
|
@@ -38,12 +38,20 @@ const serializeError = ({ error, logLevel, seekingHints, }) => {
|
|
|
38
38
|
seekingHints,
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
+
if (error instanceof TypeError) {
|
|
42
|
+
return {
|
|
43
|
+
type: 'response-error',
|
|
44
|
+
errorName: 'TypeError',
|
|
45
|
+
errorMessage: error.message,
|
|
46
|
+
errorStack: (_d = error.stack) !== null && _d !== void 0 ? _d : '',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
41
49
|
if (error.name === 'AbortError') {
|
|
42
50
|
return {
|
|
43
51
|
type: 'response-error',
|
|
44
52
|
errorName: 'AbortError',
|
|
45
53
|
errorMessage: error.message,
|
|
46
|
-
errorStack: (
|
|
54
|
+
errorStack: (_e = error.stack) !== null && _e !== void 0 ? _e : '',
|
|
47
55
|
};
|
|
48
56
|
}
|
|
49
57
|
if (error.name === 'NotReadableError') {
|
|
@@ -51,7 +59,7 @@ const serializeError = ({ error, logLevel, seekingHints, }) => {
|
|
|
51
59
|
type: 'response-error',
|
|
52
60
|
errorName: 'NotReadableError',
|
|
53
61
|
errorMessage: error.message,
|
|
54
|
-
errorStack: (
|
|
62
|
+
errorStack: (_f = error.stack) !== null && _f !== void 0 ? _f : '',
|
|
55
63
|
};
|
|
56
64
|
}
|
|
57
65
|
if (error.name !== 'Error') {
|
|
@@ -61,7 +69,7 @@ const serializeError = ({ error, logLevel, seekingHints, }) => {
|
|
|
61
69
|
type: 'response-error',
|
|
62
70
|
errorName: 'Error',
|
|
63
71
|
errorMessage: error.message,
|
|
64
|
-
errorStack: (
|
|
72
|
+
errorStack: (_g = error.stack) !== null && _g !== void 0 ? _g : '',
|
|
65
73
|
};
|
|
66
74
|
};
|
|
67
75
|
exports.serializeError = serializeError;
|
|
@@ -99,6 +107,8 @@ const deserializeError = (error) => {
|
|
|
99
107
|
// TODO: Document 2GB limit
|
|
100
108
|
case 'NotReadableError':
|
|
101
109
|
return new Error(error.errorMessage);
|
|
110
|
+
case 'TypeError':
|
|
111
|
+
return new TypeError(error.errorMessage);
|
|
102
112
|
default:
|
|
103
113
|
throw new Error(`Unknown error name: ${error}`);
|
|
104
114
|
}
|
|
@@ -88,6 +88,9 @@ type GenericError = BaseError & {
|
|
|
88
88
|
type NotReadableError = BaseError & {
|
|
89
89
|
errorName: 'NotReadableError';
|
|
90
90
|
};
|
|
91
|
+
type TypeError = BaseError & {
|
|
92
|
+
errorName: 'TypeError';
|
|
93
|
+
};
|
|
91
94
|
type IsAnImageError = BaseError & {
|
|
92
95
|
errorName: 'IsAnImageError';
|
|
93
96
|
imageType: ImageType;
|
|
@@ -112,7 +115,7 @@ type MediaParserAbortError = BaseError & {
|
|
|
112
115
|
errorName: 'MediaParserAbortError';
|
|
113
116
|
seekingHints: SeekingHints | null;
|
|
114
117
|
};
|
|
115
|
-
type AnyError = GenericError | IsAnImageError | IsAPdfError | IsAnUnsupportedFileTypeError | MediaParserAbortError | AbortError | NotReadableError;
|
|
118
|
+
type AnyError = GenericError | IsAnImageError | IsAPdfError | IsAnUnsupportedFileTypeError | MediaParserAbortError | AbortError | NotReadableError | TypeError;
|
|
116
119
|
export type ResponseError = {
|
|
117
120
|
type: 'response-error';
|
|
118
121
|
} & AnyError;
|
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.311",
|
|
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.311",
|
|
14
|
+
"@remotion/eslint-config-internal": "4.0.311"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|