Closed Bug 1329122 Opened 4 years ago Closed 4 years ago
Media control doesn't disappear immediately after pressing the pause button and navigating out to another page
Environment: Device: Asus ZenPad 8 (Android 6.0.1); Build: Nightly 53.0a1 (2017-01-05); Steps to reproduce: 1. Go to youtube.com and play a video; 2. In the same tab go to google.com; 3. Open notification bar. Expected result: Media control notification is not displayed. Actual result: Media control notification is still displayed and changed, URL: from google.com.
Assignee: nobody → walkingice0204
tracking-fennec: ? → +
Priority: -- → P1
Mark this as duplicate based on https://bugzilla.mozilla.org/show_bug.cgi?id=1326114#c1 and the fact that is not reproducible in latest Nightly build (2017-02-24).
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1326114
Making some exploratory I found that if media control notification is paused, this bug is still reproducing. And after 4-5 seconds, notification disappears. Device: - Samsung Galaxy Note 4 (Android 5.0.1) - Huawei Honor 8 (Android 6.0)
I can reproduce this one. If we pause video from Notification bar, forward to another web site, `MediaControlService` receives `MEDIA_PLAYING_CHANGE` event(from Tabs) after a delay of 4~5 seconds. (Then remove notification as Sorina saw.) Alastor, do you have any idea of this behavior?  https://dxr.mozilla.org/mozilla-central/rev/f9362554866b327700c7f9b18050d7b7eb3d2b23/mobile/android/base/java/org/mozilla/gecko/Tabs.java#645
Flags: needinfo?(walkingice0204) → needinfo?(alwu)
I can also reproduce this issue, keep NI, I'll investigate it later.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: Media control notification is displayed for no-audio pages if is open in the same tab after an audio content was played → Media control doesn't disappear immediately after pressing the pause button and navigating out to another page
It would be a good start that Julian can fix this bug with Alastor's guidance/help. :-)
That's platform's bug, we should dispatch MEDIA_PLAYING_CHANGE immediately when the document becomes inactive, instead of dispatching when the HTMLMedia was destroyed.
Assignee: walkingice0204 → alwu
Hi, Julian, Do you know how to write the Java test to simulate this situation? I can upload the fix on the platform side, but I don't know how to add the UI test. Thanks!
Hi Alastor, I asked Sebastian about UI test. As far as we know, UI test cannot look at notification, therefore it seems not feasible to add UI test for this. If you think it helps, I can give more refactoring to MediaControlService and add some unit test to ensure it will update notification bar as we expect.
Comment on attachment 8849045 [details] Bug 1329122 - should unregister agent when media element becomes inactive. https://reviewboard.mozilla.org/r/121902/#review124784
Attachment #8849045 - Flags: review?(amarchesini) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/9857a6a70000 should unregister agent when media element becomes inactive. r=baku
(In reply to Julian Chu [:walkingice] from comment #11) > I asked Sebastian about UI test. As far as we know, UI test cannot look at > notification, therefore it seems not feasible to add UI test for this. Also, Robocop tests currently run on an 4.3 emulator, whereas the media notification is only working on 5+ if I remember correctly?
(In reply to Jan Henning [:JanH] from comment #14) > Also, Robocop tests currently run on an 4.3 emulator, whereas the media > notification is only working on 5+ if I remember correctly? Yes, now we only support Android L and above, but it's possible to backport it to the older version. See bug1278624.
Comment on attachment 8849045 [details] Bug 1329122 - should unregister agent when media element becomes inactive. Approval Request Comment [Feature/Bug causing the regression]: Not regression [User impact if declined]: Visual inconsistency, the media control would not disappear immediately after leaving the previous playing tab and navigating to other URL. [Is this code covered by automated tests?]: No, the UI testing framework doesn't support. [Has the fix been verified in Nightly?]: No [Needs manual test from QE? If yes, steps to reproduce]: Yes, see comment2 [List of other uplifts needed for the feature/fix]: No [Is the change risky?]: No [Why is the change risky/not risky?]: Only affect UI change [String changes made/needed]: No
Hi Sorina, could you help find someone to verify if this issue was fixed as expected on a latest Nightly build? Thanks!
Hi, Tested with HTC 10 (Android 6.0.1) and LG G4 (Android 5.1) on latest Nightly (55.0a1 from 2017-03-27) and the issue seems not reproducible. If media control notification from notification bar is pause/play and another page with no media content is loaded in the same tab, notification is not displayed anymore.
Comment on attachment 8849045 [details] Bug 1329122 - should unregister agent when media element becomes inactive. Fix a visual issue and was verified. Aurora54+ & Beta53+.
Verified as fixed on Beta 53.0b9 (2017-04-04). Devices: - Asus ZenPad 8.0 (Android 6.0.1) - Motorola Nexus 6 (Android 7.0)
You need to log in before you can comment on or make changes to this bug.