Skip to content

🎥 Make videos programmatically with React

Update extract-frame-and-audio.ts

Jonny Burger60e738abb7c9
diff --git a/packages/media/src/extract-frame-and-audio.ts b/packages/media/src/extract-frame-and-audio.ts
index e079531408..5f1c157c83 100644
--- a/packages/media/src/extract-frame-and-audio.ts
+++ b/packages/media/src/extract-frame-and-audio.ts
@@ -106,7 +106,7 @@ export const extractFrameAndAudio = async ({
return {
type: 'success',
- frame: video.sample
+ frame: video?.sample
? await rotateFrame({
frame: video.sample.toVideoFrame(),
rotation: video.sample.rotation,