Open source CapCut alternative.
TypeScript
chore(site): bump mediabunny to 1.61.0 and rebase its patches [rebuild]
David Leabc273b7821f
diff --git a/site/package-lock.json b/site/package-lock.jsonindex a50097aa..1fc21cff 100644--- a/site/package-lock.json+++ b/site/package-lock.json@@ -49,8 +49,8 @@"@google/genai": "2.21.0","@mdx-js/loader": "^3.1.1","@mdx-js/react": "^3.1.1",- "@mediabunny/prores": "^1.55.1",- "@mediabunny/server": "^1.55.1",+ "@mediabunny/prores": "^1.61.0",+ "@mediabunny/server": "^1.61.0","@mediapipe/tasks-vision": "^1.0.1","@modelcontextprotocol/client": "^2.0.0","@modelcontextprotocol/core": "^2.0.0",@@ -83,7 +83,7 @@"geist": "^1.7.2","linkedom": "^0.18.12","lucide-react": "^1.23.0",- "mediabunny": "^1.55.5",+ "mediabunny": "^1.61.0","next": "16.3.4","next-mdx-remote": "^6.0.0","node-av": "^6.1.1",@@ -3603,9 +3603,9 @@}},"node_modules/@mediabunny/prores": {- "version": "1.55.1",- "resolved": "https://registry.npmjs.org/@mediabunny/prores/-/prores-1.55.1.tgz",- "integrity": "sha512-0/nmBgGHLr8uDvWvhcVGygQEN75MM18BpdJCZv9jDmw0xE+dWxDcgth8Gw/xxEsMs0xrtKrQhQU4U6ZV5rxx+w==",+ "version": "1.61.0",+ "resolved": "https://registry.npmjs.org/@mediabunny/prores/-/prores-1.61.0.tgz",+ "integrity": "sha512-Ytd/Pc2SrifUmESw9/j4QF53mjJRtZSG670ZRkYkS0rWVS8mHI4wTDcbxiz/F1Dswbp8VQJtFzH/Y7c2+EoooQ==","license": "MPL-2.0","dependencies": {"turbores": "^1.2.2"@@ -3619,12 +3619,12 @@}},"node_modules/@mediabunny/server": {- "version": "1.55.1",- "resolved": "https://registry.npmjs.org/@mediabunny/server/-/server-1.55.1.tgz",- "integrity": "sha512-S296TDzp2RaMu8o9I1v5TSbLCkbXj76RhTsNRWTClVOQkmkzj2QYTpddFbGb61jvB7JwfK1jyZ9DFBK+3cTRAA==",+ "version": "1.61.0",+ "resolved": "https://registry.npmjs.org/@mediabunny/server/-/server-1.61.0.tgz",+ "integrity": "sha512-doK2insJcegwo4YI1Rg2jbwwIvavZ1b7Fj2pxgstgaa3y4d21CkxRk05bbxLeJ1RUMg9ulRP0tu/YbqVgeqLeQ==","license": "MPL-2.0","dependencies": {- "@mediabunny/prores": "^1.55.1",+ "@mediabunny/prores": "^1.61.0","node-av": "^6.0.0"},"funding": {@@ -14518,9 +14518,9 @@}},"node_modules/mediabunny": {- "version": "1.55.5",- "resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.55.5.tgz",- "integrity": "sha512-m0v6y8FGXiK+HKOc3AZqU+kJPLYsSKaLitmQNQIIHZKIGlTwQ34OF+X6Ul0K8iV4b03oPse10apwuoqbvmKeAA==",+ "version": "1.61.0",+ "resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.61.0.tgz",+ "integrity": "sha512-WciPOYwKZwgYkoBKcEK6JzzIf+w5whypPzFdOihOylZ/5Qv19FmNfRnTcaprH+jD136YpEASU30Eb6VNCJiz3A==","license": "MPL-2.0","workspaces": [".",diff --git a/site/package.json b/site/package.jsonindex 517abd8c..975aa5d0 100644--- a/site/package.json+++ b/site/package.json@@ -90,8 +90,8 @@"@google/genai": "2.21.0","@mdx-js/loader": "^3.1.1","@mdx-js/react": "^3.1.1",- "@mediabunny/prores": "^1.55.1",- "@mediabunny/server": "^1.55.1",+ "@mediabunny/prores": "^1.61.0",+ "@mediabunny/server": "^1.61.0","@mediapipe/tasks-vision": "^1.0.1","@modelcontextprotocol/client": "^2.0.0","@modelcontextprotocol/core": "^2.0.0",@@ -124,7 +124,7 @@"geist": "^1.7.2","linkedom": "^0.18.12","lucide-react": "^1.23.0",- "mediabunny": "^1.55.5",+ "mediabunny": "^1.61.0","next": "16.3.4","next-mdx-remote": "^6.0.0","node-av": "^6.1.1",diff --git a/site/patches/@mediabunny+prores+1.55.1.patch b/site/patches/@mediabunny+prores+1.61.0.patchsimilarity index 99%rename from site/patches/@mediabunny+prores+1.55.1.patchrename to site/patches/@mediabunny+prores+1.61.0.patchindex 99d6ce6b..5a10e2f2 100644--- a/site/patches/@mediabunny+prores+1.55.1.patch+++ b/site/patches/@mediabunny+prores+1.61.0.patch@@ -1,5 +1,5 @@diff --git a/node_modules/@mediabunny/prores/dist/bundles/mediabunny-prores.mjs b/node_modules/@mediabunny/prores/dist/bundles/mediabunny-prores.mjs-index b78d43b..31d0e10 100644+index 9c33e8d..2ae4ba0 100644--- a/node_modules/@mediabunny/prores/dist/bundles/mediabunny-prores.mjs+++ b/node_modules/@mediabunny/prores/dist/bundles/mediabunny-prores.mjs@@ -353,895 +353,8 @@ var Y = (t, e, r, o) => {diff --git a/site/patches/mediabunny+1.55.5.patch b/site/patches/mediabunny+1.61.0.patchsimilarity index 91%rename from site/patches/mediabunny+1.55.5.patchrename to site/patches/mediabunny+1.61.0.patchindex b7046ec6..aa7989ba 100644--- a/site/patches/mediabunny+1.55.5.patch+++ b/site/patches/mediabunny+1.61.0.patch@@ -1,8 +1,8 @@diff --git a/node_modules/mediabunny/dist/bundles/mediabunny.cjs b/node_modules/mediabunny/dist/bundles/mediabunny.cjs-index 3c514ad..c225790 100644+index f984c84..39c0530 100644--- a/node_modules/mediabunny/dist/bundles/mediabunny.cjs+++ b/node_modules/mediabunny/dist/bundles/mediabunny.cjs-@@ -23941,11 +23941,13 @@ var Mediabunny = (() => {+@@ -24644,11 +24644,13 @@ var Mediabunny = (() => {}};var computeMaxQueueSize = (decodedSampleQueueSize) => {@@ -10,15 +10,15 @@ index 3c514ad..c225790 100644+ return decodedSampleQueueSize === 0 ? 16 : 8;};var VideoDecoderWrapper = class extends DecoderWrapper {-- constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution) {-+ constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride = null, transformPacket = null) {+- constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution) {++ constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride = null, transformPacket = null) {super(onSample, onError);+ // The sink's packet hook: rewrites packet bytes before they reach the WebCodecs decoder.+ this.transformPacket = transformPacket;this.codec = codec;this.decoderConfig = decoderConfig;this.rotation = rotation;-@@ -23954,6 +23956,13 @@ var Mediabunny = (() => {+@@ -24658,6 +24660,13 @@ var Mediabunny = (() => {this.customDecoder = null;this.customDecoderCallSerializer = new CallSerializer();this.customDecoderQueueSize = 0;@@ -32,7 +32,7 @@ index 3c514ad..c225790 100644this.inputTimestamps = [];// Timestamps input into the decoder, sorted.this.sampleQueue = [];-@@ -23985,6 +23994,17 @@ var Mediabunny = (() => {+@@ -24689,6 +24698,17 @@ var Mediabunny = (() => {if (!(sample instanceof VideoSample)) {throw new TypeError("The argument passed to onSample must be a VideoSample.");}@@ -50,7 +50,7 @@ index 3c514ad..c225790 100644this.finalizeAndEmitSample(sample);};this.customDecoder.onError = (error) => {-@@ -24031,6 +24051,7 @@ var Mediabunny = (() => {+@@ -24744,6 +24764,7 @@ var Mediabunny = (() => {const stack = new Error("Decoding error").stack;this.decoder = new VideoDecoder({output: (frame) => {@@ -58,7 +58,7 @@ index 3c514ad..c225790 100644try {colorHandler(frame);} catch (error) {-@@ -24047,13 +24068,10 @@ var Mediabunny = (() => {+@@ -24760,13 +24781,10 @@ var Mediabunny = (() => {}getDecodeQueueSize() {if (this.customDecoder) {@@ -74,7 +74,7 @@ index 3c514ad..c225790 100644}}decode(packet) {-@@ -24098,6 +24116,13 @@ var Mediabunny = (() => {+@@ -24824,6 +24842,13 @@ var Mediabunny = (() => {}}}@@ -88,8 +88,8 @@ index 3c514ad..c225790 100644this.decoder.decode(packet.toEncodedVideoChunk());this.decodeAlphaData(packet);}-@@ -24213,6 +24238,49 @@ var Mediabunny = (() => {- sample.setRotation(this.rotation);+@@ -24940,6 +24965,49 @@ var Mediabunny = (() => {+ sample.setFlip(this.flip);this.onSample(sample);}+ /**@@ -138,7 +138,7 @@ index 3c514ad..c225790 100644async mergeAlpha(color, alpha) {const resolver = promiseWithResolvers();this.mergeAlphaPromises.push(resolver.promise);-@@ -24241,6 +24309,11 @@ var Mediabunny = (() => {+@@ -24968,6 +25036,11 @@ var Mediabunny = (() => {async flush() {if (this.customDecoder) {await this.customDecoderCallSerializer.call(() => this.customDecoder.flush());@@ -150,7 +150,7 @@ index 3c514ad..c225790 100644} else {assert(this.decoder);await Promise.all([-@@ -24265,6 +24338,7 @@ var Mediabunny = (() => {+@@ -24992,6 +25065,7 @@ var Mediabunny = (() => {}this.sampleQueue.length = 0;}@@ -158,7 +158,7 @@ index 3c514ad..c225790 100644this.currentPacketIndex = 0;this.raslSkipped = false;}-@@ -24521,6 +24595,18 @@ var Mediabunny = (() => {+@@ -25248,6 +25322,18 @@ var Mediabunny = (() => {if (decoderOptions.optimizeForLatency !== void 0 && typeof decoderOptions.optimizeForLatency !== "boolean") {throw new TypeError("decoderOptions.optimizeForLatency, when provided, must be a boolean.");}@@ -177,7 +177,7 @@ index 3c514ad..c225790 100644};var VideoSampleSink = class extends BaseMediaSampleSink {/** Creates a new {@link VideoSampleSink} for the given {@link InputVideoTrack}. */-@@ -24548,12 +24634,19 @@ var Mediabunny = (() => {+@@ -25276,12 +25362,19 @@ var Mediabunny = (() => {let decoderConfig = await this._track.getDecoderConfig();const timeResolution = await this._track.getTimeResolution();assert(codec && decoderConfig);@@ -191,19 +191,19 @@ index 3c514ad..c225790 100644+ // caller asked, in-band tags included.+ ...colorSpaceOverride ? { colorSpace: colorSpaceOverride } : {}};-- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution);+- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution);+ if (this._decoderOptions.transformConfig) {+ decoderConfig = this._decoderOptions.transformConfig(decoderConfig);+ }-+ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);++ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);}/** @internal */_createPacketSink() {diff --git a/node_modules/mediabunny/dist/bundles/mediabunny.mjs b/node_modules/mediabunny/dist/bundles/mediabunny.mjs-index 9a62e92..9da68cc 100644+index e675b1f..fc4477d 100644--- a/node_modules/mediabunny/dist/bundles/mediabunny.mjs+++ b/node_modules/mediabunny/dist/bundles/mediabunny.mjs-@@ -23784,11 +23784,13 @@ var BaseMediaSampleSink = class {+@@ -24487,11 +24487,13 @@ var BaseMediaSampleSink = class {}};var computeMaxQueueSize = (decodedSampleQueueSize) => {@@ -211,15 +211,15 @@ index 9a62e92..9da68cc 100644+ return decodedSampleQueueSize === 0 ? 16 : 8;};var VideoDecoderWrapper = class extends DecoderWrapper {-- constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution) {-+ constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride = null, transformPacket = null) {+- constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution) {++ constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride = null, transformPacket = null) {super(onSample, onError);+ // The sink's packet hook: rewrites packet bytes before they reach the WebCodecs decoder.+ this.transformPacket = transformPacket;this.codec = codec;this.decoderConfig = decoderConfig;this.rotation = rotation;-@@ -23797,6 +23799,13 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24501,6 +24503,13 @@ var VideoDecoderWrapper = class extends DecoderWrapper {this.customDecoder = null;this.customDecoderCallSerializer = new CallSerializer();this.customDecoderQueueSize = 0;@@ -233,7 +233,7 @@ index 9a62e92..9da68cc 100644this.inputTimestamps = [];// Timestamps input into the decoder, sorted.this.sampleQueue = [];-@@ -23828,6 +23837,17 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24532,6 +24541,17 @@ var VideoDecoderWrapper = class extends DecoderWrapper {if (!(sample instanceof VideoSample)) {throw new TypeError("The argument passed to onSample must be a VideoSample.");}@@ -251,7 +251,7 @@ index 9a62e92..9da68cc 100644this.finalizeAndEmitSample(sample);};this.customDecoder.onError = (error) => {-@@ -23874,6 +23894,7 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24587,6 +24607,7 @@ var VideoDecoderWrapper = class extends DecoderWrapper {const stack = new Error("Decoding error").stack;this.decoder = new VideoDecoder({output: (frame) => {@@ -259,7 +259,7 @@ index 9a62e92..9da68cc 100644try {colorHandler(frame);} catch (error) {-@@ -23890,13 +23911,10 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24603,13 +24624,10 @@ var VideoDecoderWrapper = class extends DecoderWrapper {}getDecodeQueueSize() {if (this.customDecoder) {@@ -275,7 +275,7 @@ index 9a62e92..9da68cc 100644}}decode(packet) {-@@ -23941,6 +23959,13 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24667,6 +24685,13 @@ var VideoDecoderWrapper = class extends DecoderWrapper {}}}@@ -289,8 +289,8 @@ index 9a62e92..9da68cc 100644this.decoder.decode(packet.toEncodedVideoChunk());this.decodeAlphaData(packet);}-@@ -24056,6 +24081,49 @@ var VideoDecoderWrapper = class extends DecoderWrapper {- sample.setRotation(this.rotation);+@@ -24783,6 +24808,49 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+ sample.setFlip(this.flip);this.onSample(sample);}+ /**@@ -339,7 +339,7 @@ index 9a62e92..9da68cc 100644async mergeAlpha(color, alpha) {const resolver = promiseWithResolvers();this.mergeAlphaPromises.push(resolver.promise);-@@ -24084,6 +24152,11 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24811,6 +24879,11 @@ var VideoDecoderWrapper = class extends DecoderWrapper {async flush() {if (this.customDecoder) {await this.customDecoderCallSerializer.call(() => this.customDecoder.flush());@@ -351,7 +351,7 @@ index 9a62e92..9da68cc 100644} else {assert(this.decoder);await Promise.all([-@@ -24108,6 +24181,7 @@ var VideoDecoderWrapper = class extends DecoderWrapper {+@@ -24835,6 +24908,7 @@ var VideoDecoderWrapper = class extends DecoderWrapper {}this.sampleQueue.length = 0;}@@ -359,7 +359,7 @@ index 9a62e92..9da68cc 100644this.currentPacketIndex = 0;this.raslSkipped = false;}-@@ -24364,6 +24438,18 @@ var validateVideoSinkDecoderOptions = (decoderOptions) => {+@@ -25091,6 +25165,18 @@ var validateVideoSinkDecoderOptions = (decoderOptions) => {if (decoderOptions.optimizeForLatency !== void 0 && typeof decoderOptions.optimizeForLatency !== "boolean") {throw new TypeError("decoderOptions.optimizeForLatency, when provided, must be a boolean.");}@@ -378,7 +378,7 @@ index 9a62e92..9da68cc 100644};var VideoSampleSink = class extends BaseMediaSampleSink {/** Creates a new {@link VideoSampleSink} for the given {@link InputVideoTrack}. */-@@ -24391,12 +24477,19 @@ var VideoSampleSink = class extends BaseMediaSampleSink {+@@ -25119,12 +25205,19 @@ var VideoSampleSink = class extends BaseMediaSampleSink {let decoderConfig = await this._track.getDecoderConfig();const timeResolution = await this._track.getTimeResolution();assert(codec && decoderConfig);@@ -392,31 +392,31 @@ index 9a62e92..9da68cc 100644+ // caller asked, in-band tags included.+ ...colorSpaceOverride ? { colorSpace: colorSpaceOverride } : {}};-- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution);+- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution);+ if (this._decoderOptions.transformConfig) {+ decoderConfig = this._decoderOptions.transformConfig(decoderConfig);+ }-+ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);++ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);}/** @internal */_createPacketSink() {diff --git a/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs b/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs-index 10786e4..6fe91dd 100644+index c828e19..ecf530c 100644--- a/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs+++ b/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs-@@ -23947,8 +23947,10 @@ var Mediabunny = (() => {+@@ -24650,8 +24650,10 @@ var Mediabunny = (() => {return decodedSampleQueueSize === 0 ? 40 : 8;};var VideoDecoderWrapper = class extends DecoderWrapper {-- constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution) {-+ constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride = null, transformPacket = null) {+- constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution) {++ constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride = null, transformPacket = null) {super(onSample, onError);+ // The sink's packet hook: rewrites packet bytes before they reach the WebCodecs decoder.+ this.transformPacket = transformPacket;this.codec = codec;this.decoderConfig = decoderConfig;this.rotation = rotation;-@@ -23957,6 +23959,12 @@ var Mediabunny = (() => {+@@ -24661,6 +24663,12 @@ var Mediabunny = (() => {this.customDecoder = null;this.customDecoderCallSerializer = new CallSerializer();this.customDecoderQueueSize = 0;@@ -429,7 +429,7 @@ index 10786e4..6fe91dd 100644this.inputTimestamps = [];// Timestamps input into the decoder, sorted.this.sampleQueue = [];-@@ -23988,6 +23996,17 @@ var Mediabunny = (() => {+@@ -24692,6 +24700,17 @@ var Mediabunny = (() => {if (!(sample instanceof VideoSample)) {throw new TypeError("The argument passed to onSample must be a VideoSample.");}@@ -447,7 +447,7 @@ index 10786e4..6fe91dd 100644this.finalizeAndEmitSample(sample);};this.customDecoder.onError = (error) => {-@@ -24050,7 +24069,7 @@ var Mediabunny = (() => {+@@ -24763,7 +24782,7 @@ var Mediabunny = (() => {}getDecodeQueueSize() {if (this.customDecoder) {@@ -456,7 +456,7 @@ index 10786e4..6fe91dd 100644} else {assert(this.decoder);return Math.max(-@@ -24101,6 +24120,12 @@ var Mediabunny = (() => {+@@ -24827,6 +24846,12 @@ var Mediabunny = (() => {}}}@@ -469,8 +469,8 @@ index 10786e4..6fe91dd 100644this.decoder.decode(packet.toEncodedVideoChunk());this.decodeAlphaData(packet);}-@@ -24216,6 +24241,49 @@ var Mediabunny = (() => {- sample.setRotation(this.rotation);+@@ -24943,6 +24968,49 @@ var Mediabunny = (() => {+ sample.setFlip(this.flip);this.onSample(sample);}+ /**@@ -519,7 +519,7 @@ index 10786e4..6fe91dd 100644async mergeAlpha(color, alpha) {const resolver = promiseWithResolvers();this.mergeAlphaPromises.push(resolver.promise);-@@ -24244,6 +24312,11 @@ var Mediabunny = (() => {+@@ -24971,6 +25039,11 @@ var Mediabunny = (() => {async flush() {if (this.customDecoder) {await this.customDecoderCallSerializer.call(() => this.customDecoder.flush());@@ -531,7 +531,7 @@ index 10786e4..6fe91dd 100644} else {assert(this.decoder);await Promise.all([-@@ -24524,6 +24597,18 @@ var Mediabunny = (() => {+@@ -25251,6 +25324,18 @@ var Mediabunny = (() => {if (decoderOptions.optimizeForLatency !== void 0 && typeof decoderOptions.optimizeForLatency !== "boolean") {throw new TypeError("decoderOptions.optimizeForLatency, when provided, must be a boolean.");}@@ -550,7 +550,7 @@ index 10786e4..6fe91dd 100644};var VideoSampleSink = class extends BaseMediaSampleSink {/** Creates a new {@link VideoSampleSink} for the given {@link InputVideoTrack}. */-@@ -24551,12 +24636,19 @@ var Mediabunny = (() => {+@@ -25279,12 +25364,19 @@ var Mediabunny = (() => {let decoderConfig = await this._track.getDecoderConfig();const timeResolution = await this._track.getTimeResolution();assert(codec && decoderConfig);@@ -564,19 +564,19 @@ index 10786e4..6fe91dd 100644+ // caller asked, in-band tags included.+ ...colorSpaceOverride ? { colorSpace: colorSpaceOverride } : {}};-- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution);+- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution);+ if (this._decoderOptions.transformConfig) {+ decoderConfig = this._decoderOptions.transformConfig(decoderConfig);+ }-+ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);++ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);}/** @internal */_createPacketSink() {diff --git a/node_modules/mediabunny/dist/mediabunny.d.ts b/node_modules/mediabunny/dist/mediabunny.d.ts-index f0667c1..b556ba8 100644+index 1307312..1a2027e 100644--- a/node_modules/mediabunny/dist/mediabunny.d.ts+++ b/node_modules/mediabunny/dist/mediabunny.d.ts-@@ -5090,6 +5090,21 @@ export declare type VideoSinkDecoderOptions = {+@@ -5328,6 +5328,21 @@ export declare type VideoSinkDecoderOptions = {* before video frames are output.*/optimizeForLatency?: boolean;@@ -599,7 +599,7 @@ index f0667c1..b556ba8 100644/**diff --git a/node_modules/mediabunny/dist/modules/src/media-sink.d.ts b/node_modules/mediabunny/dist/modules/src/media-sink.d.ts-index c830d17..1308a21 100644+index 056c51c..2463224 100644--- a/node_modules/mediabunny/dist/modules/src/media-sink.d.ts+++ b/node_modules/mediabunny/dist/modules/src/media-sink.d.ts@@ -129,6 +129,21 @@ export type VideoSinkDecoderOptions = {@@ -625,7 +625,7 @@ index c830d17..1308a21 100644/*** A sink that retrieves decoded video samples (video frames) from a video track.diff --git a/node_modules/mediabunny/dist/modules/src/media-sink.js b/node_modules/mediabunny/dist/modules/src/media-sink.js-index da1cc3a..a3bdd0c 100644+index 9465e3b..4af78f2 100644--- a/node_modules/mediabunny/dist/modules/src/media-sink.js+++ b/node_modules/mediabunny/dist/modules/src/media-sink.js@@ -13,7 +13,7 @@ import { InputAudioTrack, InputTrack, InputVideoTrack } from './input-track.js';@@ -637,7 +637,7 @@ index da1cc3a..a3bdd0c 100644const validatePacketRetrievalOptions = (options) => {if (!options || typeof options !== 'object') {throw new TypeError('options must be an object.');-@@ -650,14 +650,17 @@ export class BaseMediaSampleSink {+@@ -662,14 +662,17 @@ export class BaseMediaSampleSink {}}const computeMaxQueueSize = (decodedSampleQueueSize) => {@@ -652,15 +652,15 @@ index da1cc3a..a3bdd0c 100644+ return decodedSampleQueueSize === 0 ? 16 : 8;};class VideoDecoderWrapper extends DecoderWrapper {-- constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution) {-+ constructor(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride = null, transformPacket = null) {+- constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution) {++ constructor(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride = null, transformPacket = null) {super(onSample, onError);+ // The sink's packet hook: rewrites packet bytes before they reach the WebCodecs decoder.+ this.transformPacket = transformPacket;this.codec = codec;this.decoderConfig = decoderConfig;this.rotation = rotation;-@@ -666,6 +669,13 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -679,6 +682,13 @@ class VideoDecoderWrapper extends DecoderWrapper {this.customDecoder = null;this.customDecoderCallSerializer = new CallSerializer();this.customDecoderQueueSize = 0;@@ -674,7 +674,7 @@ index da1cc3a..a3bdd0c 100644this.inputTimestamps = []; // Timestamps input into the decoder, sorted.this.sampleQueue = []; // Safari-specific thing, check usage.this.currentPacketIndex = 0;-@@ -697,6 +707,20 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -710,6 +720,20 @@ class VideoDecoderWrapper extends DecoderWrapper {if (!(sample instanceof VideoSample)) {throw new TypeError('The argument passed to onSample must be a VideoSample.');}@@ -695,7 +695,7 @@ index da1cc3a..a3bdd0c 100644this.finalizeAndEmitSample(sample);};// @ts-expect-error It's technically readonly-@@ -756,6 +780,7 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -780,6 +804,7 @@ class VideoDecoderWrapper extends DecoderWrapper {const stack = new Error('Decoding error').stack;this.decoder = new VideoDecoder({output: (frame) => {@@ -703,7 +703,7 @@ index da1cc3a..a3bdd0c 100644try {colorHandler(frame);}-@@ -773,11 +798,11 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -797,11 +822,11 @@ class VideoDecoderWrapper extends DecoderWrapper {}getDecodeQueueSize() {if (this.customDecoder) {@@ -717,7 +717,7 @@ index da1cc3a..a3bdd0c 100644}}decode(packet) {-@@ -835,6 +860,13 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -873,6 +898,13 @@ class VideoDecoderWrapper extends DecoderWrapper {}}}@@ -731,8 +731,8 @@ index da1cc3a..a3bdd0c 100644this.decoder.decode(packet.toEncodedVideoChunk());this.decodeAlphaData(packet);}-@@ -981,6 +1013,49 @@ class VideoDecoderWrapper extends DecoderWrapper {- sample.setRotation(this.rotation);+@@ -1020,6 +1052,49 @@ class VideoDecoderWrapper extends DecoderWrapper {+ sample.setFlip(this.flip);this.onSample(sample);}+ /**@@ -781,7 +781,7 @@ index da1cc3a..a3bdd0c 100644async mergeAlpha(color, alpha) {const resolver = promiseWithResolvers();this.mergeAlphaPromises.push(resolver.promise);-@@ -1017,6 +1092,11 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -1056,6 +1131,11 @@ class VideoDecoderWrapper extends DecoderWrapper {async flush() {if (this.customDecoder) {await this.customDecoderCallSerializer.call(() => this.customDecoder.flush());@@ -793,7 +793,7 @@ index da1cc3a..a3bdd0c 100644}else {assert(this.decoder);-@@ -1042,6 +1122,7 @@ class VideoDecoderWrapper extends DecoderWrapper {+@@ -1081,6 +1161,7 @@ class VideoDecoderWrapper extends DecoderWrapper {}this.sampleQueue.length = 0;}@@ -801,7 +801,7 @@ index da1cc3a..a3bdd0c 100644this.currentPacketIndex = 0;this.raslSkipped = false;}-@@ -1319,6 +1400,18 @@ const validateVideoSinkDecoderOptions = (decoderOptions) => {+@@ -1358,6 +1439,18 @@ const validateVideoSinkDecoderOptions = (decoderOptions) => {if (decoderOptions.optimizeForLatency !== undefined && typeof decoderOptions.optimizeForLatency !== 'boolean') {throw new TypeError('decoderOptions.optimizeForLatency, when provided, must be a boolean.');}@@ -820,7 +820,7 @@ index da1cc3a..a3bdd0c 100644};/*** A sink that retrieves decoded video samples (video frames) from a video track.-@@ -1350,12 +1443,19 @@ export class VideoSampleSink extends BaseMediaSampleSink {+@@ -1390,12 +1483,19 @@ export class VideoSampleSink extends BaseMediaSampleSink {let decoderConfig = await this._track.getDecoderConfig();const timeResolution = await this._track.getTimeResolution();assert(codec && decoderConfig);@@ -833,11 +833,11 @@ index da1cc3a..a3bdd0c 100644+ // caller asked, in-band tags included.+ ...(colorSpaceOverride ? { colorSpace: colorSpaceOverride } : {}),};-- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution);+- return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution);+ if (this._decoderOptions.transformConfig) {+ decoderConfig = this._decoderOptions.transformConfig(decoderConfig);+ }-+ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);++ return new VideoDecoderWrapper(onSample, onError, codec, decoderConfig, rotation, flip, timeResolution, colorSpaceOverride, this._decoderOptions.transformPacket ?? null);}/** @internal */_createPacketSink() {