mediabunny 1.4.1 → 1.4.3
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/bundles/mediabunny.cjs +21 -4
- package/dist/bundles/mediabunny.min.cjs +3 -3
- package/dist/bundles/mediabunny.min.mjs +5 -5
- package/dist/bundles/mediabunny.mjs +21 -4
- package/dist/modules/matroska/matroska-demuxer.d.ts.map +1 -1
- package/dist/modules/matroska/matroska-demuxer.js +20 -1
- package/dist/modules/sample.d.ts.map +1 -1
- package/dist/modules/sample.js +3 -0
- package/package.json +1 -1
- package/src/matroska/matroska-demuxer.ts +24 -1
- package/src/sample.ts +3 -0
|
@@ -7491,7 +7491,8 @@ ${cue.notes ?? ""}`;
|
|
|
7491
7491
|
if (isVideoFrame(this._data)) {
|
|
7492
7492
|
return new _VideoSample(this._data.clone(), {
|
|
7493
7493
|
timestamp: this.timestamp,
|
|
7494
|
-
duration: this.duration
|
|
7494
|
+
duration: this.duration,
|
|
7495
|
+
rotation: this.rotation
|
|
7495
7496
|
});
|
|
7496
7497
|
} else if (this._data instanceof Uint8Array) {
|
|
7497
7498
|
return new _VideoSample(this._data.slice(), {
|
|
@@ -7500,7 +7501,8 @@ ${cue.notes ?? ""}`;
|
|
|
7500
7501
|
codedHeight: this.codedHeight,
|
|
7501
7502
|
timestamp: this.timestamp,
|
|
7502
7503
|
duration: this.duration,
|
|
7503
|
-
colorSpace: this.colorSpace
|
|
7504
|
+
colorSpace: this.colorSpace,
|
|
7505
|
+
rotation: this.rotation
|
|
7504
7506
|
});
|
|
7505
7507
|
} else {
|
|
7506
7508
|
return new _VideoSample(this._data, {
|
|
@@ -7509,7 +7511,8 @@ ${cue.notes ?? ""}`;
|
|
|
7509
7511
|
codedHeight: this.codedHeight,
|
|
7510
7512
|
timestamp: this.timestamp,
|
|
7511
7513
|
duration: this.duration,
|
|
7512
|
-
colorSpace: this.colorSpace
|
|
7514
|
+
colorSpace: this.colorSpace,
|
|
7515
|
+
rotation: this.rotation
|
|
7513
7516
|
});
|
|
7514
7517
|
}
|
|
7515
7518
|
}
|
|
@@ -14207,7 +14210,9 @@ ${cue.notes ?? ""}`;
|
|
|
14207
14210
|
this.metadataReader.pos,
|
|
14208
14211
|
this.metadataReader.pos + MAX_HEADER_SIZE
|
|
14209
14212
|
);
|
|
14210
|
-
const
|
|
14213
|
+
const header = this.metadataReader.readElementHeader();
|
|
14214
|
+
const id = header.id;
|
|
14215
|
+
let size = header.size;
|
|
14211
14216
|
const startPos = this.metadataReader.pos;
|
|
14212
14217
|
if (id === 440786851 /* EBML */) {
|
|
14213
14218
|
assertDefinedSize(size);
|
|
@@ -14218,6 +14223,18 @@ ${cue.notes ?? ""}`;
|
|
|
14218
14223
|
if (size === null) {
|
|
14219
14224
|
break;
|
|
14220
14225
|
}
|
|
14226
|
+
} else if (id === 524531317 /* Cluster */) {
|
|
14227
|
+
if (size === null) {
|
|
14228
|
+
const nextElementPos = await this.clusterReader.searchForNextElementId(
|
|
14229
|
+
LEVEL_0_AND_1_EBML_IDS,
|
|
14230
|
+
fileSize
|
|
14231
|
+
);
|
|
14232
|
+
size = (nextElementPos ?? fileSize) - startPos;
|
|
14233
|
+
}
|
|
14234
|
+
const lastSegment = last(this.segments);
|
|
14235
|
+
if (lastSegment) {
|
|
14236
|
+
lastSegment.elementEndPos = startPos + size;
|
|
14237
|
+
}
|
|
14221
14238
|
}
|
|
14222
14239
|
assertDefinedSize(size);
|
|
14223
14240
|
this.metadataReader.pos = startPos + size;
|