WebcamTexture Class

Extends Texture
Module: Textures

Webcam texture is used to capture and display video from a webcam in real-time.

It uses WebRTC, the host must support it, otherwise WebcamTexture will display a black image.

Item Index

Properties

Attributes

Methods

connect

()

Connect to camera.

disconnect

()

Disconnect from camera.

dispose

()

Dispose webcam texture.

toJSON

(
  • meta
)

Serialize webcam texture to JSON.

Parameters:

  • meta Object

    Metadata.

Properties

image

Element

Image is used to store a DOM video element

stream

MediaStream

Webcam video, media stream

Attributes

ENVIRONMENT

Number static

Prefer the back camera.

USER

Number static

Prefer the front facing camera.