Bug 1842736 - Video Background Playback should work between Regular Browsing and Private Browsing. (#3155)

(cherry picked from commit 130a495bea159be31ecf0659c399d4da1efdc418)

Co-authored-by: iorgamgabriel <iorgamgabriel@yahoo.com>
fenix/117.0
mergify[bot] 10 months ago committed by GitHub
parent a2def3edd5
commit 769f62d1e0

@ -886,16 +886,18 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
// Stop active media when activity is destroyed.
private fun stopMediaSession() {
components.core.store.state.tabs.forEach {
it.mediaSessionState?.controller?.stop()
}
if (isFinishing) {
components.core.store.state.tabs.forEach {
it.mediaSessionState?.controller?.stop()
}
components.core.store.state.findActiveMediaTab()?.let {
components.core.store.dispatch(
MediaSessionAction.DeactivatedMediaSessionAction(
it.id,
),
)
components.core.store.state.findActiveMediaTab()?.let {
components.core.store.dispatch(
MediaSessionAction.DeactivatedMediaSessionAction(
it.id,
),
)
}
}
}

Loading…
Cancel
Save