зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1678373 - Remove mAudibleState. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D127559
This commit is contained in:
Родитель
53a1455dd0
Коммит
c6826b9fad
|
@ -159,20 +159,18 @@ void TelemetryProbesReporter::OnVisibilityChanged(Visibility aVisibility) {
|
|||
|
||||
void TelemetryProbesReporter::OnAudibleChanged(AudibleState aAudibleState) {
|
||||
AssertOnMainThreadAndNotShutdown();
|
||||
LOG("Audibility changed: %s -> %s", ToAudibilityStr(mAudibleState),
|
||||
ToAudibilityStr(aAudibleState));
|
||||
LOG("Audibility changed, now %s", ToAudibilityStr(aAudibleState));
|
||||
if (aAudibleState == AudibleState::eNotAudible) {
|
||||
MOZ_ASSERT(mAudibleState == AudibleState::eAudible);
|
||||
StartInaudibleAudioTimeAccumulator();
|
||||
if (!mInaudibleAudioPlayTime.IsStarted()) {
|
||||
StartInaudibleAudioTimeAccumulator();
|
||||
}
|
||||
} else {
|
||||
MOZ_ASSERT(mAudibleState == AudibleState::eNotAudible);
|
||||
// This happens when starting playback, no need to pause, because it hasn't
|
||||
// been started yet.
|
||||
if (mInaudibleAudioPlayTime.IsStarted()) {
|
||||
PauseInaudibleAudioTimeAccumulator();
|
||||
}
|
||||
}
|
||||
mAudibleState = aAudibleState;
|
||||
}
|
||||
|
||||
void TelemetryProbesReporter::OnMutedChanged(bool aMuted) {
|
||||
|
|
|
@ -154,8 +154,6 @@ class TelemetryProbesReporter final {
|
|||
|
||||
Visibility mMediaElementVisibility = Visibility::eInitial;
|
||||
|
||||
AudibleState mAudibleState = AudibleState::eNotAudible;
|
||||
|
||||
MediaContent mMediaContent = MediaContent::MEDIA_HAS_NOTHING;
|
||||
|
||||
bool mIsPlaying = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче