admin管理员组

文章数量:1398831

I am using navigator.mediaDevices.getUserMedia in my javascript to call webcam. it is working for chrome but not for safari. I know, navigator.mediaDevices.getUserMedia is not supported for safari.

But, Is there any way to fix this issue for safari?

Thanks, Naresh.

I am using navigator.mediaDevices.getUserMedia in my javascript to call webcam. it is working for chrome but not for safari. I know, navigator.mediaDevices.getUserMedia is not supported for safari.

But, Is there any way to fix this issue for safari?

Thanks, Naresh.

Share Improve this question asked Jan 23, 2017 at 9:34 user3543822user3543822 1
  • Maybe this can help you : stackoverflow./q/42221646/378979 – Vincent Cantin Commented Aug 3, 2017 at 2:45
Add a ment  | 

2 Answers 2

Reset to default 1

As Safari 10 doesn't have support for WebRTC, so navigator.getUserMedia will not have any effect. Safari 11+ has support for WebRTC hence you can use navigator.getUserMedia by enabling 'Enable Legacy WebRTC API' on develop menu or navigator.mediaDevices.getUserMedia.

This is only supported in Safari 11: https://developer.mozilla/en-US/docs/Web/API/MediaDevices/getUserMedia

You might be able to use navigator.getUserMedia (which is deprecated so be careful here): https://developer.mozilla/en-US/docs/Web/API/Navigator/getUserMedia

本文标签: javascriptHow can i fix 39navigatormediaDevicesgetUserMedia39 for SafariStack Overflow