Bug 188360 - mediaDevices in WKWebview is undefined
Summary: mediaDevices in WKWebview is undefined
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Other
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-06 14:34 PDT by Mike Hartington
Modified: 2020-06-17 00:51 PDT (History)
22 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hartington 2018-08-06 14:34:08 PDT
Inside of WKWebview, mediaDevices and getUserMedia are not implemented, but are there in Webkit/Safari.


var videoTag = document.querySelector('video');
var getVideoStream = function() {
  navigator.mediaDevices
    .getUserMedia({ video: true })
    .then(streamRes => (videoTag.srcObject = streamRes));
};
Comment 1 jcesarmobile 2019-10-23 08:36:59 PDT
Any plans on adding this? WKWebView apps are very limited without this kind of features that are already in Safari.
Comment 2 Radar WebKit Bug Importer 2019-10-23 09:26:43 PDT
<rdar://problem/56541639>
Comment 3 Jerome @ Neareo 2020-02-17 23:57:34 PST
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 ?
Comment 4 Alejandro Silva 2020-02-27 07:00:11 PST
Hi! I've read something about getting released in iOS 13.4. Can you deny/confirm it? Thank you so much!
Comment 5 krak1 2020-05-07 06:53:45 PDT
I really don't like you apple. You don't deserve the number of customers you have. Fix it quickly!
Comment 6 zn 2020-05-11 01:24:32 PDT
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.
Comment 7 Mike Hartington 2020-05-11 06:41:26 PDT
Let's keep comments professional and civil folks.