[webkit-changes] [WebKit/WebKit] ebd5a3: Provide a fallback image to NowPlaying when a webs...

Jean-Yves Avenard noreply at github.com
Sat Aug 10 20:12:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ebd5a388e5b0bcd0ea50fbb66a2fdb002e5d6816
      https://github.com/WebKit/WebKit/commit/ebd5a388e5b0bcd0ea50fbb66a2fdb002e5d6816
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2024-08-10 (Sat, 10 Aug 2024)

  Changed paths:
    A LayoutTests/http/tests/media/now-playing-info-media-session-artwork-favicon-expected.txt
    A LayoutTests/http/tests/media/now-playing-info-media-session-artwork-favicon.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/WebCore/Modules/mediasession/MediaMetadata.cpp
    M Source/WebCore/Modules/mediasession/MediaMetadata.h

  Log Message:
  -----------
  Provide a fallback image to NowPlaying when a website doesn't specify one in MediaSession metadata
https://bugs.webkit.org/show_bug.cgi?id=277904
rdar://131185836

Reviewed by Eric Carlson.

Should the MediaSession's metadata fail to provide an artwork, attempt to use page's icon instead.
If the site modify the metadata content without setting a new object, we will wait a maximum of 500ms
before attempting to retrieve the icon, to give time for the site to finish setting up all the metadata.

Added test.

* LayoutTests/http/tests/media/now-playing-info-media-session-artwork-favicon-expected.txt: Added.
* LayoutTests/http/tests/media/now-playing-info-media-session-artwork-favicon.html: Added. Had make test to http
as the DocumentLoader's LinkIconCollector will ignore all icons not using http family protocol.
* LayoutTests/platform/glib/TestExpectations: No NowPlaying on glib platforms.
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/Modules/mediasession/MediaMetadata.cpp:
(WebCore::MediaMetadata::MediaMetadata):
(WebCore::MediaMetadata::setTitle):
(WebCore::MediaMetadata::setArtist):
(WebCore::MediaMetadata::setAlbum):
(WebCore::MediaMetadata::refreshArtworkImage):
(WebCore::MediaMetadata::maybeStartTimer):
* Source/WebCore/Modules/mediasession/MediaMetadata.h:

Canonical link: https://commits.webkit.org/282096@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list