[wpe-webkit] VideoCapture permissions / Allowed URLs

Adrian Perez de Castro aperez at igalia.com
Mon May 6 08:24:00 PDT 2019


Hello Diego,

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
> https://webkit.org/blog/8672/on-the-road-to-webrtc-1-0-including-vp8/
> <https://webkit.org/blog/8672/on-the-road-to-webrtc-1-0-including-vp8/>. 
> 
> Just wondering if there’s an equivalent of
> http://www.chromium.org/administrators/policy-list-3#VideoCaptureAllowedUrls
> 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 [1] 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 [2]. 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 [3].

I hope this helps!

Regards,
—Adrián

---
[1] https://wpewebkit.org/reference/wpewebkit/unstable/WebKitWebView.html#WebKitWebView-permission-request
[2] https://github.com/Igalia/cog/pull/84
[3] https://github.com/Igalia/cog/issues/85
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20190506/1e9ce8e3/attachment.bin>


More information about the webkit-wpe mailing list