Class: Webcam

Webcam(options, videoElementSelector)

Class to setup the webcam.

Constructor

new Webcam(options, videoElementSelector)

Create a Webcam.
Parameters:
Name Type Description
options Object options to use for initialising the camera. Currently idealWidth and idealHeight properties are understood as well as onVideoStarted(), a *required* callback which runs when the camera has been initialised. This takes a THREE.VideoTexture as an argument which can be used to set the background of your three.js scene within a callback.
videoElementSelector string selector to obtain the HTML video element to render the webcam feed. If a falsy value (e.g. null or undefined), a video element will be created.
Source:

Methods

dispose()

Free up the memory associated with the webcam. Should be called when your application closes.
Source: