@remotion/media-parser 4.0.296 → 4.0.297
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/iso-base-media/meta/ilst.d.ts +1 -1
- package/dist/containers/iso-base-media/meta/ilst.js +15 -3
- package/dist/esm/index.mjs +24 -16
- package/dist/esm/node.mjs +3 -0
- package/dist/esm/universal.mjs +3 -0
- package/dist/esm/worker-server-entry.mjs +26 -15
- package/dist/esm/worker-web-entry.mjs +23 -15
- package/dist/has-all-info.js +1 -1
- package/dist/metadata/metadata-from-iso.js +12 -12
- package/dist/readers/from-node.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -58,9 +58,21 @@ const parseIlstBox = ({ iterator, size, offset, }) => {
|
|
|
58
58
|
while (iterator.counter.getOffset() < size + offset) {
|
|
59
59
|
// metadata size
|
|
60
60
|
const metadataSize = iterator.getUint32();
|
|
61
|
-
const index = iterator.
|
|
62
|
-
//
|
|
63
|
-
if (index
|
|
61
|
+
const index = iterator.getAtom();
|
|
62
|
+
// this can be of a different type
|
|
63
|
+
if (!index.startsWith('�') && !index.startsWith('\u0000')) {
|
|
64
|
+
// "skip" as a number
|
|
65
|
+
if (index === 'skip') {
|
|
66
|
+
iterator.discard(metadataSize - 8);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
// "----" atom in m4a files
|
|
70
|
+
// iTunes adds it for .m4a files
|
|
71
|
+
// not very interesting data, so we don't parse them
|
|
72
|
+
if (index === '----') {
|
|
73
|
+
iterator.discard(metadataSize - 8);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
64
76
|
iterator.discard(metadataSize - 8);
|
|
65
77
|
continue;
|
|
66
78
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4162,8 +4162,16 @@ var parseIlstBox = ({
|
|
|
4162
4162
|
const entries = [];
|
|
4163
4163
|
while (iterator.counter.getOffset() < size + offset) {
|
|
4164
4164
|
const metadataSize = iterator.getUint32();
|
|
4165
|
-
const index = iterator.
|
|
4166
|
-
if (index
|
|
4165
|
+
const index = iterator.getAtom();
|
|
4166
|
+
if (!index.startsWith("�") && !index.startsWith("\x00")) {
|
|
4167
|
+
if (index === "skip") {
|
|
4168
|
+
iterator.discard(metadataSize - 8);
|
|
4169
|
+
continue;
|
|
4170
|
+
}
|
|
4171
|
+
if (index === "----") {
|
|
4172
|
+
iterator.discard(metadataSize - 8);
|
|
4173
|
+
continue;
|
|
4174
|
+
}
|
|
4167
4175
|
iterator.discard(metadataSize - 8);
|
|
4168
4176
|
continue;
|
|
4169
4177
|
}
|
|
@@ -7503,40 +7511,40 @@ var getMetadataFromWav = (structure) => {
|
|
|
7503
7511
|
|
|
7504
7512
|
// src/metadata/metadata-from-iso.ts
|
|
7505
7513
|
var mapToKey = (index) => {
|
|
7506
|
-
if (index ===
|
|
7514
|
+
if (index === "�ART") {
|
|
7507
7515
|
return "artist";
|
|
7508
7516
|
}
|
|
7509
|
-
if (index ===
|
|
7517
|
+
if (index === "�alb") {
|
|
7510
7518
|
return "album";
|
|
7511
7519
|
}
|
|
7512
|
-
if (index ===
|
|
7520
|
+
if (index === "�cmt") {
|
|
7513
7521
|
return "comment";
|
|
7514
7522
|
}
|
|
7515
|
-
if (index ===
|
|
7523
|
+
if (index === "�day") {
|
|
7516
7524
|
return "releaseDate";
|
|
7517
7525
|
}
|
|
7518
|
-
if (index ===
|
|
7526
|
+
if (index === "�gen") {
|
|
7519
7527
|
return "genre";
|
|
7520
7528
|
}
|
|
7521
|
-
if (index ===
|
|
7529
|
+
if (index === "�nam") {
|
|
7522
7530
|
return "title";
|
|
7523
7531
|
}
|
|
7524
|
-
if (index ===
|
|
7532
|
+
if (index === "�too") {
|
|
7525
7533
|
return "encoder";
|
|
7526
7534
|
}
|
|
7527
|
-
if (index ===
|
|
7535
|
+
if (index === "�wrt") {
|
|
7528
7536
|
return "writer";
|
|
7529
7537
|
}
|
|
7530
|
-
if (index ===
|
|
7538
|
+
if (index === "�cpy") {
|
|
7531
7539
|
return "copyright";
|
|
7532
7540
|
}
|
|
7533
|
-
if (index ===
|
|
7541
|
+
if (index === "�dir") {
|
|
7534
7542
|
return "director";
|
|
7535
7543
|
}
|
|
7536
|
-
if (index ===
|
|
7544
|
+
if (index === "�prd") {
|
|
7537
7545
|
return "producer";
|
|
7538
7546
|
}
|
|
7539
|
-
if (index ===
|
|
7547
|
+
if (index === "�des") {
|
|
7540
7548
|
return "description";
|
|
7541
7549
|
}
|
|
7542
7550
|
return null;
|
|
@@ -10124,7 +10132,7 @@ var getAvailableInfo = ({
|
|
|
10124
10132
|
if (key === "m3uStreams") {
|
|
10125
10133
|
return m3uHasStreams(state);
|
|
10126
10134
|
}
|
|
10127
|
-
throw new Error(`Unknown
|
|
10135
|
+
throw new Error(`Unknown field passed: ${key}. Available fields: ${Object.keys(state.fields).join(", ")}`);
|
|
10128
10136
|
});
|
|
10129
10137
|
const entries = [];
|
|
10130
10138
|
let i = 0;
|
|
@@ -17021,7 +17029,7 @@ var downloadAndParseMedia = async (options) => {
|
|
|
17021
17029
|
return returnValue;
|
|
17022
17030
|
};
|
|
17023
17031
|
// src/version.ts
|
|
17024
|
-
var VERSION = "4.0.
|
|
17032
|
+
var VERSION = "4.0.297";
|
|
17025
17033
|
|
|
17026
17034
|
// src/index.ts
|
|
17027
17035
|
var MediaParserInternals = {
|
package/dist/esm/node.mjs
CHANGED
package/dist/esm/universal.mjs
CHANGED
|
@@ -425,6 +425,9 @@ var nodeReadContent = ({ src, range, controller }) => {
|
|
|
425
425
|
c.enqueue(chunk);
|
|
426
426
|
});
|
|
427
427
|
stream.on("end", () => {
|
|
428
|
+
if (readerCancelled) {
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
428
431
|
c.close();
|
|
429
432
|
});
|
|
430
433
|
stream.on("error", (err) => {
|
|
@@ -5383,40 +5386,40 @@ var getMetadataFromWav = (structure) => {
|
|
|
5383
5386
|
|
|
5384
5387
|
// src/metadata/metadata-from-iso.ts
|
|
5385
5388
|
var mapToKey = (index) => {
|
|
5386
|
-
if (index ===
|
|
5389
|
+
if (index === "�ART") {
|
|
5387
5390
|
return "artist";
|
|
5388
5391
|
}
|
|
5389
|
-
if (index ===
|
|
5392
|
+
if (index === "�alb") {
|
|
5390
5393
|
return "album";
|
|
5391
5394
|
}
|
|
5392
|
-
if (index ===
|
|
5395
|
+
if (index === "�cmt") {
|
|
5393
5396
|
return "comment";
|
|
5394
5397
|
}
|
|
5395
|
-
if (index ===
|
|
5398
|
+
if (index === "�day") {
|
|
5396
5399
|
return "releaseDate";
|
|
5397
5400
|
}
|
|
5398
|
-
if (index ===
|
|
5401
|
+
if (index === "�gen") {
|
|
5399
5402
|
return "genre";
|
|
5400
5403
|
}
|
|
5401
|
-
if (index ===
|
|
5404
|
+
if (index === "�nam") {
|
|
5402
5405
|
return "title";
|
|
5403
5406
|
}
|
|
5404
|
-
if (index ===
|
|
5407
|
+
if (index === "�too") {
|
|
5405
5408
|
return "encoder";
|
|
5406
5409
|
}
|
|
5407
|
-
if (index ===
|
|
5410
|
+
if (index === "�wrt") {
|
|
5408
5411
|
return "writer";
|
|
5409
5412
|
}
|
|
5410
|
-
if (index ===
|
|
5413
|
+
if (index === "�cpy") {
|
|
5411
5414
|
return "copyright";
|
|
5412
5415
|
}
|
|
5413
|
-
if (index ===
|
|
5416
|
+
if (index === "�dir") {
|
|
5414
5417
|
return "director";
|
|
5415
5418
|
}
|
|
5416
|
-
if (index ===
|
|
5419
|
+
if (index === "�prd") {
|
|
5417
5420
|
return "producer";
|
|
5418
5421
|
}
|
|
5419
|
-
if (index ===
|
|
5422
|
+
if (index === "�des") {
|
|
5420
5423
|
return "description";
|
|
5421
5424
|
}
|
|
5422
5425
|
return null;
|
|
@@ -8303,7 +8306,7 @@ var getAvailableInfo = ({
|
|
|
8303
8306
|
if (key === "m3uStreams") {
|
|
8304
8307
|
return m3uHasStreams(state);
|
|
8305
8308
|
}
|
|
8306
|
-
throw new Error(`Unknown
|
|
8309
|
+
throw new Error(`Unknown field passed: ${key}. Available fields: ${Object.keys(state.fields).join(", ")}`);
|
|
8307
8310
|
});
|
|
8308
8311
|
const entries = [];
|
|
8309
8312
|
let i = 0;
|
|
@@ -9463,8 +9466,16 @@ var parseIlstBox = ({
|
|
|
9463
9466
|
const entries = [];
|
|
9464
9467
|
while (iterator.counter.getOffset() < size + offset) {
|
|
9465
9468
|
const metadataSize = iterator.getUint32();
|
|
9466
|
-
const index = iterator.
|
|
9467
|
-
if (index
|
|
9469
|
+
const index = iterator.getAtom();
|
|
9470
|
+
if (!index.startsWith("�") && !index.startsWith("\x00")) {
|
|
9471
|
+
if (index === "skip") {
|
|
9472
|
+
iterator.discard(metadataSize - 8);
|
|
9473
|
+
continue;
|
|
9474
|
+
}
|
|
9475
|
+
if (index === "----") {
|
|
9476
|
+
iterator.discard(metadataSize - 8);
|
|
9477
|
+
continue;
|
|
9478
|
+
}
|
|
9468
9479
|
iterator.discard(metadataSize - 8);
|
|
9469
9480
|
continue;
|
|
9470
9481
|
}
|
|
@@ -5295,40 +5295,40 @@ var getMetadataFromWav = (structure) => {
|
|
|
5295
5295
|
|
|
5296
5296
|
// src/metadata/metadata-from-iso.ts
|
|
5297
5297
|
var mapToKey = (index) => {
|
|
5298
|
-
if (index ===
|
|
5298
|
+
if (index === "�ART") {
|
|
5299
5299
|
return "artist";
|
|
5300
5300
|
}
|
|
5301
|
-
if (index ===
|
|
5301
|
+
if (index === "�alb") {
|
|
5302
5302
|
return "album";
|
|
5303
5303
|
}
|
|
5304
|
-
if (index ===
|
|
5304
|
+
if (index === "�cmt") {
|
|
5305
5305
|
return "comment";
|
|
5306
5306
|
}
|
|
5307
|
-
if (index ===
|
|
5307
|
+
if (index === "�day") {
|
|
5308
5308
|
return "releaseDate";
|
|
5309
5309
|
}
|
|
5310
|
-
if (index ===
|
|
5310
|
+
if (index === "�gen") {
|
|
5311
5311
|
return "genre";
|
|
5312
5312
|
}
|
|
5313
|
-
if (index ===
|
|
5313
|
+
if (index === "�nam") {
|
|
5314
5314
|
return "title";
|
|
5315
5315
|
}
|
|
5316
|
-
if (index ===
|
|
5316
|
+
if (index === "�too") {
|
|
5317
5317
|
return "encoder";
|
|
5318
5318
|
}
|
|
5319
|
-
if (index ===
|
|
5319
|
+
if (index === "�wrt") {
|
|
5320
5320
|
return "writer";
|
|
5321
5321
|
}
|
|
5322
|
-
if (index ===
|
|
5322
|
+
if (index === "�cpy") {
|
|
5323
5323
|
return "copyright";
|
|
5324
5324
|
}
|
|
5325
|
-
if (index ===
|
|
5325
|
+
if (index === "�dir") {
|
|
5326
5326
|
return "director";
|
|
5327
5327
|
}
|
|
5328
|
-
if (index ===
|
|
5328
|
+
if (index === "�prd") {
|
|
5329
5329
|
return "producer";
|
|
5330
5330
|
}
|
|
5331
|
-
if (index ===
|
|
5331
|
+
if (index === "�des") {
|
|
5332
5332
|
return "description";
|
|
5333
5333
|
}
|
|
5334
5334
|
return null;
|
|
@@ -8215,7 +8215,7 @@ var getAvailableInfo = ({
|
|
|
8215
8215
|
if (key === "m3uStreams") {
|
|
8216
8216
|
return m3uHasStreams(state);
|
|
8217
8217
|
}
|
|
8218
|
-
throw new Error(`Unknown
|
|
8218
|
+
throw new Error(`Unknown field passed: ${key}. Available fields: ${Object.keys(state.fields).join(", ")}`);
|
|
8219
8219
|
});
|
|
8220
8220
|
const entries = [];
|
|
8221
8221
|
let i = 0;
|
|
@@ -9375,8 +9375,16 @@ var parseIlstBox = ({
|
|
|
9375
9375
|
const entries = [];
|
|
9376
9376
|
while (iterator.counter.getOffset() < size + offset) {
|
|
9377
9377
|
const metadataSize = iterator.getUint32();
|
|
9378
|
-
const index = iterator.
|
|
9379
|
-
if (index
|
|
9378
|
+
const index = iterator.getAtom();
|
|
9379
|
+
if (!index.startsWith("�") && !index.startsWith("\x00")) {
|
|
9380
|
+
if (index === "skip") {
|
|
9381
|
+
iterator.discard(metadataSize - 8);
|
|
9382
|
+
continue;
|
|
9383
|
+
}
|
|
9384
|
+
if (index === "----") {
|
|
9385
|
+
iterator.discard(metadataSize - 8);
|
|
9386
|
+
continue;
|
|
9387
|
+
}
|
|
9380
9388
|
iterator.discard(metadataSize - 8);
|
|
9381
9389
|
continue;
|
|
9382
9390
|
}
|
package/dist/has-all-info.js
CHANGED
|
@@ -90,7 +90,7 @@ const getAvailableInfo = ({ state, }) => {
|
|
|
90
90
|
if (key === 'm3uStreams') {
|
|
91
91
|
return (0, get_streams_1.m3uHasStreams)(state);
|
|
92
92
|
}
|
|
93
|
-
throw new Error(`Unknown
|
|
93
|
+
throw new Error(`Unknown field passed: ${key}. Available fields: ${Object.keys(state.fields).join(', ')}`);
|
|
94
94
|
});
|
|
95
95
|
const entries = [];
|
|
96
96
|
let i = 0;
|
|
@@ -31,40 +31,40 @@ const truthy_1 = require("../truthy");
|
|
|
31
31
|
▪ Hex: A9 64 65 73
|
|
32
32
|
*/
|
|
33
33
|
const mapToKey = (index) => {
|
|
34
|
-
if (index ===
|
|
34
|
+
if (index === '�ART') {
|
|
35
35
|
return 'artist';
|
|
36
36
|
}
|
|
37
|
-
if (index ===
|
|
37
|
+
if (index === '�alb') {
|
|
38
38
|
return 'album';
|
|
39
39
|
}
|
|
40
|
-
if (index ===
|
|
40
|
+
if (index === '�cmt') {
|
|
41
41
|
return 'comment';
|
|
42
42
|
}
|
|
43
|
-
if (index ===
|
|
43
|
+
if (index === '�day') {
|
|
44
44
|
return 'releaseDate';
|
|
45
45
|
}
|
|
46
|
-
if (index ===
|
|
46
|
+
if (index === '�gen') {
|
|
47
47
|
return 'genre';
|
|
48
48
|
}
|
|
49
|
-
if (index ===
|
|
49
|
+
if (index === '�nam') {
|
|
50
50
|
return 'title';
|
|
51
51
|
}
|
|
52
|
-
if (index ===
|
|
52
|
+
if (index === '�too') {
|
|
53
53
|
return 'encoder';
|
|
54
54
|
}
|
|
55
|
-
if (index ===
|
|
55
|
+
if (index === '�wrt') {
|
|
56
56
|
return 'writer';
|
|
57
57
|
}
|
|
58
|
-
if (index ===
|
|
58
|
+
if (index === '�cpy') {
|
|
59
59
|
return 'copyright';
|
|
60
60
|
}
|
|
61
|
-
if (index ===
|
|
61
|
+
if (index === '�dir') {
|
|
62
62
|
return 'director';
|
|
63
63
|
}
|
|
64
|
-
if (index ===
|
|
64
|
+
if (index === '�prd') {
|
|
65
65
|
return 'producer';
|
|
66
66
|
}
|
|
67
|
-
if (index ===
|
|
67
|
+
if (index === '�des') {
|
|
68
68
|
return 'description';
|
|
69
69
|
}
|
|
70
70
|
return null;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.297";
|
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.297",
|
|
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.297",
|
|
14
|
+
"@remotion/eslint-config-internal": "4.0.297"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|