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

[Bug] Videos played from Custom tabs do not stop when custom tab is closed #2097

Closed
mcomella opened this issue Apr 26, 2019 · 9 comments
Closed
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Media P1 Current sprint

Comments

@mcomella
Copy link
Contributor

mcomella commented Apr 26, 2019

Steps to reproduce

  • Open a link in a custom tab (e.g. from my email) whose page has video content
  • Play the video
  • Press back button in toolbar to close custom tab

Expected behavior

Video's audio stops playback

Actual behavior

Video's audio continues playing. afaict, it's impossible to stop the video: the custom tab is closed from the calling app (e.g. gmail) so you can't reopen it and opening Fenix directly does not give you access to the custom tab or video.

Device information

  • Android device: Pixel 2
  • Fenix version: 1.0.1917

fwiw, as an Android user, it concerns me that Fenix (and likely GV specifically) continues running in the background even after I've closed the app without my consent, using my battery and hurting device performance. This goes back to my concern from #1838 where Fennec would run in the background (even without videos playing), slowing down my entire low-end device.

┆Issue is synchronized with this Jira Task

@mcomella mcomella added the 🐞 bug Crashes, Something isn't working, .. label Apr 26, 2019
@ekager
Copy link
Contributor

ekager commented Apr 26, 2019

See related:
#1679
#1117

We need a GV API exposed through the AC engine
mozilla-mobile/android-components#2827

@jonalmeida
Copy link
Contributor

jonalmeida commented Apr 29, 2019

From the same bug in r-b mozilla-mobile/reference-browser#660:

Pressing the system back button does show the correct behaviour, which means we may need to duplicate that same functionality on the close button as well

This means that we aren't closing the session as we should when the CT back button is pressed so I don't believe this is related to the same GV bug.

I've filed this issue here to fix it: mozilla-mobile/android-components#2874

@bifleming bifleming added the needs:ac Needs Android Component Work label May 6, 2019
@vesta0 vesta0 added the P1 Current sprint label May 6, 2019
@vesta0 vesta0 added this to the Bugs milestone May 6, 2019
@jonalmeida
Copy link
Contributor

The a-c issue was just fixed; the next Fenix build should have this change.

@jonalmeida jonalmeida added eng:qa:needed QA Needed and removed needs:ac Needs Android Component Work labels May 8, 2019
@bsurd
Copy link

bsurd commented May 10, 2019

This is still not fixed in the latest build (5/10). Tested on a OnePlus 5T and Nexus 6.

@jonalmeida was the fix not merged?

@bsurd bsurd removed the eng:qa:needed QA Needed label May 10, 2019
@jonalmeida
Copy link
Contributor

@bsurd yes it was, I'm able to follow the STR from the issue and I can see that it is fixed. Can you let me know what STR you are using where it doesn't work?

@bsurd
Copy link

bsurd commented May 13, 2019

@jonalmeida Followed the steps in the description, and I can still reproduce this with the latest (5/13 now) build.

Open a custom tab with a video (from mail, vimeo in my case) > play the video > press the device back button to exit the custom tab > video should stop.. (it keeps playing, the only way to stop it is to open any other media playback)

If pressing the back button from the custom tab, playback does stop but Fenix also crashes, logged an issue #2447 for this

I would upload a video but cannot find a way to record sound and video at the same time... This way of recording seems to be blocked for now.

@jonalmeida
Copy link
Contributor

Ah, I see the issue now: while the a-c feature fixes the issue, Fenix needs to allow the Custom Tabs feature to support onBackPressed presses here: https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt#L540

I'll add a PR in fenix for it.

Nice catch @bsurd !

@ekager ekager closed this as completed in 2035be8 May 17, 2019
@jonalmeida jonalmeida reopened this May 19, 2019
@jonalmeida jonalmeida added the eng:qa:needed QA Needed label May 19, 2019
@sv-ohorvath
Copy link
Contributor

Testing currently blocked by #2447

@lobontiumira
Copy link

Verified as fixed on the latest build 5/23, with Nexus 6P (Android 8.1.0), Huawei Honor 8 (Android 7), and Sony Xperia Z2 tablet (Android 6.0.1).

@lobontiumira lobontiumira added eng:qa:verified QA Verified and removed eng:qa:needed QA Needed labels May 23, 2019
@data-sync-user data-sync-user changed the title [Bug] Videos played from Custom tabs do not stop when custom tab is closed FNX2-17657 ⁃ [Bug] Videos played from Custom tabs do not stop when custom tab is closed Aug 4, 2020
@data-sync-user data-sync-user changed the title FNX2-17657 ⁃ [Bug] Videos played from Custom tabs do not stop when custom tab is closed FNX3-16057 ⁃ [Bug] Videos played from Custom tabs do not stop when custom tab is closed Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX3-16057 ⁃ [Bug] Videos played from Custom tabs do not stop when custom tab is closed FNX-5452 ⁃ [Bug] Videos played from Custom tabs do not stop when custom tab is closed Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-5452 ⁃ [Bug] Videos played from Custom tabs do not stop when custom tab is closed [Bug] Videos played from Custom tabs do not stop when custom tab is closed May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Media P1 Current sprint
Projects
None yet
Development

No branches or pull requests

10 participants