getDevicesWithPermissions
getDevicesWithPermissions
ConstgetDevicesWithPermissions(kind?,fullList?):Promise<MediaDeviceInfo[]>— See MediaDeviceInfo for more details.
Deprecated. Use getDevices for better cross-browser compatibility.
After prompting the user for permission, returns an array of media input and output devices available on this machine. If kind is provided, only the devices of the specified kind are returned. Possible values for kind are "camera", "microphone", and "speaker", which respectively correspond to getCameraDevicesWithPermissions, getMicrophoneDevicesWithPermissions, and getSpeakerDevicesWithPermissions.
Parameters
kind
Filter for this device category.
fullList
By default, only devices for which we have been granted permissions are returned. Pass true to obtain a list of devices regardless of permissions. Note that some values such as name and deviceId could be omitted.
Returns
Promise<MediaDeviceInfo[]>