📑
Creates a capture from a connected camera, such as a webcam.
The capture video element can be hidden and its content can be
displayed on the canvas using the image function.
Can preload to ensure the capture is ready to use when your
sketch starts.
Requests the highest video resolution from the user facing camera
by default. The first parameter to this function can be used to
specify the constraints for the capture. See getUserMedia
for more info.
Parameters
Optionaltype: string
type of capture, can be only VIDEO or only AUDIO, the default is to use both video and audio
Optionalflipped: boolean
whether to mirror the video vertically, true by default
📑 Creates a capture from a connected camera, such as a webcam.
The capture video element can be hidden and its content can be displayed on the canvas using the
imagefunction.Can preload to ensure the capture is ready to use when your sketch starts.
Requests the highest video resolution from the user facing camera by default. The first parameter to this function can be used to specify the constraints for the capture. See
getUserMediafor more info.