Skip to content

Commit b60d4ca

Browse files
committed
Fix example blob MIME types
1 parent 95091cc commit b60d4ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/file-compression/file-compression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const compressFile = async (file: File) => {
9191

9292
// Display the final media file
9393
videoElement.style.display = '';
94-
videoElement.src = URL.createObjectURL(new Blob([output.target.buffer!]));
94+
videoElement.src = URL.createObjectURL(new Blob([output.target.buffer!], { type: output.format.mimeType }));
9595
void videoElement.play();
9696

9797
compressionFacts.style.display = '';

examples/procedural-generation/procedural-generation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const generateVideo = async () => {
180180
videoInfo.style.display = '';
181181

182182
// Display and play the resulting media file
183-
const videoBlob = new Blob([output.target.buffer!], { type: 'video/mp4' });
183+
const videoBlob = new Blob([output.target.buffer!], { type: output.format.mimeType });
184184
resultVideo.src = URL.createObjectURL(videoBlob);
185185
void resultVideo.play();
186186

0 commit comments

Comments
 (0)