[wpe-webkit] VideoCapture permissions / Allowed URLs
Adrian Perez de Castro
aperez at igalia.com
Mon May 6 08:24:00 PDT 2019
My apologies for the late reply; your message arrived while I was on vacation
and somehow I managed to miss it O:-)
On Mon, 08 Apr 2019 13:50:56 +0100, Diego Moore <diego.moore at gmail.com> wrote:
> I see that WebRTC has just landing on webkit
> Just wondering if there’s an equivalent of
> in WebKit.
> For example, I see that http://appr.tc/ now works on Safari 12.1 but I’d
> like to whitelist or pre-bake permissions to access the camera to either a
> local web app or a remote url.
> Is that possible in WebKit / WPEWebKit?
We do not have something *exactly* like that, in the sense that we do not
have direct support in WebKit to load the settings from disk; but we have
an API which you can use to implement something similar. Whenever some Web
content requests permissions to the application embedding WebKit (a browser,
typically), the WebKitWebView::permission-request  will be emitted.
If you connect a function callback to the signal it in your application,
your callback can then inspect the passed WebKitPermissionRequest and decide
whether to allow or deny the request — and it can decide based on settings
loaded from a configuration file.
Recently in the Cog launcher a new command line argument which allows
allowing or denying permission requests . You can use the code in the
pull request as guidance to implement the WebKitWebView::permission-request
handling, or if you are already using Cog, you can try running with:
% cog --set-permissions=all ...
which will allow all requests. Eventually we would like to extend the
“--set-permissions” command line option to support individual domains and
permission types to improve on the current catch-all implementation provided
by Cog .
I hope this helps!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 195 bytes
Desc: not available
More information about the webkit-wpe