Closed Bug 1454712 Opened 6 years ago Closed 3 years ago

Avoid unnecessarily launching MediaControlService when tab is closed

Categories

(Firefox for Android Graveyard :: Audio/Video, enhancement)

Firefox 61
All
Android
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: JanH, Unassigned)

References

Details

Under some circumstances, here [1] we can end up notifying the MediaControlService even if playback had already stopped, with the notification already gone and the service not running any more.
The effect is that we start the service just so we can immediately stop it again afterwards.

We need to be careful, though - I think we're still suffering from bug 1400185, i.e. sometimes the notification gets stuck in the playing state (and cannot be swiped away by the user) even when media playback has in fact stopped.
Closing the affected tab however is a reliable escape hatch to get rid of the notification after all, so we want to be absolutely sure not to regress this (or ideally fix bug 1400185 in the first place).


[1] https://dxr.mozilla.org/mozilla-central/rev/0ceabd10aac2272e83850e278c7876f32dbae42e/mobile/android/base/java/org/mozilla/gecko/media/AudioFocusAgent.java#189-192
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.