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

Issue 621855 link

Starred by 4 users

Issue metadata

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

Blocked on:
issue 616411



Sign in to add a comment

Separate the logic for MediaSessionStateChange() and MediaMetadataChanged()

Project Member Reported by zqzh...@chromium.org, Jun 21 2016

Issue description

MediaMetadata is currently sent to the browser process every time the MediaSession state changes. We may want to separate the signals.

Adding this bug entry to keep track of TODO.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Jul 3 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -M-54 M-55
Maybe I need to start working on this one to prepare for the upcoming MediaMetadata changes on the Chrome side, since I don't want the metadata be passed too frequently, especially for MediaImage.

What I now have in mind is to have MediaSessionStateChanged() only for activate/deactivate signals, and MediaMetadataChanged() for metadata update. WebContentsImpl.java will have to store a copy of java MediaMetadata since MediaSessionTabHelper will ignore the metadata if the tab doesn't have audio focus. The copy of MediaMetadata should be light enough.

WDYT guys?
Labels: -M-55 M-56
Sounds good! I think we can call the method MediaSessionMetadataChanged() but that's just naming :)
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 13 2016

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

commit dea696202a6c6abfbb156706a722c74b6e4fc89c
Author: zqzhang <zqzhang@chromium.org>
Date: Thu Oct 13 10:26:51 2016

Split MediaSessionStateChanged() and MediaSessionMetadataChanged()

This CL splits the metadata out from MediaSessionStateChanged() into
another observer function, in order to avoid sending MediaMetadata
through Java every time, which is very expensive and makes the
MediaSessionTabHelper logic complex.

BUG= 621855 

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

[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/chromecast/browser/cast_media_blocker.cc
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/chromecast/browser/cast_media_blocker.h
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/browser/android/web_contents_observer_proxy.cc
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/browser/android/web_contents_observer_proxy.h
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/browser/media/session/media_session.cc
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/browser/media/session/media_session_browsertest.cc
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java
[modify] https://crrev.com/dea696202a6c6abfbb156706a722c74b6e4fc89c/content/public/browser/web_contents_observer.h

Status: Fixed (was: Assigned)

Sign in to add a comment