dreiDrei.docs

ScreenVideoTexture

Summary

Create a video texture from getDisplayMedia
export type ScreenVideoTextureProps = Omit<VideoTextureProps, 'src'> & {
  options?: DisplayMediaStreamOptions
}
<ScreenVideoTexture>
  {(texture) => <meshBasicMaterial map={texture} />}

or exposed via ref:

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

src/web/ScreenVideoTexture.tsx

Edit this page

Progress / useProgress
Texture / useTexture
  • getting started
  • abstractions
  • cameras
  • controls
  • gizmos
  • loaders
    • CubeTexture / useCubeTexture
    • Fbx / useFBX
    • Gltf / useGLTF
    • Ktx2 / useKTX2
    • Loader
    • Progress / useProgress
    • ScreenVideoTexture
    • Texture / useTexture
    • TrailTexture / useTrailTexture
    • useFont
    • useSpriteLoader
    • VideoTexture / useVideoTexture
    • WebcamVideoTexture
  • misc
  • modifiers
  • performances
  • portals
  • shaders
  • shapes
  • staging

On This Page