We should implement MediaMetadata artwork and use them in Android media notifications.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84 commit 7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84 Author: zqzhang <zqzhang@chromium.org> Date: Fri Jun 03 21:27:42 2016 Implement WebContents.downloadImage() on Java side This CL bridges the native WebContents::DownloadImage to Java. We are planning to use the method for fetching artwork images (WIP) in MediaMetadata and show them in Android media notification. Related CLs: https://codereview.chromium.org/2013813002/ https://codereview.chromium.org/2015433003/ https://codereview.chromium.org/2009243002/ (most relevant one) BUG= 616411 Review-Url: https://codereview.chromium.org/2014553002 Cr-Commit-Position: refs/heads/master@{#397807} [modify] https://crrev.com/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84/content/browser/web_contents/web_contents_android.cc [modify] https://crrev.com/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84/content/browser/web_contents/web_contents_android.h [modify] https://crrev.com/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84/content/public/android/BUILD.gn [modify] https://crrev.com/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java [add] https://crrev.com/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84/content/public/android/java/src/org/chromium/content_public/browser/ImageDownloadCallback.java [modify] https://crrev.com/7aeb422ef7c9f6a387d9f2bcfc0d8cc5c8331b84/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85 commit 8ce5f8dc4a4337cd0d486504413ea0f3be17ba85 Author: zqzhang <zqzhang@chromium.org> Date: Thu Jun 09 17:09:51 2016 Implement MediaMetadata artwork in Blink This CL adds artwork in MediaMetadata in Blink. The artwork info will be propagated to the browser through MediaMetadata, and we will finally fetch the image and display it in media notification. Discussion for the spec: https://github.com/whatwg/mediasession/pull/129 Related CLs: https://codereview.chromium.org/2015433003/ https://codereview.chromium.org/2014553002/ https://codereview.chromium.org/2009243002/ BUG= 616411 Review-Url: https://codereview.chromium.org/2013813002 Cr-Commit-Position: refs/heads/master@{#398922} [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork-expected.txt [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/LayoutTests/media/mediasession/mediasessionmetadata.html [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediaartwork-expected.txt [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaArtwork.h [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaArtwork.idl [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaArtworkInit.idl [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaMetadata.h [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaMetadata.idl [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaMetadataInit.idl [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/mediasession/MediaSessionTest.cpp [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/Source/modules/modules.gypi [add] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/public/platform/modules/mediasession/WebMediaArtwork.h [modify] https://crrev.com/8ce5f8dc4a4337cd0d486504413ea0f3be17ba85/third_party/WebKit/public/platform/modules/mediasession/WebMediaMetadata.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d2a9140bd85b681a0290719da33569db66d06cc commit 5d2a9140bd85b681a0290719da33569db66d06cc Author: zqzhang <zqzhang@chromium.org> Date: Thu Jul 07 11:01:07 2016 Implement MediaMetadata artwork in content This CL implements MediaMetadata artwork in the content layer, and completes the propagation of MediaMetadata from blink to the browser process. BUG= 616411 Review-Url: https://codereview.chromium.org/2015433003 Cr-Commit-Position: refs/heads/master@{#404125} [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/android/browser_media_session_manager.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/android/browser_media_session_manager.h [add] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/android/browser_media_session_manager_browsertest.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/android/media_web_contents_observer_android.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/android/media_web_contents_observer_android.h [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/session/media_session.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/browser/media/session/media_session.h [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/common/android/media_metadata_android.cc [add] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/common/media/media_metadata_sanitizer.cc [add] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/common/media/media_metadata_sanitizer.h [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/common/media/media_session_messages_android.h [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/content_common.gypi [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/content_tests.gypi [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/public/android/java/src/org/chromium/content_public/common/MediaMetadata.java [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/public/common/manifest.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/public/common/manifest.h [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/public/common/media_metadata.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/public/common/media_metadata.h [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/renderer/media/android/renderer_media_session_manager.cc [modify] https://crrev.com/5d2a9140bd85b681a0290719da33569db66d06cc/content/renderer/media/android/webmediasession_android.cc
Moving this nonessential bug to the next milestone. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/107c9084e019c286b8f8f4dbfc3130caa857e85a commit 107c9084e019c286b8f8f4dbfc3130caa857e85a Author: zqzhang <zqzhang@chromium.org> Date: Fri Oct 07 22:58:39 2016 Rename MediaArtwork -> MediaImage We should update the naming for media metadata artwork images from "MediaArtwork" to "MediaImage" to match the spec. Spec URL: https://wicg.github.io/mediasession/#the-mediaimage-interface BUG= 616411 Review-Url: https://codereview.chromium.org/2394223002 Cr-Commit-Position: refs/heads/master@{#423999} [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/content/browser/media/session/media_metadata_sanitizer.cc [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/content/common/media/media_session.typemap [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/content/common/media/media_session_struct_traits.h [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/content/public/common/media_metadata.h [delete] https://crrev.com/35bb5043ed9e6f455d3c725d755ebfc76b53cf2b/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork-expected.txt [delete] https://crrev.com/35bb5043ed9e6f455d3c725d755ebfc76b53cf2b/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html [add] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/LayoutTests/media/mediasession/mediaimage-expected.txt [add] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/LayoutTests/media/mediasession/mediaimage.html [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/LayoutTests/media/mediasession/mediasessionmetadata.html [delete] https://crrev.com/35bb5043ed9e6f455d3c725d755ebfc76b53cf2b/third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediaartwork-expected.txt [add] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediaimage-expected.txt [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/BUILD.gn [delete] https://crrev.com/35bb5043ed9e6f455d3c725d755ebfc76b53cf2b/third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp [add] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaImage.cpp [rename] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaImage.h [rename] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaImage.idl [rename] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaImageInit.idl [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.h [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.idl [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaMetadataInit.idl [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/mediasession/MediaSession.idl [modify] https://crrev.com/107c9084e019c286b8f8f4dbfc3130caa857e85a/third_party/WebKit/Source/modules/modules_idl_files.gni
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3897c97d78b0f392d83d02e8bc7b9dce9fa3720c commit 3897c97d78b0f392d83d02e8bc7b9dce9fa3720c Author: zqzhang <zqzhang@chromium.org> Date: Fri Oct 14 16:21:17 2016 Rename Artwork to MediaImage on the Java side The MediaSession spec is using name "MediaImage" instead of "Artwork". This CL fixes the naming on the Java side to match the spec. Spec page: https://wicg.github.io/mediasession/#mediaimage BUG= 616411 Review-Url: https://codereview.chromium.org/2417013002 Cr-Commit-Position: refs/heads/master@{#425345} [modify] https://crrev.com/3897c97d78b0f392d83d02e8bc7b9dce9fa3720c/content/common/android/media_metadata_android.cc [modify] https://crrev.com/3897c97d78b0f392d83d02e8bc7b9dce9fa3720c/content/public/android/java/src/org/chromium/content_public/common/MediaMetadata.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9d5532918decdbf695c5fe34bef3d2508ba970bc commit 9d5532918decdbf695c5fe34bef3d2508ba970bc Author: zqzhang <zqzhang@chromium.org> Date: Fri Oct 14 20:16:21 2016 Download and show artwork in MediaMetdata in media notification In this CL, when the page sets MediaMetadata with artwork, MediaSessionTabHelper will select one image to download and show it in the media notification. Test page: https://xxyzzzq.github.io/sandbox/media-session/test-multiple-icons.html BUG= 616411 TEST=MANUAL Review-Url: https://codereview.chromium.org/2412483007 Cr-Commit-Position: refs/heads/master@{#425450} [add] https://crrev.com/9d5532918decdbf695c5fe34bef3d2508ba970bc/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaImageCallback.java [add] https://crrev.com/9d5532918decdbf695c5fe34bef3d2508ba970bc/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaImageManager.java [modify] https://crrev.com/9d5532918decdbf695c5fe34bef3d2508ba970bc/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java [modify] https://crrev.com/9d5532918decdbf695c5fe34bef3d2508ba970bc/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java [modify] https://crrev.com/9d5532918decdbf695c5fe34bef3d2508ba970bc/chrome/android/java_sources.gni
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b025c5c637cde4d106038868eb5ad170ba168e66 commit b025c5c637cde4d106038868eb5ad170ba168e66 Author: zqzhang <zqzhang@chromium.org> Date: Tue Dec 06 18:57:11 2016 Allow Blob image src to be used as MediaNotification artwork The ImageDownloader actually supports blob: scheme URLs, we should reduce the restriction on MediaImage src to allow blob: URLs to be used. Steps for testing: * Navigate to http://xxyzzzq.github.io/sandbox/media-session/blob-icon-test.html and start playing media. * Click "Choose File" to upload an image. The preferred image can be found at: http://xxyzzzq.github.io/sandbox/media-session/BLOB.png * Observe the media notification. The icon should change. BUG= 616411 TEST=Manual Review-Url: https://codereview.chromium.org/2552283003 Cr-Commit-Position: refs/heads/master@{#436668} [modify] https://crrev.com/b025c5c637cde4d106038868eb5ad170ba168e66/content/browser/media/session/media_metadata_sanitizer.cc [modify] https://crrev.com/b025c5c637cde4d106038868eb5ad170ba168e66/third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp
Comment 1 by mlamouri@chromium.org
, Jun 1 2016