WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226969
Accessing navigator.mediaDevices.enumerateDevices after granting permission
https://bugs.webkit.org/show_bug.cgi?id=226969
Summary
Accessing navigator.mediaDevices.enumerateDevices after granting permission
jakubesuszynski
Reported
2021-06-14 07:01:21 PDT
I've noticed that when you ask WKWebView to enumerate devices by navigator.mediaDevices.enumerateDevices, it returns undefined when permissions are not granted. As the WKWebView doesn't ask for permission to camera itself, I've added a function to send message to WebView, and when controller receives it, it asks user for camera permission by AVCaptureDevice.requestAccess(for: .video). When user grant permission, the WKWebView still has the navigator.mediaDevices undefined as long as user won't restart the app. Shouldn't the API be available as soon as user grant permission?
Attachments
Patch
(1.74 KB, patch)
2021-06-14 07:25 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-06-14 07:06:17 PDT
<
rdar://problem/79286449
>
youenn fablet
Comment 2
2021-06-14 07:25:21 PDT
Created
attachment 431323
[details]
Patch
EWS
Comment 3
2021-06-14 11:39:09 PDT
Committed
r278841
(
238789@main
): <
https://commits.webkit.org/238789@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 431323
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug