Skip to content
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

Strict autoplay blocking #6980

Merged
merged 3 commits into from
Oct 30, 2020
Merged

Strict autoplay blocking #6980

merged 3 commits into from
Oct 30, 2020

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Oct 28, 2020

Resolves brave/brave-browser#10811

This PR enforce autoplay blocking by setting policy to kUserGestureRequired and clear user activation(this is required for navigation and reloading) when autoplay setting is blocked. Also brings back autoplay blocked indicator.
The test is updated so that we can catch autoplay is not blocked in the future

Submitter Checklist:

Test Plan:

  1. Go to youtube.com
  2. Set autoplay to blocked (globally or site specifically)
  3. Click any videos
  4. It should not autoplay and there should be a autoplay blocked indicator on url bar
  5. Click the video to play, it can be played
  6. Refresh the page, it still should not autoplay
  7. Navigate to other videos, it should not autoplay

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@darkdh darkdh self-assigned this Oct 28, 2020
activation when autoplay setting is blocked
@darkdh darkdh marked this pull request as ready for review October 29, 2020 18:37
@darkdh darkdh requested a review from a team as a code owner October 29, 2020 18:37
Copy link
Member

@bbondy bbondy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tests

Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chromium_src/patches LGTM

@darkdh
Copy link
Member Author

darkdh commented Oct 30, 2020

known issues
brave/brave-browser#12295

19:47:32  1 test failed:
19:47:32      RewardsContributionBrowserTest.RecurringTipForUnverifiedPublisher (../../brave/components/brave_rewards/browser/test/rewards_contribution_browsertest.cc:327)

https://ci.brave.com/job/pr-brave-browser-autoplay-block-windows/5/execution/node/236/log/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site-specific autoplay settings are not respected for some profiles
3 participants