Optional
options: boolean | AddEventListenerOptionsThe addEventListener()
method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optional
options: boolean | AddEventListenerOptionsThe dispatchEvent()
method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
The dispatchEvent()
method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Enumerates the list of video input devices
The label field for each MediaDevice will be empty if the permission
is not equal to granted
Return VideoTrackCapabilities
Populates the list of mediaDevices
and sets selectedDeviceId
If camera permission granted it will populate mediaDevices
with the list of available cameras and
sets selectedDeviceId
to that of the first available camera.
If camera permission is blocked, it will set mediaDevices
to [] and selectedDeviceId
to an empty string
The removeEventListener()
method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optional
options: boolean | EventListenerOptionsThe removeEventListener()
method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optional
options: boolean | EventListenerOptionsRequests camera permissions from the user.
Promise
Change selected media device Id
Stop camera
Static
init
The
addEventListener()
method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.MDN Reference