Skip to content

🎥 Make videos programmatically with React

fix useVideoTexture SSR

Jonny Burger47e66ae2ec61
diff --git a/packages/three/src/use-video-texture.ts b/packages/three/src/use-video-texture.ts
index b31cf90ac5..525a0e616f 100644
--- a/packages/three/src/use-video-texture.ts
+++ b/packages/three/src/use-video-texture.ts
@@ -83,7 +83,7 @@ export const useVideoTexture = (
}, [frame, loaded, videoRef]);
if (
- typeof HTMLVideoElement !== 'undefined' &&
+ typeof HTMLVideoElement === 'undefined' ||
!HTMLVideoElement.prototype.requestVideoFrameCallback
) {
continueRender(loaded);