Merge main into release for tag v1.50.1

This commit is contained in:
github-actions[bot]
2026-07-01 13:30:58 +00:00
12 changed files with 68 additions and 26 deletions
+19
View File
@@ -26,6 +26,25 @@ Alternatively, directly include them using a script tag:
This will expose the global objects `Mediabunny` and `MediabunnyProres`. Use `mediabunny-prores.d.ts` to provide types for these globals. You can download the built distribution files from the [releases page](https://github.com/Vanilagy/mediabunny/releases).
## Setup
`@mediabunny/prores` can make use of shared-memory multithreading to achieve maximum performance. To enable this in browsers, your website must be cross-origin isolated by setting the following response headers:
```
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
```
Alternatively, you can use:
```
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
```
which is generally more permissive but is not supported in Safari (of course).
---
If you cannot enable cross-origin isolation, `@mediabunny/prores` will fall back to a slower multithreading algorithm.
## Usage
```ts
+12 -12
View File
@@ -1,12 +1,12 @@
{
"name": "mediabunny",
"version": "1.50.0",
"version": "1.50.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mediabunny",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"workspaces": [
".",
@@ -10963,9 +10963,9 @@
"optional": true
},
"node_modules/turbores": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/turbores/-/turbores-1.1.1.tgz",
"integrity": "sha512-uC2bBqMgMzeE/K4/zeUJd3IwvDm9+0JtNXkiBuc7Sg1L8OaeAhk+VCgoiqDgDdwVaqF3/lztEjrSgt8k15XyYw==",
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/turbores/-/turbores-1.1.2.tgz",
"integrity": "sha512-6k3XH+sG8uOCJEBamKhAXFwIAfLqz7LAQr2mmEx2UBl6zC+4XAGQtp1fGEugnVl2w8Ec5GOUvD+b0tyxUJvmHg==",
"license": "MPL-2.0",
"funding": {
"type": "individual",
@@ -12894,7 +12894,7 @@
},
"packages/aac-encoder": {
"name": "@mediabunny/aac-encoder",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"devDependencies": {
"@types/emscripten": "^1.40.1"
@@ -12909,7 +12909,7 @@
},
"packages/ac3": {
"name": "@mediabunny/ac3",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"devDependencies": {
"@types/emscripten": "^1.40.1"
@@ -12924,7 +12924,7 @@
},
"packages/flac-encoder": {
"name": "@mediabunny/flac-encoder",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"devDependencies": {
"@types/emscripten": "^1.40.1"
@@ -12939,7 +12939,7 @@
},
"packages/mp3-encoder": {
"name": "@mediabunny/mp3-encoder",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"devDependencies": {
"@types/emscripten": "^1.40.1"
@@ -12954,10 +12954,10 @@
},
"packages/prores": {
"name": "@mediabunny/prores",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"dependencies": {
"turbores": "^1.1.1"
"turbores": "^1.1.2"
},
"funding": {
"type": "individual",
@@ -12969,7 +12969,7 @@
},
"packages/server": {
"name": "@mediabunny/server",
"version": "1.50.0",
"version": "1.50.1",
"license": "MPL-2.0",
"dependencies": {
"@mediabunny/prores": "^1.50.0",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "mediabunny",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"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/aac-encoder",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"description": "AAC encoder extension for Mediabunny, based on FFmpeg.",
"main": "./dist/bundles/mediabunny-aac-encoder.mjs",
"module": "./dist/bundles/mediabunny-aac-encoder.mjs",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/ac3",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"description": "AC-3 and E-AC-3 (Dolby Digital) decoder and encoder extension for Mediabunny, based on FFmpeg.",
"main": "./dist/bundles/mediabunny-ac3.mjs",
"module": "./dist/bundles/mediabunny-ac3.mjs",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/flac-encoder",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"description": "FLAC encoder extension for Mediabunny, based on libFLAC.",
"main": "./dist/bundles/mediabunny-flac-encoder.mjs",
"module": "./dist/bundles/mediabunny-flac-encoder.mjs",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/mp3-encoder",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"description": "MP3 encoder extension for Mediabunny, based on LAME.",
"main": "./dist/bundles/mediabunny-mp3-encoder.mjs",
"module": "./dist/bundles/mediabunny-mp3-encoder.mjs",
+19
View File
@@ -28,6 +28,25 @@ Alternatively, directly include them using a script tag:
This will expose the global objects `Mediabunny` and `MediabunnyProres`. Use `mediabunny-prores.d.ts` to provide types for these globals. You can download the built distribution files from the [releases page](https://github.com/Vanilagy/mediabunny/releases).
## Setup
`@mediabunny/prores` can make use of shared-memory multithreading to achieve maximum performance. To enable this in browsers, your website must be cross-origin isolated by setting the following response headers:
```
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
```
Alternatively, you can use:
```
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
```
which is generally more permissive but is not supported in Safari (of course).
---
If you cannot enable cross-origin isolation, `@mediabunny/prores` will fall back to a slower multithreading algorithm.
## Usage
```ts
+2 -6
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/prores",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"description": "Apple ProRes decoder extension for Mediabunny, based on TurboRes.",
"main": "./dist/bundles/mediabunny-prores.mjs",
"module": "./dist/bundles/mediabunny-prores.mjs",
@@ -19,10 +19,6 @@
"src"
],
"sideEffects": false,
"browser": {
"node:worker_threads": false,
"node:os": false
},
"license": "MPL-2.0",
"repository": {
"type": "git",
@@ -38,7 +34,7 @@
"url": "https://github.com/sponsors/Vanilagy"
},
"dependencies": {
"turbores": "^1.1.1"
"turbores": "^1.1.2"
},
"peerDependencies": {
"mediabunny": "^1.49.0"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@mediabunny/server",
"author": "Vanilagy",
"version": "1.50.0",
"version": "1.50.1",
"description": "Adds full video and audio decoder and encoder support to Mediabunny for use in server-side environments (Node, Bun, Deno). Based on NodeAV.",
"main": "./dist/bundles/mediabunny-server.cjs",
"module": "./dist/bundles/mediabunny-server.mjs",
+6 -2
View File
@@ -1329,9 +1329,13 @@ export class Conversion {
firstSample.close();
await tempOutput.finalize();
} catch (error) {
Logging._info('Error when probing encoder support. Falling back to rerender path.', error);
needsRerender = true;
Logging._warn(
'An error occurred when probing encoder support. Falling back to rerender path.', error,
);
void tempOutput.cancel();
needsRerender = true;
encodingConfig.transform.force = true;
}
} else {
await tempOutput.cancel();
+4
View File
@@ -36,6 +36,7 @@ import {
setUint24,
toUint8Array,
UnthrottledTimerHandle,
wait,
} from './misc';
import { Muxer } from './muxer';
import { SubtitleParser } from './subtitles';
@@ -878,6 +879,9 @@ class VideoEncoderWrapper {
// These are wired in series, therefore they must also be flushed in series
await this.encoder.flush();
await this.alphaEncoder?.flush();
// Workaround for https://issues.chromium.org/issues/529852980 to give it time for errors to surface
await wait(25);
}
if (this.encoder.state !== 'closed') {