Till the last update (79.0.5), media used to play in the background even if the browser is minimized (navigate to other apps), or android on sleep (press power button, screen off). But after the update lost that functionality, once the screen is off, media continues to play till the device enters sleep mode. i.e, for a max one minute.
Since there was an update to the Android as well (device: Samsung S20), I suspected a config change in the device level. Made sure,
- Firefox App not "Optimized for battery usage",
- NOT IN the "Sleeping Apps"
- IN "Apps that wont be put to sleep"
- Allowed all notifications (so that a firefox media control available in notifications bar/tray)
but still the playback stops when the screen is off/device sleeps.
Which is somewhat against what is listed in here, Media Controls in Firefox for Android
Listen to videos in the background
If you minimize Firefox while playing video/audio, it will continue to play in the background, so you can multitask on your phone.
Any idea?