New issue
Advanced search Search tips
Starred by 24 users

Issue metadata

Status: ExternalDependency
Owner: ----
EstimatedDays: ----
NextAction: ----
Pri: 3
Type: Compat

Sign in to add a comment

Issue 752458: getUserMedia does not work in the WKWebview

Reported by, Aug 4 2017 Project Member

Issue description

An important use case of WebRTC is the streaming of user media, which is done via navigator.mediaDevices.getUserMedia.
navigator.mediaDevices is available in Safari, but not in the WKWebview.

filed radar://33723040 about it.

Comment 1 by, Aug 4 2017

Labels: -Type-Bug Type-Compat

Comment 3 by, Aug 11 2017

Apple's response:

This bug has been closed as a Duplicate. The issue is being tracked under the original Bug ID# 29281220.

Comment 4 by, Aug 11 2017

 Issue 753437  has been merged into this issue.

Comment 5 by, Nov 15 2017

 Issue 783220  has been merged into this issue.

Comment 6 by, Nov 15 2017

Labels: Hotlist-Interop

Comment 7 by, Nov 15 2017

Labels: Hotlist-Radar-Filed

Comment 8 by, Dec 6 2017

>This bug has been closed as a Duplicate. The issue is being tracked under the original Bug ID# 29281220.

sorry if i'm asking an obvious question but where is this bug filed? i can't find it anywhere? is this apple's internal id? is there any more info on this btw?

Comment 9 by, Dec 6 2017

This bug was filed in radar, which is Apple's bug tracking system. Unfortunately Apple does not allow access to bugs filed in its system other than the original bug reporter. We don't have any information on when the blocking bug will be fixed...

Comment 10 by, Jan 4 2018

This is the link to radar:

(Not that it helps much as there are no comments and no status)

Comment 11 by, Jan 4 2018

Thank you, Thorsten. It is helpful.

Comment 12 by, Jul 12 2018

Issue 862740 has been merged into this issue.

Comment 13 by, Sep 19

I managed to re-enable the API, in the context of cordova-plugin-wkwebview-engine, by using the private WebKit function: void WKPreferencesSetMediaDevicesEnabled(WKPreferences* preferencesRef, bool enabled)

Assuming you are using Objective C, to reproduce, you need 1. to declare this function, and 2 when you are setting up WKWebViewConfiguration, call it:


void WKPreferencesSetMediaDevicesEnabled(WKPreferences* preferencesRef, bool enabled);


WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init]; ... WKPreferencesSetMediaDevicesEnabled(configuration.preferences, true);

However, the call getUserMedia fails with the error "SecurityError: The operation is insecure.". I did not manage yet to work around it.

Comment 14 by, Sep 19


Comment 15 by, Oct 15

 Issue 895075  has been merged into this issue.

Comment 16 by, Oct 26

long time waiting for this feature..
any change to support it?!!

Comment 17 by, Oct 26

There were no changes in WebKit to support this in WKWebView.

Comment 18 by, Dec 8


Comment 19 by, Dec 28

 Issue 917797  has been merged into this issue.

Comment 20 by, Jan 2

Components: Mobile>iOSWeb>WebPlatform

Comment 21 by, Feb 14

Anyone have any updates or know how to we can all collectively request from apple?

Comment 22 by, Feb 14

The best way to let Apple know that there's demand for this feature is to file a Radar at

Comment 23 by, Feb 14

For a related issue, see about getUserMedia not working in apps added to home screen (aka. running in "").

Sign in to add a comment