Running ‘navigator.mediaDevices.enumerateDevices().then(a => console.log(a))’ sometimes returns a list without deviceId. See two images below from the same PC. Does ‘no deviceId’ mean not allow to capture audio or video? How to prompt user with permission dialog again? Or what is the easiest for user to enable audio/video if i have to tell him/her?
Thanks.
Yes, enumerateDevices()
will return an empty label attribute value if the permission for accessing the mediadevice is not given. Try using it after getUserMedia.
Thanks. getUserMedia prompts user and returns exception if user denies.
I found Electron version (windows/mac) doesn’t need user’s permission, is it true?
Thanks again.
Every webrtc app requires devices permissions
Regards