Bug 228317 - Permissions for Camera expires after some time
Summary: Permissions for Camera expires after some time
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-27 00:00 PDT by jakubesuszynski
Modified: 2022-02-13 10:55 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jakubesuszynski 2021-07-27 00:00:56 PDT
I've a case where I fetch HTML from the backend and load it in WKWebView. It ask's me for camera permission for the URL I set. This HTML also fetches a quite big script, so it's expensive operation. After that I don't kill the View Controller, only dismiss it, so when user open it again, HTML is still loaded and ready. However, after some time with camera activated (I'm throwing a track's stream as a source for <video /> element) it just stops working - preview disappears. When I try to hit navigator.mediaDevices.getUserMedia() again, it just not resolve and quits script with no error. Is it intended? 

Also, Is is even possible to keep the permission after granting it once? App has camera permission, but WebView asks for it every time I init it
Comment 1 Radar WebKit Bug Importer 2021-08-03 00:01:17 PDT
<rdar://problem/81447591>
Comment 2 youenn fablet 2021-08-20 04:57:36 PDT
@jakube, do you have a repro case. Is it only happening in WKWebView or can you reproduce in Safari?

As of permission granting, you can use WKWebView delegates to grant persistent permissions available in latest iOS 15 betas.