MediaDevices

The mediaDevices API that enables access to input devices such as cameras and microphones, as well as the ability to capture media streams from those devices.

Public method summary

Method

Description

Parameters

getMediaDevices()

Returns the list of available for using media devices

setAudioConstraints(deviceId)

Selects the audio device for the session

setVideoConstraints(deviceId)

Selects the video device for the session

doPreview(constraints)

Returns a preview stream for session

changeMediaDevice(deviceId, type, selector)

Allows the user to change media device

  • deviceId - id of selected device provided by getMediaDevices() method

  • type - type of device to change. Possible values are: ['camera', 'microphone', 'speaker']

  • querySelector for video element to replace a stream object

Last updated