mediabunny 1.36.0 → 1.37.0
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 +10 -9
- package/dist/bundles/mediabunny.min.cjs +3 -2
- package/dist/bundles/mediabunny.min.mjs +3 -2
- package/dist/bundles/mediabunny.mjs +10 -9
- package/dist/modules/src/conversion.d.ts.map +1 -1
- package/dist/modules/src/conversion.js +3 -0
- package/dist/modules/src/flac/flac-muxer.d.ts.map +1 -1
- package/dist/modules/src/flac/flac-muxer.js +6 -9
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/conversion.ts +6 -0
- package/src/flac/flac-muxer.ts +8 -12
|
@@ -20036,10 +20036,6 @@ var Mediabunny = (() => {
|
|
|
20036
20036
|
}
|
|
20037
20037
|
async addEncodedAudioPacket(track, packet, meta) {
|
|
20038
20038
|
const release = await this.mutex.acquire();
|
|
20039
|
-
validateAudioChunkMetadata(meta);
|
|
20040
|
-
assert(meta);
|
|
20041
|
-
assert(meta.decoderConfig);
|
|
20042
|
-
assert(meta.decoderConfig.description);
|
|
20043
20039
|
try {
|
|
20044
20040
|
this.validateAndNormalizeTimestamp(
|
|
20045
20041
|
track,
|
|
@@ -20047,12 +20043,12 @@ var Mediabunny = (() => {
|
|
|
20047
20043
|
packet.type === "key"
|
|
20048
20044
|
);
|
|
20049
20045
|
if (this.sampleRate === null) {
|
|
20046
|
+
validateAudioChunkMetadata(meta);
|
|
20047
|
+
assert(meta);
|
|
20048
|
+
assert(meta.decoderConfig);
|
|
20049
|
+
assert(meta.decoderConfig.description);
|
|
20050
20050
|
this.sampleRate = meta.decoderConfig.sampleRate;
|
|
20051
|
-
}
|
|
20052
|
-
if (this.channels === null) {
|
|
20053
20051
|
this.channels = meta.decoderConfig.numberOfChannels;
|
|
20054
|
-
}
|
|
20055
|
-
if (this.bitsPerSample === null) {
|
|
20056
20052
|
const descriptionBitstream = new Bitstream(
|
|
20057
20053
|
toUint8Array(meta.decoderConfig.description)
|
|
20058
20054
|
);
|
|
@@ -20064,7 +20060,7 @@ var Mediabunny = (() => {
|
|
|
20064
20060
|
this.writeVorbisCommentAndPictureBlock();
|
|
20065
20061
|
}
|
|
20066
20062
|
const slice = FileSlice4.tempFromBytes(packet.data);
|
|
20067
|
-
|
|
20063
|
+
slice.skip(2);
|
|
20068
20064
|
const bytes2 = readBytes(slice, 2);
|
|
20069
20065
|
const bitstream = new Bitstream(bytes2);
|
|
20070
20066
|
const blockSizeOrUncommon = getBlockSizeOrUncommon(bitstream.readBits(4));
|
|
@@ -28791,6 +28787,11 @@ The @mediabunny/mp3-encoder extension package provides support for encoding MP3.
|
|
|
28791
28787
|
"\nThe @mediabunny/ac3 extension package provides support for encoding and decoding AC-3/E-AC-3."
|
|
28792
28788
|
);
|
|
28793
28789
|
}
|
|
28790
|
+
if (codecs.includes("flac")) {
|
|
28791
|
+
elements.push(
|
|
28792
|
+
"\nThe @mediabunny/flac-encoder extension package provides support for encoding FLAC."
|
|
28793
|
+
);
|
|
28794
|
+
}
|
|
28794
28795
|
} else {
|
|
28795
28796
|
elements.push("\nCheck the discardedTracks field for more info.");
|
|
28796
28797
|
}
|