Summary: | mediaDevices in WKWebview is undefined | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mike Hartington <mikehartington> |
Component: | WebRTC | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | alejandro.silva, beidson, bernie, bill, bugmail, daginge, eelco, elitree, eric.carlson, feross, flagworlds1, jer.noble, juliosincesar, marcel, molnar.timi7, ramanaedwin, shahraship, silviapfeiffer1, stefan, tomac, vitalyd87, webkit-bug-importer, webkit, will.morgan, wvsmlmdiaaxvhkrqov, youennf, znelson |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | iPhone / iPad | ||
OS: | Other |
Description
Mike Hartington
2018-08-06 14:34:08 PDT
Any plans on adding this? WKWebView apps are very limited without this kind of features that are already in Safari. We have a html-based chatbot platform that requires a QR scanner. We urgently need WebRTC (getUserMedia) to work in apps using WKWebView. I've seen that SFSafariViewController is now working with iOS 13. Any plans to support getUserMedia in WKWebView ? Hi! I've read something about getting released in iOS 13.4. Can you deny/confirm it? Thank you so much! I really don't like you apple. You don't deserve the number of customers you have. Fix it quickly! I can’t even describe how infuriating it is that getUserMedia and thus WebRTC isn’t supported. So many things are much easier to implement in JavaScript when it comes to WebRTC instead of jumping through a million hoops in Obj-C and the garbage environment that is iOS native. Apple is ridiculous. Let's keep comments professional and civil folks. With the advent of new default browsers in iOS 14, this will become a bigger UX problem for WebRTC services. I have tested iOS 14 Developer Beta 3, and neither Chrome nor Firefox can complete a simple getUserMedia call (fails with TypeError in samples). Since users now can select these browsers as default, WebRTC services must implement specific UX to teach users how to copy the link, change to Safari, and open it in Safari for WebRTC to work. Having support for getUserMedia/WebRTC in WKWebView is now critical for WebRTC as a whole on iOS. Users won't be able to understand why their default browser does not support WebRTC. Are there any details to share on the timeline for support, or are there talks with browser vendors to avoid this problem? What should us application developers do? Finally there is a solution! Check this comment: https://bugs.webkit.org/show_bug.cgi?id=183201#c31 There is a brand new WebRTC library for WKWebView, and it works like a charm! https://github.com/OpenTelecom/WKWebViewRTC It would be really good to have WKWebView support getUserMedia for pwa - is getUserMedia functionality planned to be available for WKWebView? In Info.plist add: `Privacy - Camera Usage Description` https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios And in order video element could play from your camera: ``` let webConfiguration = WKWebViewConfiguration() webConfiguration.allowsInlineMediaPlayback = true ``` How to play: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia Marking as configuration changed now that getUserMedia is exposed in WKWebView. |