Bug 217570 - navigator.mediaDevices.getUserMedia() fails on Safari on iPhone with NotAllowedError without explanation
Summary: navigator.mediaDevices.getUserMedia() fails on Safari on iPhone with NotAllow...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-11 01:02 PDT by jujjyl
Modified: 2020-10-12 17:45 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jujjyl 2020-10-11 01:02:26 PDT
Calling navigator.mediaDevices.getUserMedia() fails on Safari on iOS with error

   navigator.mediaDevices.getUserMedia() failed: Unable to start video input! The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

but user was not even asked permission to use the webcam.

STR: Visit https://rexact.itch.io/safari-ios-webcam-test . The test page works on desktop Chrome, Firefox and Safari, and also on mobile Chrome and Firefox, but not in mobile Safari.

A locally examinable copy of the page can be downloaded from http://clb.confined.space/dump/safari-ios-webcam-test.zip

Expected: The user should be asked permission to use the webcam, or if due to some misconfigured security setting webcam access cannot be acquired, the error message should hint towards the reason (a searchable error identifier that would lead to Apple developer documentation for clear explanation, or error message should contain a direct link a web site that explains how to fix)
Comment 1 jujjyl 2020-10-11 04:17:57 PDT
Nevermind, it turns out that in iOS settings I had Camera globally set to Deny. After resolving that, the NotAllowedError disappeared.

Sorry for the noise!
Comment 2 Alexey Proskuryakov 2020-10-12 17:45:48 PDT
Thank you for the followup!