mediabunny 1.32.0 → 1.32.1
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 +4 -1
- package/dist/bundles/mediabunny.min.cjs +1 -1
- package/dist/bundles/mediabunny.min.mjs +1 -1
- package/dist/bundles/mediabunny.mjs +4 -1
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/dist/modules/src/wave/wave-demuxer.js +4 -1
- package/package.json +1 -1
- package/src/wave/wave-demuxer.ts +5 -1
|
@@ -13797,6 +13797,9 @@ var Mediabunny = (() => {
|
|
|
13797
13797
|
return 0;
|
|
13798
13798
|
}
|
|
13799
13799
|
async getPacketAtIndex(packetIndex, options) {
|
|
13800
|
+
if (packetIndex < 0) {
|
|
13801
|
+
return null;
|
|
13802
|
+
}
|
|
13800
13803
|
assert(this.demuxer.audioInfo);
|
|
13801
13804
|
const startOffset = packetIndex * PACKET_SIZE_IN_FRAMES * this.demuxer.audioInfo.blockSizeInBytes;
|
|
13802
13805
|
if (startOffset >= this.demuxer.dataSize) {
|
|
@@ -13826,7 +13829,7 @@ var Mediabunny = (() => {
|
|
|
13826
13829
|
const duration = sizeInBytes / this.demuxer.audioInfo.blockSizeInBytes / this.demuxer.audioInfo.sampleRate;
|
|
13827
13830
|
this.demuxer.lastKnownPacketIndex = Math.max(
|
|
13828
13831
|
packetIndex,
|
|
13829
|
-
|
|
13832
|
+
this.demuxer.lastKnownPacketIndex
|
|
13830
13833
|
);
|
|
13831
13834
|
return new EncodedPacket(
|
|
13832
13835
|
data,
|