new getDevices(config)
Gets the list of available media devices (Audio and Video) in the browser/app
Parameters:
| Name | Type | Description |
|---|---|---|
config |
object | getUserMedia constraints |
Returns:
- Type
- Promise.<ListDevices>
Example
usecases.getDevices({audio: true, video: true})
.then((devices) => {
console.log(devices.videoDevices); // [{label: 'Camera Front', id: *****}]
console.log(devices.audioDevices); // [{label: 'Microphone', id: *****}]
})