# Class WebCam

#### Hierarchy

- WebCam

- Defined in src/util/webcam.ts:28

#####
Index

### Constructors

constructor

### Properties

config
devices
element
stream

### Accessors

capabilities
constraints
height
label
paused
settings
track
width

### Methods

enumerate
pause
play
start
stop

## Constructors

### constructor

- new WebCam(): WebCam

- #### Returns WebCam

  - Defined in src/util/webcam.ts:38

## Properties

### config

config: WebCamConfig

current webcam configuration

- Defined in src/util/webcam.ts:30

### devices

devices: MediaDeviceInfo[] = []

enumerated video devices

- Defined in src/util/webcam.ts:36

### element

element: undefined | HTMLVideoElement

instance of dom element associated with webcam stream

- Defined in src/util/webcam.ts:32

### stream

stream: undefined | MediaStream

active webcam stream

- Defined in src/util/webcam.ts:34

## Accessors

### capabilities

- get capabilities(): undefined | MediaTrackCapabilities

- get webcam capabilities

  #### Returns undefined | MediaTrackCapabilities

  - Defined in src/util/webcam.ts:56

### constraints

- get constraints(): undefined | MediaTrackConstraints

- get webcam constraints

  #### Returns undefined | MediaTrackConstraints

  - Defined in src/util/webcam.ts:62

### height

- get height(): number

- webcam current height

  #### Returns number

  - Defined in src/util/webcam.ts:91

### label

- get label(): string

- get webcam label

  #### Returns string

  - Defined in src/util/webcam.ts:75

### paused

- get paused(): boolean

- is webcam paused

  #### Returns boolean

  - Defined in src/util/webcam.ts:81

### settings

- get settings(): undefined | MediaTrackSettings

- get webcam settings

  #### Returns undefined | MediaTrackSettings

  - Defined in src/util/webcam.ts:68

### track

- get track(): undefined | MediaStreamTrack

- get active webcam stream track

  #### Returns undefined | MediaStreamTrack

  - Defined in src/util/webcam.ts:50

### width

- get width(): number

- webcam current width

  #### Returns number

  - Defined in src/util/webcam.ts:86

## Methods

### enumerate

- enumerate(): Promise<MediaDeviceInfo[]>

- #### Returns Promise<MediaDeviceInfo[]>

  - Defined in src/util/webcam.ts:95

### pause

- pause(): void

- pause webcam video method

  #### Returns void

  - Defined in src/util/webcam.ts:196

### play

- play(): Promise<void>

- play webcam video method

  #### Returns Promise<void>

  - Defined in src/util/webcam.ts:201

### start

- start(webcamConfig?: Partial<WebCamConfig>): Promise<string>

- start method initializizes webcam stream and associates it with a dom video element

  #### Parameters

  - ##### `Optional` webcamConfig: Partial<WebCamConfig>

  #### Returns Promise<string>

  - Defined in src/util/webcam.ts:106

### stop

- stop(): void

- stop method stops active webcam stream track and disconnects webcam

  #### Returns void

  - Defined in src/util/webcam.ts:206