-
Notifications
You must be signed in to change notification settings - Fork 471
Closes #6027 Add support for video autoplay permissions #5953
Closes #6027 Add support for video autoplay permissions #5953
Conversation
...issions/src/main/java/mozilla/components/feature/sitepermissions/db/SitePermissionsEntity.kt
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #5953 +/- ##
============================================
- Coverage 79.08% 78.25% -0.84%
+ Complexity 5299 368 -4931
============================================
Files 578 57 -521
Lines 26671 2249 -24422
Branches 3888 292 -3596
============================================
- Hits 21094 1760 -19334
+ Misses 3977 397 -3580
+ Partials 1600 92 -1508 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job it looks good! 👍
I believe we also have to add dialogs for them , if we don't do it, I think the exception could still happen and the feature won't be enable on Fenix mozilla-mobile/fenix#5636 .
I almost forget to mention, to automatically allow or deny auto play we need to add it to the SitePermissionsRules class |
As we don't want to show prompts for autoplay let's not implement #5953 (review) as in the future we will provide other ways to notify Fenix when a site is requesting autoplay permission. We can improve the commit message as the main goal is to add support for autoplay site permissions :) |
...o/src/main/java/mozilla/components/browser/engine/gecko/permission/GeckoPermissionRequest.kt
Show resolved
Hide resolved
b0a4c8c
to
16d900a
Compare
...c/test/java/mozilla/components/browser/engine/gecko/permission/GeckoPermissionRequestTest.kt
Show resolved
Hide resolved
...permissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsRules.kt
Show resolved
Hide resolved
...rmissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
Show resolved
Hide resolved
...rmissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
Show resolved
Hide resolved
...rmissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
Outdated
Show resolved
Hide resolved
...sions/src/test/java/mozilla/components/feature/sitepermissions/SitePermissionsFeatureTest.kt
Show resolved
Hide resolved
ed7b939
to
e374937
Compare
return if (permissionRequest.isForAutoplay() && sitePermissionsRules == null) { | ||
permissionRequest.reject() | ||
session.contentPermissionRequest.consume { true } | ||
null | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After we add support for adding autoplay settings per site, we can delete this part :)
…rms + fix related crash
e374937
to
f3e4ef3
Compare
...nts/feature/session/src/test/java/mozilla/components/feature/session/SettingsUseCasesTest.kt
Show resolved
Hide resolved
… runtime setting
f3e4ef3
to
0828215
Compare
@baron-severin @Amejia481 so is this something that will land today? I'd like to get it landed at least some time early this week to pick up into a later Beta build, for migration, but let me know how that looks. |
@liuche we plan to land it this morning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets 🚢 it!
bors r=Amejia481 |
bors r+ |
Already running a review |
Build succeeded |
For Fenix#8411: fix crash in SitePermissionsFeature#updateSitePermissionsStatus
@Amejia481 I've spent a few hours trying to reproduce this crash without any luck. Hopefully this fixes the crash (and enables mozilla-mobile/fenix#5636), but at the very least it looks unlikely to break anything.
Pull Request checklist
I don't think this one needs a changelog entry? Happy to add one if I'm wrong.
After merge