Merge main into release for tag v1.9.2

This commit is contained in:
github-actions[bot]
2025-08-20 12:34:02 +00:00
7 changed files with 22 additions and 14 deletions
+1 -3
View File
@@ -24,9 +24,7 @@
chunked: true,
chunkSize: 2**20
});
const outputFormat = new Mediabunny.AdtsOutputFormat({
onFrame: console.log
});
const outputFormat = new Mediabunny.Mp4OutputFormat({});
const button = document.createElement('button');
button.textContent = 'Cancel';
+2
View File
@@ -21,6 +21,8 @@
for await (const packet of sink.packets()) {
console.log(packet);
if (packet.timestamp > 135) break;
}
/*
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "mediabunny",
"version": "1.9.1",
"version": "1.9.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mediabunny",
"version": "1.9.1",
"version": "1.9.2",
"license": "MPL-2.0",
"workspaces": [
"packages/*"
@@ -5900,9 +5900,9 @@
}
},
"node_modules/mediabunny": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.9.0.tgz",
"integrity": "sha512-pNviaYemNRjrIbx1K1+Q1xcCbD1PRVp6i1+0GXJf5NPVeHUVJfJY2xkhtBjbd4LpbqCTqRoSPYxcrOmIRt14bw==",
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.9.1.tgz",
"integrity": "sha512-DghqcYW2s8LsZ9kErFeZdm6308BEABYs8SkY1z3Y7v3LWgPNvBmkXk7Yt+EKcpEGEFjGgDGoTapOjrrrNh7dQA==",
"license": "MPL-2.0",
"peer": true,
"workspaces": [
@@ -9017,7 +9017,7 @@
},
"packages/mp3-encoder": {
"name": "@mediabunny/mp3-encoder",
"version": "1.9.1",
"version": "1.9.2",
"license": "MPL-2.0",
"devDependencies": {
"@types/emscripten": "^1.40.1"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "mediabunny",
"author": "Vanilagy",
"version": "1.9.1",
"version": "1.9.2",
"description": "Pure TypeScript media toolkit for reading, writing, and converting media files, directly in the browser.",
"type": "module",
"workspaces": [
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/mp3-encoder",
"author": "Vanilagy",
"version": "1.9.1",
"version": "1.9.2",
"description": "MP3 encoder extension for Mediabunny, based on LAME.",
"main": "./dist/bundles/mediabunny-mp3-encoder.mjs",
"module": "./dist/bundles/mediabunny-mp3-encoder.mjs",
+2
View File
@@ -50,6 +50,8 @@ export class AdtsMuxer extends Muxer {
const release = await this.mutex.acquire();
try {
this.validateAndNormalizeTimestamp(track, packet.timestamp, packet.type === 'key');
if (!this.audioSpecificConfig) {
validateAudioChunkMetadata(meta);
+9 -3
View File
@@ -291,14 +291,20 @@ export class IsobmffDemuxer extends Demuxer {
const lastWord = this.metadataReader.readU32();
const potentialMfraPos = sourceSize - lastWord;
if (potentialMfraPos >= 0 && potentialMfraPos < sourceSize) {
await this.metadataReader.reader.loadRange(potentialMfraPos, sourceSize);
if (potentialMfraPos >= 0 && potentialMfraPos <= sourceSize - MAX_BOX_HEADER_SIZE) {
// Load the header and a bit more, likely covering the entire box
await this.metadataReader.reader.loadRange(potentialMfraPos, potentialMfraPos + 2 ** 16);
this.metadataReader.pos = potentialMfraPos;
const boxInfo = this.metadataReader.readBoxHeader();
if (boxInfo.name === 'mfra') {
// We found the mfra box, allowing for much better random access. Let's parse it:
// We found the mfra box, allowing for much better random access. Let's parse it.
await this.metadataReader.reader.loadRange(
potentialMfraPos,
potentialMfraPos + boxInfo.totalSize,
);
this.readContiguousBoxes(boxInfo.contentSize);
}
}