Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need. Differential Revision: https://phabricator.services.mozilla.com/D52432
This commit is contained in:
@@ -4143,7 +4143,8 @@ void HTMLMediaElement::UpdateHadAudibleAutoplayState() {
|
||||
if ((Volume() > 0.0 && !Muted()) &&
|
||||
(!OwnerDoc()->HasBeenUserGestureActivated() || Autoplay())) {
|
||||
OwnerDoc()->SetDocTreeHadAudibleMedia();
|
||||
if (AutoplayPolicy::WouldBeAllowedToPlayIfAutoplayDisabled(*this)) {
|
||||
if (AutoplayPolicyTelemetryUtils::WouldBeAllowedToPlayIfAutoplayDisabled(
|
||||
*this)) {
|
||||
ScalarAdd(Telemetry::ScalarID::MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT, 1);
|
||||
} else {
|
||||
ScalarAdd(Telemetry::ScalarID::MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT,
|
||||
|
||||
Reference in New Issue
Block a user