Bug 194805 - [GTK] UserMediaPermissionRequest does not occur
Summary: [GTK] UserMediaPermissionRequest does not occur
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 197871 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-18 19:45 PST by James Cameron
Modified: 2021-04-14 09:33 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Cameron 2019-02-18 19:45:33 PST
Asking on behalf of One Laptop per Child and Sugar Labs.  Audio recording does not happen on https://scratch.mit.edu/ apparently because a UserMediaPermissionRequest does not occur.

Steps to reproduce:
* start Epiphany, open https://scratch.mit.edu/, click on Create, await loading,
* click on Sound (purple circle),
* click on Meow in play sound, and select Record ...

Observed result: popup message dialog "Could not start recording".

Expected result: as with Firefox and Safari, some sort of user media permission dialog, "Would Like to Access the Microphone", or "Will you allow scratch.mit.edu to use your microphone?",

Tested on:
* Fedora Rawhide 20190113, Epiphany 3.31.90 and WebKitGTK 2.23.3,
* Ubuntu 18.04, Epiphany 3.28.1 and WebKitGTK 2.22.6.

Also occurs on
* http://webaudiodemos.appspot.com/AudioRecorder/index.html
* Sugar Browse, which is also based on WebKitGTK.
Comment 1 Philippe Normand 2019-02-19 02:22:10 PST
Hi James,

I don't think WebRTC/mediastream is enabled at runtime in Epiphany.
Comment 2 Michael Catanzaro 2019-02-19 08:55:12 PST
Well no surprise, since WebKitGTK releases do not support WebRTC. Is this page using WebRTC?
Comment 3 James Cameron 2019-02-19 22:29:12 PST
Thanks.  I don't know enough about JavaScript ecosystem to answer, but both URLs given do call getUserMedia and the response in console is;

TypeError: undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia')

Are there any plans to support this?  What's the nature of the non-support?  So I can explain to others what is needed.
Comment 4 Philippe Normand 2019-03-08 02:24:48 PST
There is a libwebrtc/GStreamer backend implemented in WebKit trunk but it can't be enabled for WebKitGTK releases and used in GPL apps like Epiphany because libwebrtc depends on BoringSSL, licensed under BSD (with advertising clause), which, AFAIK (but IANAL) is considered incompatible with the GPL.
Comment 5 Michael Catanzaro 2019-03-08 08:10:28 PST
(In reply to Philippe Normand from comment #4)
> licensed under BSD (with advertising clause)

Sort of, OpenSSL license is similar to old BSD licenses and has an advertising clause. Details here: https://boringssl.googlesource.com/boringssl.git/+/3390fd88d716ea599d659c2b72b9a6cd4bb36442/LICENSE. Anyway, that's more or less right.

FWIW: I'm going to try Real Soon Now to see if I can do a GDtlsConnection backend for libwebrtc. If it's not too hard, I might even be successful. We need it for Librem 5, so it's become rather urgent.
Comment 6 Michael Catanzaro 2019-03-08 08:12:18 PST
BTW WebKitUserMediaPermissionRequest has been public API since 2.8, so if it really requires WebRTC to work, then it's been broken since added? Do I misunderstand?
Comment 7 Philippe Normand 2019-03-08 08:20:50 PST
Well, it's not broken per-se imho, just useless if the mediastream websetting is toggled off at runtime.
Comment 8 Philippe Normand 2019-07-23 09:46:03 PDT
*** Bug 197871 has been marked as a duplicate of this bug. ***
Comment 9 Philippe Normand 2021-04-14 09:33:40 PDT
Not much we can do here. You would need to enable MEDIA_STREAM in your build but this is currently not supported in tarballs.

We plan to ship a new WebRTC backend based on GstWebRTC but there is no ETA yet.