Skip to content

🎥 Make videos programmatically with React

Update rotate-and-resize-video-frame.ts

Jonny Burgerb9c1cd8afe1d
diff --git a/packages/webcodecs/src/rotate-and-resize-video-frame.ts b/packages/webcodecs/src/rotate-and-resize-video-frame.ts
index 20be876955..f6b477c025 100644
--- a/packages/webcodecs/src/rotate-and-resize-video-frame.ts
+++ b/packages/webcodecs/src/rotate-and-resize-video-frame.ts
@@ -19,7 +19,7 @@ export const rotateAndResizeVideoFrame = ({
resizeOperation: ResizeOperation | null;
needsToBeMultipleOfTwo?: boolean;
}) => {
- const normalized = ((rotation % 360) + 360) % 360;
+ const normalized = normalizeVideoRotation(rotation);
// No resize, no rotation
if (normalized === 0 && resizeOperation === null) {