Bug 220416 - WKWebView getUserMedia persistent permissions
Summary: WKWebView getUserMedia persistent permissions
Status: RESOLVED DUPLICATE of bug 223806
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-07 08:31 PST by Kyle Dunn
Modified: 2021-06-09 11:56 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Dunn 2021-01-07 08:31:57 PST
Are there any plans to allow users the ability to persistently allow camera/microphone access to a particular host within WKWebView?

e.g. A users app-level permission persists indefinitely, but the web-level permission does not persist when reloading the page.

Even respecting the Safari setting for "Allow Camera Access on All Websites: ALLOW" would be an acceptable workaround to avoid the repetitive prompts.


Thanks in advance.
Comment 1 Radar WebKit Bug Importer 2021-01-07 08:32:57 PST
<rdar://problem/72890455>
Comment 2 youenn fablet 2021-01-07 08:33:30 PST
Yes, the plan is to further improve WKWebView APIs to control this.
Comment 3 Kyle Dunn 2021-01-07 08:35:54 PST
(In reply to youenn fablet from comment #2)
> Yes, the plan is to further improve WKWebView APIs to control this.

Great, thank you for the quick response Youenn!
Comment 4 Dustin Greif 2021-02-11 18:22:48 PST
(In reply to youenn fablet from comment #2)
> Yes, the plan is to further improve WKWebView APIs to control this.

Is there any timeline for when this new API will be released?  Even something as simple as "next couple months" vs "next year or two" would make a big impact on how we choose to develop our hybrid apps.  Having getUserMedia available in WKWebView is a MASSIVE improvement, but it's still unusable in a production app with these recurring permission prompts.  Really appreciate your teams continued improvements on this front!
Comment 5 Mauricio W 2021-02-11 18:41:35 PST
(In reply to Dustin Greif from comment #4)
> Is there any timeline for when this new API will be released?  Even
> something as simple as "next couple months" vs "next year or two" would make
> a big impact on how we choose to develop our hybrid apps.  Having
> getUserMedia available in WKWebView is a MASSIVE improvement, but it's still
> unusable in a production app with these recurring permission prompts. 
> Really appreciate your teams continued improvements on this front!

Just mentioning this in case you didn't already know:
If you call getUserMedia, you can leave the stream open for up to 24 hours before the next request (or the user closes the app). It's definitely not a solution to the problem, but it does cut down the amount of requests a user gets.

There is the drawback that, even if you set track.enabled to false, the recording indicator remains on. I've had at least two users reach out asking about that.
Comment 6 Jurung Park 2021-02-14 05:26:30 PST
I think this should be resolved.
Is there any solution such as editing core(?) swift codes?
Even if that kind of solution is not simple, we feel like fixing this problem by self.
Comment 7 David Gölzhäuser 2021-02-20 02:27:16 PST
I think the permission handling should fallback to the host application if the Website is presented in a WKWebView. A DelegateCall or some kind of config could be used to configure this behavior.

Really appreciate the support of getUserMedia in WKWebView guys:)
Comment 8 Roman Alifanov 2021-05-20 05:49:31 PDT
Any updates on this? This is more than needed now when WKWebView finally supports WebRTC on iOS.
Comment 9 youenn fablet 2021-05-20 05:57:28 PDT

*** This bug has been marked as a duplicate of bug 223806 ***
Comment 10 Kyle Dunn 2021-06-09 11:56:07 PDT
FYI - the fix for this appears to have landed in iOS 15. The particulars for this addition are demo'd @ 14:40 here: https://developer.apple.com/videos/play/wwdc2021/10032/