Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Pause media playback in Private Browsing when minimizing the app #1117

Closed
sv-ohorvath opened this issue Mar 21, 2019 · 25 comments
Closed

Pause media playback in Private Browsing when minimizing the app #1117

sv-ohorvath opened this issue Mar 21, 2019 · 25 comments

Comments

@sv-ohorvath
Copy link
Contributor

sv-ohorvath commented Mar 21, 2019

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.

┆Issue is synchronized with this Jira Task

@sv-ohorvath sv-ohorvath changed the title As a user I want media playback from Private Browsing to stop when minimizing the app As a user I want media playback from Private Browsing to stop when I minimize the app Mar 21, 2019
@vesta0 vesta0 added the P1 Current sprint label Apr 1, 2019
@vesta0 vesta0 added this to the MVP Backlog milestone Apr 1, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Apr 4, 2019

@sv-ohorvath isn't this the current behaviour?

@sv-ohorvath
Copy link
Contributor Author

No, i.e. soundcoud.com still plays in the background.

@vesta0
Copy link
Collaborator

vesta0 commented Apr 17, 2019

@cpeterso is there a related GV API for this?

@cpeterso
Copy link

cpeterso commented Apr 17, 2019

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.

@cpeterso
Copy link

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).

@yoasif
Copy link
Contributor

yoasif commented Apr 17, 2019

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.

@vesta0
Copy link
Collaborator

vesta0 commented Apr 17, 2019

This behaviour is in parity with Fennec. We will re-evaluate whether it needs to change post-mvp.

@vesta0 vesta0 added P2 Upcoming release and removed beta P1 Current sprint labels Apr 17, 2019
@vesta0 vesta0 modified the milestones: MVP Backlog, Post-MVP Backlog Apr 17, 2019
@emilio
Copy link
Contributor

emilio commented Apr 18, 2019

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.

@cpeterso
Copy link

cpeterso commented Apr 19, 2019

@vesta0 - Given Emilio's description of the problem, I think we should reopen his issue #1679 and fix it for Fenix MVP (using the session.setActive(false) steps I described above). 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.

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.

@agi90
Copy link
Contributor

agi90 commented Apr 22, 2019

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).

@vesta0 vesta0 modified the milestones: Post-MVP Backlog, Bugs Apr 22, 2019
@vesta0 vesta0 added P1 Current sprint and removed P2 Upcoming release labels Apr 22, 2019
@vesta0 vesta0 modified the milestones: Bugs, Post-MVP Backlog Apr 23, 2019
@ekager ekager added the needs:ac Needs Android Component Work label Apr 24, 2019
@grigoryk
Copy link
Contributor

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.

@vesta0 vesta0 added could and removed must labels Jul 29, 2019
@bifleming bifleming moved this from Must to Should in Fenix Q3 Feature Backlog Aug 1, 2019
@topotropic
Copy link

@vesta0 what default do we want to support here?

@bifleming bifleming added this to Prioritized Backlog in Fennec to Fenix Transition Aug 14, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Aug 15, 2019

I think we should always default to play and but give our users the option to change that to pause in the settings.

@vesta0 vesta0 added this to To be Triaged in Fenix Sprint Kanban via automation Aug 15, 2019
@vesta0 vesta0 moved this from To be Triaged to Prioritized Feature Backlog in Fenix Sprint Kanban Aug 15, 2019
@bifleming bifleming moved this from Prioritized Feature Backlog to In Progress in Fenix Sprint Kanban Aug 19, 2019
@topotropic topotropic removed their assignment Aug 23, 2019
@pocmo
Copy link
Contributor

pocmo commented Aug 28, 2019

The situation has changed a bit since we are now showing the media notification for private tabs (without any details revealing the website), see:
#4759 (comment)

  • We default to play.
  • The user can pause/resume media from the notification.
  • The user can swipe the notification away (if paused).

With that new behavior do we still need a "pause when minimized" functionality? CC @topotropic

@sblatz sblatz moved this from In Progress to Prioritized Feature Backlog in Fenix Sprint Kanban Aug 30, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Sep 2, 2019

@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.

@vesta0 vesta0 moved this from Prioritized Feature Backlog to In Design in Fenix Sprint Kanban Sep 4, 2019
@vesta0 vesta0 added the needs:UX-feedback Needs UX Feedback label Sep 4, 2019
@topotropic
Copy link

Sounds good to me, thanks!

@topotropic topotropic removed the needs:UX-feedback Needs UX Feedback label Sep 6, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Sep 6, 2019

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.

@topotropic
Copy link

Thanks for the clarification, @vesta!
I believe that this is a legit way to move forward for now and inspect and adapt long-term

A-C: Media automation moved this from Fenix to Done Sep 11, 2019
Fenix Sprint Kanban automation moved this from In Design to Done Sep 11, 2019
Fenix Q3 Feature Backlog automation moved this from Should to Done! Sep 11, 2019
@data-sync-user data-sync-user changed the title Pause media playback in Private Browsing when minimizing the app FNX2-16370 ⁃ Pause media playback in Private Browsing when minimizing the app Jul 31, 2020
@data-sync-user data-sync-user changed the title FNX2-16370 ⁃ Pause media playback in Private Browsing when minimizing the app FNX3-14440 ⁃ Pause media playback in Private Browsing when minimizing the app Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX3-14440 ⁃ Pause media playback in Private Browsing when minimizing the app FNX-4810 ⁃ Pause media playback in Private Browsing when minimizing the app Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-4810 ⁃ Pause media playback in Private Browsing when minimizing the app FNX2-16370 ⁃ Pause media playback in Private Browsing when minimizing the app Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX2-16370 ⁃ Pause media playback in Private Browsing when minimizing the app Pause media playback in Private Browsing when minimizing the app May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Development

No branches or pull requests