@ahmedrowaihi/mediabunny 1.65.2-beta.579 → 1.65.2-beta.583
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 +9 -22
- package/dist/bundles/mediabunny.min.cjs +21 -21
- package/dist/bundles/mediabunny.min.mjs +21 -21
- package/dist/bundles/mediabunny.mjs +9 -22
- package/dist/bundles/mediabunny.node.cjs +9 -22
- package/dist/modules/src/crypto/box-tree.js +4 -18
- package/dist/modules/src/isobmff/isobmff-demuxer.d.ts +5 -3
- package/dist/modules/src/isobmff/isobmff-demuxer.d.ts.map +1 -1
- package/dist/modules/src/isobmff/isobmff-demuxer.js +4 -7
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/crypto/box-tree.ts +6 -19
- package/src/isobmff/isobmff-demuxer.ts +9 -10
|
@@ -9651,7 +9651,7 @@ var Mediabunny = (() => {
|
|
|
9651
9651
|
this.currentTrack = track;
|
|
9652
9652
|
track.currentFragmentState = {
|
|
9653
9653
|
baseDataOffset: this.currentFragment.implicitBaseDataOffset,
|
|
9654
|
-
|
|
9654
|
+
implicitBaseShift: this.currentFragment.moofOffset - this.currentFragment.implicitBaseDataOffset,
|
|
9655
9655
|
sampleDescriptionIndex: defaults?.defaultSampleDescriptionIndex ?? null,
|
|
9656
9656
|
defaultSampleDuration: defaults?.defaultSampleDuration ?? null,
|
|
9657
9657
|
defaultSampleSize: defaults?.defaultSampleSize ?? null,
|
|
@@ -9661,10 +9661,10 @@ var Mediabunny = (() => {
|
|
|
9661
9661
|
};
|
|
9662
9662
|
if (baseDataOffsetPresent) {
|
|
9663
9663
|
track.currentFragmentState.baseDataOffset = readU64Be(slice);
|
|
9664
|
-
track.currentFragmentState.
|
|
9664
|
+
track.currentFragmentState.implicitBaseShift = null;
|
|
9665
9665
|
} else if (defaultBaseIsMoof) {
|
|
9666
9666
|
track.currentFragmentState.baseDataOffset = this.currentFragment.moofOffset;
|
|
9667
|
-
track.currentFragmentState.
|
|
9667
|
+
track.currentFragmentState.implicitBaseShift = null;
|
|
9668
9668
|
}
|
|
9669
9669
|
if (sampleDescriptionIndexPresent) {
|
|
9670
9670
|
track.currentFragmentState.sampleDescriptionIndex = readU32Be(slice);
|
|
@@ -9741,7 +9741,7 @@ var Mediabunny = (() => {
|
|
|
9741
9741
|
track,
|
|
9742
9742
|
currentTimestamp: 0,
|
|
9743
9743
|
currentOffset: track.currentFragmentState.baseDataOffset + (dataOffset ?? 0),
|
|
9744
|
-
implicitBaseShift: track.currentFragmentState.
|
|
9744
|
+
implicitBaseShift: track.currentFragmentState.implicitBaseShift || null,
|
|
9745
9745
|
startTimestamp: 0,
|
|
9746
9746
|
endTimestamp: 0,
|
|
9747
9747
|
firstKeyFrameTimestamp: null,
|
|
@@ -46798,9 +46798,9 @@ ${cue.notes ?? ""}`;
|
|
|
46798
46798
|
let offset = 0;
|
|
46799
46799
|
const size = view2.getUint32(offset, false);
|
|
46800
46800
|
offset += 4;
|
|
46801
|
-
const
|
|
46801
|
+
const boxType = view2.getUint32(offset, false);
|
|
46802
46802
|
offset += 4;
|
|
46803
|
-
if (
|
|
46803
|
+
if (boxType !== 1886614376) {
|
|
46804
46804
|
return null;
|
|
46805
46805
|
}
|
|
46806
46806
|
if (size > pssh.length) {
|
|
@@ -58657,22 +58657,10 @@ ${baseUrl}${p.getFileName()}`;
|
|
|
58657
58657
|
}
|
|
58658
58658
|
return resolved;
|
|
58659
58659
|
};
|
|
58660
|
-
var boxType = (bytes2, offset) => String.fromCharCode(bytes2[offset], bytes2[offset + 1], bytes2[offset + 2], bytes2[offset + 3]);
|
|
58661
58660
|
var parseBoxes = (bytes2, start, end) => {
|
|
58662
58661
|
const boxes = [];
|
|
58663
|
-
|
|
58664
|
-
|
|
58665
|
-
let size = readU323(bytes2, offset);
|
|
58666
|
-
const type = boxType(bytes2, offset + 4);
|
|
58667
|
-
let headerSize = 8;
|
|
58668
|
-
if (size === 1) {
|
|
58669
|
-
size = readU323(bytes2, offset + 12);
|
|
58670
|
-
headerSize = 16;
|
|
58671
|
-
} else if (size === 0) {
|
|
58672
|
-
size = end - offset;
|
|
58673
|
-
}
|
|
58674
|
-
const contentStart = offset + headerSize;
|
|
58675
|
-
const contentEnd = offset + size;
|
|
58662
|
+
const view2 = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
58663
|
+
eachBox(view2, start, end, (type, contentStart, contentEnd) => {
|
|
58676
58664
|
const sampleEntryPrefix = SAMPLE_ENTRY_PREFIX[type];
|
|
58677
58665
|
if (CONTAINERS.has(type)) {
|
|
58678
58666
|
boxes.push({ type, children: parseBoxes(bytes2, contentStart, contentEnd) });
|
|
@@ -58692,8 +58680,7 @@ ${baseUrl}${p.getFileName()}`;
|
|
|
58692
58680
|
} else {
|
|
58693
58681
|
boxes.push({ type, data: copyOf(bytes2, contentStart, contentEnd) });
|
|
58694
58682
|
}
|
|
58695
|
-
|
|
58696
|
-
}
|
|
58683
|
+
});
|
|
58697
58684
|
return boxes;
|
|
58698
58685
|
};
|
|
58699
58686
|
var measureBox = (box2) => {
|