westonsoftware / vue-webrtc

WebRTC video component for Vue.js
MIT License
369 stars 127 forks source link

error "Requested device not found" #76

Closed bipin1611 closed 3 years ago

bipin1611 commented 3 years ago

First of all, Thank you for the Great work!

I have installed it on my project and added it at Two Places. At One Place it's working fine, but in Other Place, it's giving me the "Requested device not found" error, even if I have the same network, same browser,

Please help here.

Thank you!

westonsoftware commented 3 years ago

Hi, check your deviceId ... set it to null for the default camera or let your user pick one.

bipinparmar-ss commented 3 years ago

Yes, navigator.mediaDevices.getUserMedia are not getting deviceId in response.

As, I am very new to this, how do we get deviceId or generate new deviceId each time when this API call.?

Appreciate your help!

Thanks you!

westonsoftware commented 3 years ago

sorry for the late reply, you'll need to enumerateDevices() for this ... https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices