mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Merge main into release for tag v1.9.2
This commit is contained in:
+1
-3
@@ -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';
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
for await (const packet of sink.packets()) {
|
||||
console.log(packet);
|
||||
|
||||
if (packet.timestamp > 135) break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Generated
+6
-6
@@ -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
@@ -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,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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user