Fenix: [Bug] Audio playing in background is distorted after a little bit

Created on 8 Apr 2019  ·  10Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  • Play some audio in the browser (e.g. a song from soundcloud.com)
  • Background the browser, open another app
  • Wait for a minute or so

Expected behavior

  • Audio continues playing without issues or audio stops immediately

Actual behavior

  • Audio starts popping, probably because geckoview is not scheduled enough to maintain audio playing

Note: you might encounter https://bugzilla.mozilla.org/show_bug.cgi?id=1506957 while reproducing this.

Device information

  • Android device: Samsung S10e
  • Fenix version: 1.0.1915 (latest from playstore)
Media P1 ac gv 🐞 bug 🙅 waiting

All 10 comments

I think we need to notify Android that we're playing audio on the background with a notification similarly to what Fennec and other music players do.

@vesta0 I think we should remove "Needs GV work" per bugzilla comments?

QA: Can we check that this is still happening now that we have a media notification?

@sblatz I checked and it's still an issue with soundcloud which doesn't show a media notification (#4793 ), other streams like rock.fm or irlpodcast.org don't get interrupted/scrambled.

@sv-ohorvath are you only able to reproduce this on sites that do _not_ show a media notification?

If that's the case, then I think this bug is expected behavior for those sites. We're not displaying a notification so the system won't give us priority to play audio and it will distort as we have no memory.

If this is failing for ANY site that HAS a notification, I think we should keep this open.

Hi, I've just checked this matter on the latest Nightly Build #13610606 from 12/27 using a Google Pixel 3a (Android 9)

Soundcloud - doesn't play in the background anymore. #7369

Twitch - The notification is displayed, if you exit to the Fenix homescreen, or navigate to another app the playback is stopped after a couple of seconds (not instantaneously)

HOT97 - Doesn't display any notification, after you navigate to other apps the quality of the sound is altered. (compared it against Chrome)
Another worth mentioning fact is that no media playback notification is displayed in Fenix #7370

Vimeo - The media notification is displayed, no inconsistencies while having Fenix in background

@sblatz - Please review and share your thoughts on this. ☺️
I'll remove the QA needed label.

Twitch - The notification is displayed, if you exit to the Fenix homescreen, or navigate to another app the playback is stopped after a couple of seconds (not instantaneously)

Ah, so here's the bug we need to fix then :) I'm going to throw this on the AC bug board as it's likely a fix we need there.

Thanks for this investigation @AndiAJ!

@vesta0 is this something we want to prioritize?

Looping @pocmo in because I think he did the work on the notifications that we show now.

For those pages GeckoView doesn't tell us about media elements:
https://bugzilla.mozilla.org/show_bug.cgi?id=1554297

Was this page helpful?
0 / 5 - 0 ratings