New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 649336 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Media notification shows/hides for vine.co (video can play without notification)

Project Member Reported by zqzh...@chromium.org, Sep 22 2016

Issue description

Forking this bug from #649286.
This bug different from #515143.

1. Navigate vine.co, play some video
2. Press home button, the video should pause
3. Resume video from media notification, the video should resume

Observed:
The video is looping, but the media notification shows for one playthrough, and disappears for the next, and then appears again (over and over).

Reproducible on M53-55
 
Posting Anton's comment here:

#2 seems like a race:
- the media playback ends and the notification is told to be hidden - it sends an intent to the notification service to hide
- the new media playback starts and the intent is sent to the notification service to show
- if show is received before hide, the service will hide the notification for the new playback (as we key notifications by the tab id)
Anton is right.
I checked the call sequence, and the sequence in chrome is correct.
Maybe we should use the two-parameter notification, and increment notification id everytime on `hide()`?

https://developer.android.com/reference/android/support/v4/app/NotificationManagerCompat.html#cancel(java.lang.String, int)

Currently we have one notification id for playback, one for cast and one for presentation. We should use the string parameter for distinguishing these notifications.
Labels: -M-53
Seems like vine.co calls play() every time the video reaches end. We should probably go with the "multiple notification id" solution. Plumbing "loop" attribute does not work for this case.
Labels: -M-54
Turns out to be a PlaybackListenerService issue.
When cancelNotification(), we dismiss the notification and stop the service.
Then we call showNotification(), and then Service.onDestroyed() will dismiss the notification again. Will send a hot fix soon.
Labels: -Pri-1 Pri-2
Hmm, we still have a race condition :(
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c90bda2a54336143cbc014b95db28ad2ee80892

commit 1c90bda2a54336143cbc014b95db28ad2ee80892
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Nov 04 13:37:15 2016

Delay the signal for "MediaSession goes uncontrollable" message

This CL make the notification dismiss delayed in order to avoid
notification flickering when MediaSession goes inactive and then active
in a short period.

BUG= 515143 , 649336 

Review-Url: https://codereview.chromium.org/2446273002
Cr-Commit-Position: refs/heads/master@{#429875}

[modify] https://crrev.com/1c90bda2a54336143cbc014b95db28ad2ee80892/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java

Status: Fixed (was: Assigned)
Labels: -M-55 M-56

Sign in to add a comment