Bug 228317

Summary: Permissions for Camera expires after some time
Product: WebKit Reporter: jakubesuszynski
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ap, eric.carlson, jer.noble, marek.aug, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   

jakubesuszynski
Reported 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
Attachments
Radar WebKit Bug Importer
Comment 1 2021-08-03 00:01:17 PDT
youenn fablet
Comment 2 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.
Note You need to log in before you can comment on or make changes to this bug.