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

Issue 696716 link

Starred by 1 user

Issue metadata

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


Participants' hotlists:
Media-Session-API


Sign in to add a comment

MediaMetadata/MediaImage/etc. not reset properly when navigating to a URL with the same origin

Project Member Reported by zqzh...@chromium.org, Feb 27 2017

Issue description

We should remove the following line:

```
if (mOrigin != null && mOrigin.equals(origin)) return;
```

I don't know why I wrote it :(
 
So we don't do an unnecessary update on the URL change? Shouldn't some other change method be called that would update the metadata/mediaimage?
We reset them on URL change when it's not in-page navigation. As we are navigating away, the metadata and image are no longer valid. They are updated separately (for example, when the page sets MediaMetadata using Media Session API).
Labels: Merge-Request-57
Project Member

Comment 5 by sheriffbot@chromium.org, Feb 28 2017

Labels: -Merge-Request-57 Hotlist-Merge-Review Merge-Review-57
This bug requires manual review: We are only 13 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -Merge-Review-57
I'm reverting the previous CL as it was an incomplete fix. There's an underlying issue in MediaSessionServiceImpl.
I'll continue working on this.

Removed the merge tag temporarily.
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 28 2017

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

commit bc96964f1e70347ca4e9b4b470c101a49033c3fc
Author: zqzhang <zqzhang@chromium.org>
Date: Tue Feb 28 15:40:32 2017

Revert of Fix a notification update issue when navigating to a different URL in the same origin (patchset #2 id:20001 of https://codereview.chromium.org/2720073002/ )

Reason for revert:
The CL is an incomplete fix, as there's another underlying issue in MediaSessionServiceImpl wrt RenderFrame loading.

Original issue's description:
> Fix a notification update issue when navigating to a different URL in the same origin
>
> We should reset the notification info for all non-in-page navigation.
>
> BUG= 696716 
>
> Review-Url: https://codereview.chromium.org/2720073002
> Cr-Commit-Position: refs/heads/master@{#453573}
> Committed: https://chromium.googlesource.com/chromium/src/+/7ed877a5634408b1b4c5791f57ad7ffbfc03d13f

TBR=avayvod@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 696716 

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

[modify] https://crrev.com/bc96964f1e70347ca4e9b4b470c101a49033c3fc/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
[modify] https://crrev.com/bc96964f1e70347ca4e9b4b470c101a49033c3fc/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationActionsUpdatedTest.java
[modify] https://crrev.com/bc96964f1e70347ca4e9b4b470c101a49033c3fc/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java

Cc: mlamouri@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 1 2017

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

commit efb50702d432d69e593cf0bafb85ab82093d5395
Author: zqzhang <zqzhang@chromium.org>
Date: Wed Mar 01 11:41:07 2017

Fix two notification update issues on page navigation

This CL fixes two issues that causes the notification to update
improperly on navigation:

* The notification should reset for same-origin but non-same-page
  navigation (in Java).
* When the RenderFrameHost navigates away, the MediaSession members
  stored in MediaSessionServiceImpl should also be reset.

BUG= 696716 

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

[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/chrome/android/java_sources.gni
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationActionsUpdatedTest.java
[add] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTestUtils.java
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/content/browser/media/session/media_session_impl.cc
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/content/browser/media/session/media_session_impl.h
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/content/browser/media/session/media_session_service_impl.cc
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/content/browser/media/session/media_session_service_impl.h
[modify] https://crrev.com/efb50702d432d69e593cf0bafb85ab82093d5395/content/browser/media/session/media_session_service_impl_browsertest.cc

Labels: Merge-Request-57
Requesting to merge the CL in #9 to M-57. The bug is critical to Media Session API.
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 1 2017

Labels: -Merge-Request-57 Hotlist-Merge-Review Merge-Review-57
This bug requires manual review: We are only 12 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: amineer@chromium.org
+amineer for merge review
Labels: -Merge-Review-57 Merge-Approved-57
Merge approved for M57 branch 2987.
Steps to reproduce:

1. Navigate to https://xxyzzzq.github.io/sandbox/media-session/full-test.html, click "Play/Pause" to start the audio.
2. Observe the notification
3. Navigate to https://xxyzzzq.github.io/sandbox/media-session/simple-audio.html, play the audio
4. Observe the notification

Expected behavior:
The notification in 4 should be different from 2

Without the fix, they should be the same.
FYI I need to merge 16e2688ef7b85f68799f5f1e1b5ed557f19c746b as a dependency,
and 778f0744fecc3c50d4d23b0df97e3eaef9cbf817 after as a follow-up fix for the tests.

Both the other two CLs are only for tests so they are safe.
Project Member

Comment 16 by bugdroid1@chromium.org, Mar 4 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11cb9478bc228e4ddb88a916aceabc73ce3e777f

commit 11cb9478bc228e4ddb88a916aceabc73ce3e777f
Author: Zhiqiang Zhang <zqzhang@google.com>
Date: Sat Mar 04 13:22:55 2017

Fix two notification update issues on page navigation

This CL fixes two issues that causes the notification to update
improperly on navigation:

* The notification should reset for same-origin but non-same-page
  navigation (in Java).
* When the RenderFrameHost navigates away, the MediaSession members
  stored in MediaSessionServiceImpl should also be reset.

BUG= 696716 

Review-Url: https://codereview.chromium.org/2723803002
Cr-Commit-Position: refs/heads/master@{#453906}
(cherry picked from commit efb50702d432d69e593cf0bafb85ab82093d5395)

Review-Url: https://codereview.chromium.org/2736493002 .
Cr-Commit-Position: refs/branch-heads/2987@{#763}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/chrome/android/java_sources.gni
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationActionsUpdatedTest.java
[add] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTestUtils.java
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/content/browser/media/session/media_session_impl.cc
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/content/browser/media/session/media_session_impl.h
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/content/browser/media/session/media_session_service_impl.cc
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/content/browser/media/session/media_session_service_impl.h
[modify] https://crrev.com/11cb9478bc228e4ddb88a916aceabc73ce3e777f/content/browser/media/session/media_session_service_impl_browsertest.cc

Status: Fixed (was: Started)

Sign in to add a comment