📄 drei/loaders/webcam-video-texture

File: webcam-video-texture.md | Updated: 11/15/2025


title: WebcamVideoTexture sourcecode: src/web/WebcamVideoTexture.tsx

<Intro>Create a video texture from getUserMedia</Intro>

export type WebcamVideoTextureProps = Omit<VideoTextureProps, 'src'> & {
  constraints?: MediaStreamConstraints
}
<WebcamVideoTexture>
  {(texture) => <meshBasicMaterial map={texture} />}

or exposed via ref:

const textureRef = useRef()
<WebcamVideoTexture ref={textureRef} />