As a user I want to have the option to pause media playback in Private Browsing when minimizing the app, so I can protect my private content.
Acceptance Criteria:
-I have the option to pause media playback in my browser media settings.
-When enabled, I can't hear media playback when I minimize my private browser while playing audio/video.
@sv-ohorvath isn't this the current behaviour?
No, i.e. soundcoud.com still plays in the background.
@cpeterso is there a related GV API for this?
is there a related GV API for this?
To stop media playback, I am told that Fenix needs to call session.setActive(false) to when a tab (or the app) is backgrounded. I don't see any calls to setActive() in Fenix or AC code, but I did find the AC PR to _remove_ calls the session.setActive(): mozilla-mobile/android-components#703
Agi says below to call setSuspendedMediaWhenInactive, not setActive.
OTOH, isn't "YouTube continues to play in the background" a feature that we wanted? YouTube plays in the background in Fennec, but not Chrome (unless you pay for YouTube Red).
OTOH, isn't "YouTube continues to play in the background" a feature that we wanted? YouTube plays in the background in Fennec, but not Chrome (unless you pay for YouTube Red).
Yeah, and I don't know that it makes sense to pause playback if I minimize something. On desktop, for example, minimizing private windows keeps media playback going, so I don't quite understand why this is required for Fenix.
This behaviour is in parity with Fennec. We will re-evaluate whether it needs to change post-mvp.
Note that Fenix also keeps playing if you _close_ the app (#1679), not only minimize it. Fennec definitely doesn't do that, and I don't see how that would make sense.
Also, killing the battery is not fun, probably is worth stopping _some_ videos at least... But I agree that's probably more refinement.
@vesta0 - Given Emilio's description of the problem, I think we should reopen his issue #1679 and fix it for Fenix MVP (using the . If the Fenix app is no longer accessible in Android's "recent apps" list, there's no indication where the user should go to stop the media playback.session.setActive(false) steps I described above)
As for leaving media playing when the app is backgrounded/minimized (this issue), we might want to add a persistent notification in the notification bar so users can find the app playing audio.
The right way to do this in GeckoView is setting setSuspendedMediaWhenInactive to true.
I don't think Fenix should call setActive, sorry for the confusion (my bad).
FWIW, this user story seems like a bug to me. I use my browser as a media player a lot, and having media stop while the app is backgrounded is a problem to fix, not a feature to introduce.
Let's close this for now, and re-assess if necessary. I'm not sure the "private mode" distinction adds enough subtlety to justify pausing media in the background. Battery concerns are broader and pretty sublte... Feel free to re-open if I'm wrong here.
FYI, Brave is now advertising the non private mode version of this as a feature. https://twitter.com/BraveSampson/status/1122950280520269825
Please note that this was a feature request, not a requirement.
As an idea why: watching media in private mode is because sometimes you want to keep THAT kind of media private. If you need to close the tab it requires 2 taps, too many for some 😁 I just thought it could be a nice feature for PB only. If you need to keep playback running, you can play it in normal browsing.
It is an interesting idea - would be curious to see how users react. Another wrinkle might be for users who use "always private" browsing (an option on desktop).
FWIW, Focus pauses video. Fennec in private tabs does not.
Why not add a "Stop playing media when browser is minimized" option so that users can toggle that if they want?
@sebast889 that's a great idea! I added it to the user story.
This is a feature request and it aligns with what Focus does today. We will re-evaluate whether we want to build this as an option in Fenix post-mvp. Keeping it open as a p2 in the backlog.
removed ux label -it's on our radar already as it's part of the Q3 plan
@vesta0 what default do we want to support here?
I think we should always default to play and but give our users the option to change that to pause in the settings.
The situation has changed a bit since we are now showing the media notification for private tabs (without any details revealing the website), see:
https://github.com/mozilla-mobile/fenix/issues/4759#issuecomment-524863816
With that new behavior do we still need a "pause when minimized" functionality? CC @topotropic
@pocmo that's a great point. @topotropic do you have any concerns around this particular use case: User is viewing a private video in private mode, and minimizes the tab in order to maintain their privacy but the media keeps playing until they initiate a second action to either close the private app or pause the media through the notifications.
Sounds good to me, thanks!
Thanks @topotropic just in case my question wasn't clear: the use case I mentioned above may raise some concern with privacy focused users. From a user experience perspective, I was wondering if you thought we were designing in accordance to a privacy centric user's expectation.
It sounds like you don't think that's an issue, and you are good with the media not being paused in both private browsing and regular browsing. If that's the case, we can close this issue.
Thanks for the clarification, @vesta!
I believe that this is a legit way to move forward for now and inspect and adapt long-term
Most helpful comment
FWIW, this user story seems like a bug to me. I use my browser as a media player a lot, and having media stop while the app is backgrounded is a problem to fix, not a feature to introduce.