Closed Bug 1386712 Opened 7 years ago Closed 7 years ago

[geckoview] Media continues playing in Custom Tab after closed

Categories

(GeckoView :: Media, defect)

defect
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: snorp, Assigned: droeh)

References

Details

Attachments

(1 file)

If I open a page that plays video in a custom tab, then back out of the custom tab, I still hear the audio playing.
Assignee: nobody → nchen
Status: NEW → ASSIGNED
I see this on a Galaxy S7, but on a Nexus 5X it appears to work fine.
Priority: -- → P1
It works on Nexus 5 Android 6.0.1
Priority: P1 → --
Sorina, Can you please test and see if this is reproducible on different devices.
Flags: needinfo?(sorina.florean)
Tested on following devices:
 - Huawei Honor (Android 5.1.1), 
 - Motorola Nexus 6 (Android 7.1.1);
 - Oneplus Two (Android 6.0.1);
 Opened a video, closed from "x" button - toolbar and I can hear the video for 1 sec. If the video is closed from device back button, I'm not hearing the sound.
Flags: needinfo?(sorina.florean)
I think it's okay if we hear the video for only 1 sec?
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Attached patch Quick workaroundSplinter Review
I think this has the potential to be a bit annoying for users, and there's a simple enough workaround for the time being: just load about:blank in CustomTabsActivity.finish() to stop media playback immediately. I'm investigating at the moment if it's a broader issue that will affect GV consumers, in which case we may want to do something a bit nicer.
Assignee: nchen → droeh
Status: RESOLVED → REOPENED
Attachment #8909965 - Flags: review?(snorp)
Resolution: WORKSFORME → ---
Comment on attachment 8909965 [details] [diff] [review]
Quick workaround

Review of attachment 8909965 [details] [diff] [review]:
-----------------------------------------------------------------

I really think we need to find another way to fix this...
Attachment #8909965 - Flags: review?(snorp) → review+
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #7)
> Comment on attachment 8909965 [details] [diff] [review]
> Quick workaround
> 
> Review of attachment 8909965 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I really think we need to find another way to fix this...

Yeah, I'm still looking into the crash we see if we implement the destroy/release API we talked about for GeckoView; when I've got that figured out hopefully we can uplift it and get rid of this.
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c86578718e19
Load about:blank in CustomTabsActivity.finish() to immediately stop media playback. r=snorp
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fdffa3d29768
Add null-checking to fix test bustage. r=me
https://hg.mozilla.org/mozilla-central/rev/c86578718e19
https://hg.mozilla.org/mozilla-central/rev/fdffa3d29768
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 58 → mozilla58

Moving some media bugs to the new GeckoView::Media component.

Component: General → Media
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: