🎥 Make videos programmatically with React
fix in firefox
Jonny Burger24c6c54ce673
diff --git a/packages/media-parser/src/file-types/detect-file-type.ts b/packages/media-parser/src/file-types/detect-file-type.tsindex 2a09f27cf4..065884cfa2 100644--- a/packages/media-parser/src/file-types/detect-file-type.ts+++ b/packages/media-parser/src/file-types/detect-file-type.ts@@ -18,7 +18,8 @@ export const isRiffAvi = (data: Uint8Array) => {}const fileType = data.subarray(8, 12);- return new TextDecoder().decode(fileType) === 'AVI ';+ const aviPattern = new Uint8Array([0x41, 0x56, 0x49, 0x20]);+ return matchesPattern(aviPattern)(fileType);};export const isRiffWave = (data: Uint8Array) => {@@ -28,7 +29,8 @@ export const isRiffWave = (data: Uint8Array) => {}const fileType = data.subarray(8, 12);- return new TextDecoder().decode(fileType) === 'WAVE';+ const wavePattern = new Uint8Array([0x57, 0x41, 0x56, 0x45]);+ return matchesPattern(wavePattern)(fileType);};export const isWebm = (data: Uint8Array) => {diff --git a/packages/webcodecs/src/on-video-track.ts b/packages/webcodecs/src/on-video-track.tsindex cf0ae22e9c..74bde12bfe 100644--- a/packages/webcodecs/src/on-video-track.ts+++ b/packages/webcodecs/src/on-video-track.ts@@ -83,7 +83,7 @@ export const makeVideoTrackHandler =if (videoOperation.type === 'fail') {throw new Error(- `Video track with ID ${track.trackId} could with {"type": "fail"}. This could mean that this video track could neither be copied to the output container or re-encoded. You have the option to drop the track instead of failing it: https://remotion.dev/docs/webcodecs/track-transformation`,+ `Video track with ID ${track.trackId} resolved with {"type": "fail"}. This could mean that this video track could neither be copied to the output container or re-encoded. You have the option to drop the track instead of failing it: https://remotion.dev/docs/webcodecs/track-transformation`,);}