Interface WebCamConfig

WebCam configuration

interface WebCamConfig {
    crop: boolean;
    debug: boolean;
    element: undefined | string | HTMLVideoElement;
    height: number;
    id?: string;
    mode: "front" | "back";
    width: number;
}

Properties

crop: boolean

camera crop mode

debug: boolean

print messages on console

element: undefined | string | HTMLVideoElement

element can be:

  • string which indicates dom element id
  • actual HTMLVideo dom element
  • undefined in which case a new HTMLVideoElement will be created
height: number

desired webcam height

id?: string

deviceId of the video device to use

mode: "front" | "back"

use front or back camera

width: number

desired webcam width