-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial support for blocking media autoplay #235
Draft
octocorvus
wants to merge
1
commit into
GrapheneOS:main
Choose a base branch
from
octocorvus:autoplay
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thestinger
force-pushed
the
13
branch
2 times, most recently
from
October 14, 2022 03:53
7d82a65
to
451a394
Compare
Update on autoplay policy: I split the functionality into three patches:
Current autoplay policy (if autoplay is blocked for site as per content settings):
|
@octocorvus needs to be rebased again |
octocorvus
force-pushed
the
autoplay
branch
2 times, most recently
from
October 26, 2022 13:41
6f3dccd
to
ba0da90
Compare
... when not allowed by content settings. This commit adds four patches: 1. Add enable-autoplay-permssion flag to the renderer. 2. Implement experimental Autoplay site setting (behind a flag). 3. Add AllowAutoplay in WebContentSettingsClient (allows accessing the Autoplay setting in the renderer (blink). 4. Implement the below autoplay policy. Current autoplay policy (if autoplay is blocked for site as per content settings): 1. Muted autoplay is always blocked. 2. Autoplay with sound is allowed if and only if the user has interacted with domain (click, tap, etc.). If we block this, then the user won't be able to start a video by tapping on the play button, since those will be blocked too.
thestinger
force-pushed
the
main
branch
5 times, most recently
from
April 27, 2023 04:56
aba674c
to
fa13acc
Compare
thestinger
force-pushed
the
main
branch
3 times, most recently
from
February 18, 2024 19:56
579e3d3
to
4caf62a
Compare
thestinger
force-pushed
the
main
branch
3 times, most recently
from
May 22, 2024 20:36
8b72e2f
to
2ffe602
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a setting to
chrome://flags
to block media autoplay. Issue #92Tested on a real device running Android 13 (GrapheneOS). Working as exepected (details below) on most websites. But in my testing I found that when navigating on the same website (same-origin), autoplay is not always blocked (yet to figure out how to block that). Also, I'm not sure if this is the only case where autoplay is not blocked; it needs more testing.
I'll make a UI for this later (once this feature is ready).
How it works:
See autoplay flowchart. If the feature/flag
kBlockMediaAutoplay
is enabled,AutoplayPolicy
will block any attempts to:play()
on the media elementsetMuted(false)
(I'm not sure if this needs to be done, since autoplay is already blocked)