iOS11 getUserMedia with apple web-app not working

前端 未结 2 1591
清歌不尽
清歌不尽 2020-12-16 06:35

Edit: Duplicate of How to access camera on iOS11 home screen web app?

I\'m running into a problem with using a apple web-app together with camera ac

相关标签:
2条回答
  • 2020-12-16 07:35

    The navigator.mediaDevices.getUserMedia function is back in iOS 14.3 which got out yesterday. (Make sure you are not using the navigator.getUserMedia which is deprecated).

    We'll be using it in Cordova, I'll update this post if we find some instabilities.

    Don't forget to use the playinline attribute in your <video> element if you don't want the video to start in fullscreen.

    0 讨论(0)
  • 2020-12-16 07:36

    Apple has removed the ability to use getUserMedia inside a UIWebView, WKWebView, SFSafariViewController, or a webpage that has been "added to the home screen".

    The reasoning is not clear, however I do not believe this to be a bug.

    An Apple staff member wrote this about WebRTC in iOS 11:

    ...right now, WebRTC is only supported in Safari. No WKWebView, not even SFSafariViewController.

    And I can confirm that this includes the UIWebView as well (through personal tesing).

    0 讨论(0)
提交回复
热议问题