Methods
-
<async> startVideo( [ deviceId [, facingMode ] ] ) → {Promise.<{status: boolean, error: string}>}
-
Description
Starts the video stream and returns a promise with the result.
Parameters
Name Type Attributes Default Description deviceId
string <optional> The id of the media device to use, if null the default device will be used using the constraints { width: { min: 320, ideal: 640 }, height: { min: 240, ideal: 480 } }.
facingMode
ConstrainDOMString <optional> The facing mode of the camera, if null the browser default facing mode will be used. Possible facing mode values are "user" and "environment". Some examples values: { "exact": "environment" }, { "ideal": "user"}
Returns
-
<async> getImage() → {Promise.<string>}
-
Description
Returns a promise with the image data from the camera.
Returns
Throws
-
stopVideo() → {void}
-
Description
Stops the video stream if it was created by the SDK.
Returns