Class: CameraView

html.CameraView

Class representing a camera view finder.

Note that camera access is usually only available for HTTPS connections.

new html.CameraView ()

Properties:
Name Type Description
active bool

(default: false) Toggles between active and inactive states.

devices Array.<object>

[readonly] The available camera devices. Fingerprinting protection in browsers might block listing the particular devices.

deviceId string

(default: "user") Forces the use of a certain camera device. One of devices or "user" or "environment".

image object

[readonly] The camera image for rendering on a canvas.

maxResolution string

(default: 720p) The name of the maximum resolution.

originalHeight number

[readonly] The original height of the camera image.

originalWidth number

[readonly] The original width of the camera image.

resolutions Array.<string>

[readonly] A set of resolution modes.

status string

[readonly] The current status. One of: inactive|active|pending|error

Extends

Methods

start (callback)

Starts capturing from the video device.

Name Type Description
callback function

The callback to be invoked afterwards with true for success, or false for failure.

Stops capturing from the video device.