Autoplay content permissions not triggered when e10s are disabled
Categories
(Core :: Audio/Video, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: mortimergoro, Assigned: bryce)
References
Details
Attachments
(1 file)
PERMISSION_AUTOPLAY_AUDIBLE
and PERMISSION_AUTOPLAY_INAUDIBLE
are not triggered in onContentPermissionRequest
delegate in Oculus Quest in Firefox Reality. The same code run in the Android emulator is correctly requesting the permissions (only if mRuntime.getSettings().setAutoplayDefault is not called).
We saw those warnings in the console of Oculus Quest:
01-08 10:33:20.110 4412 4451 W GeckoConsole: [JavaScript Warning: "Feature Policy: Skipping unsupported feature name “autoplay”." {file: "https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl497i6p/www-widgetapi.js" line: 114}]
01-08 10:33:20.112 4412 4451 W GeckoConsole: [JavaScript Warning: "Feature Policy: Skipping unsupported feature name “autoplay”." {file: "https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl497i6p/www-widgetapi.js" line: 117}]
01-08 10:33:20.112 4412 4451 W GeckoConsole: [JavaScript Warning: "Feature Policy: Skipping unsupported feature name “autoplay”." {file: "https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl497i6p/www-widgetapi.js" line: 102}]
Comment 1•6 years ago
|
||
Hi, Imanol,
Do you mind to try MOZ_LOG=GVAutoplay:5
and provide the log to us? The error you saw is unrelated with GV autoplay permission, that is just about the feature policy is no longer supporting autoplay
keyword.
The same code run in the Android emulator is correctly requesting the permissions (only if mRuntime.getSettings().setAutoplayDefault is not called).
I'm not sure I understand the relationship between calling setAutoplayDefault()
and onContentPermissionRequest
, because the permission request would be sent no matter what autoplay setting you're using. We allow the user of GeckoView to check the autoplay pref and other conditions to decide the final result.
In addition, you have to make sure the pref media.geckoview.autoplay.request
is true
in order to enable the autoplay request on GeckoView.
Thank you.
Reporter | ||
Comment 2•6 years ago
|
||
The only log shown is Requestor, AskForPermissionIfNeeded
After adding some extra logs in GVAutoplayPermissionRequestor::AskForPermissionIfNeeded
I found that it's doing a bailout in the XRE_IsParentProcess
check. I confirmed that after enabling multiprocess in FxR the permission prompts are triggered and autoplay works as expected.
I'm renaming this bug
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Imanol Fernandez from comment #2)
The only log shown is
Requestor, AskForPermissionIfNeeded
After adding some extra logs in
GVAutoplayPermissionRequestor::AskForPermissionIfNeeded
I found that it's doing a bailout in theXRE_IsParentProcess
check. I confirmed that after enabling multiprocess in FxR the permission prompts are triggered and autoplay works as expected.I'm renaming this bug
Would that be this check?
Do we need a broader handling here where if we're !e10s we don't do this check? My understanding is that in the e10s case this check makes sense as requests should always come from a content process, but in the case of e10s we're always in the parent process (as there is only one process) so it will always fail.
Reporter | ||
Comment 4•6 years ago
|
||
yes, that check. I think we just need to return in that check if e10s are enabled, and continue the code if e10s are disabled.
Assignee | ||
Comment 5•6 years ago
|
||
Prior to this patch we prevented permission requests firing if the code was
executed in a parent process. This makes sense for e10s, as only content
processes should do so. However, if we're in non-e10s mode then the single
process we run the code in is considered a parent process for the purpose of our
check and we don't fire the request.
This patch changes the check to not send the request if we're specifically in an
e10s parent process.
Updated•6 years ago
|
Comment 6•6 years ago
|
||
Moving to Media component.
Assignee | ||
Comment 8•6 years ago
|
||
Landing is queued. Imanol, if you could verify this once it lands that would be appreciated.
Comment 9•6 years ago
|
||
bugherder |
Reporter | ||
Comment 10•6 years ago
|
||
I have verified and it works well now, thanks!
Description
•