[Webkit-unassigned] [Bug 208667] getUserMedia does not work in WKWebView-based browsers like Chrome, Firefox.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 25 12:27:52 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=208667

keg at kindeyegames.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keg at kindeyegames.com

--- Comment #63 from keg at kindeyegames.com ---
Working with Cordova and the Construct 3 HTML5 game framework on IOS, it looks like there has been improvement, but as geckse mentions, there is still an issue with a Cordova app getting access to getUserMedia, perhaps due to not using https for the corodova app?

It looks like this may be a security issue based on this link:
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

"Note: If the current document isn't loaded securely, navigator.mediaDevices will be undefined, and you cannot use getUserMedia(). See Security for more information on this and other security issues related to using getUserMedia()."

After adding NSCameraUsageDescription key and an appropriate string to the project info.plist, calling navigator["mediaDevices"]["getUserMedia"] is now available (previously before ios14 and adding the key it is undefined.)

However, after the camera permission pop up appears and is agreed to, access fails with this in debug from Xcode:

"2020-11-25 12:21:38.293062-0800 Camera fx[1629:786395] WARN: Error requesting camera:  NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."

(I did not deny permission and checking under Privacy Settings for camera, the test app is marked as allowing camera permissions.)

I have looked at ways to have Cordova serve locally via https, but I have not yet found a solution (geckse details an interesting work around in the above git repo, which serves the entire app from an external https server).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201125/df161f2b/attachment.htm>


More information about the webkit-unassigned mailing list