[Webkit-unassigned] [Bug 259465] No permission prompt for getUserMedia

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 26 13:18:54 PDT 2023


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

--- Comment #4 from bearman <k4gcybex at gmail.com> ---
(In reply to Eric Carlson from comment #3)
> Created attachment 467124 [details]
> Modified test app
> 
> In your test app, `enumerateDevices` succeeds but you forgot to call
> `overrideLogging` so you don't inject the JS `log` function so the app isn't
> notified and getDevices gets a script error. You could have seen this by
> examining your app with the web inspector.
> 
> The call to `getUserMedia` never prompts because the webview is not visible
> when it is called. Exactly the same thing happens in Safari if
> `getUserMedia` is called from a background tab. In this situation, the call
> is made once the view becomes visible. 
> 
> I have attached a slightly modified version of your test app that parents
> the webview and injects your `log` script. It also fixes a bug that made the
> app create three instances of the webview.

Absolutely wonderful!

Regarding `enumerateDevices`, calling this in the web inspector resolved to
```
WKWebView[60215:1070703]  HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1852797029 (nope)
WKWebView[60215:1070703]  HALPlugIn::ObjectGetPropertyData: got an error from the plug-in routine, Error: 1852797029 (nope)
```

I intended to remove the logging override to reduce the complexity, but seems it was useful afterall.

Regarding the main issue that is GUM, I tested a WKWebView implementation on iOS simulator and native mac without success (i.e. a visible webview) however no prompt was visible. I'll take a look at report back anything that looks odd.

@Eric: Many thanks for your time and providing a working solution. The goal is to make use of the WKfeatures that JSC doesn't provide out of the box. 

Do you have any suggestions or recommendations for granting GUM on a headless WebView?

-- 
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/20230726/9041ad54/attachment.htm>


More information about the webkit-unassigned mailing list