[webkit-changes] [WebKit/WebKit] 73b6e9: REGRESSION (Safari 17 beta): [MSE] Can no longer p...

Jer Noble noreply at github.com
Thu Aug 24 15:15:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 73b6e9fe2ab416a18e1ef0ca356c27fa507f7e63
      https://github.com/WebKit/WebKit/commit/73b6e9fe2ab416a18e1ef0ca356c27fa507f7e63
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    A LayoutTests/media/media-can-play-case-sensitive-flac-expected.txt
    A LayoutTests/media/media-can-play-case-sensitive-flac.html
    A LayoutTests/media/media-can-play-type-case-sensitive-expected.txt
    A LayoutTests/media/media-can-play-type-case-sensitive.html
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/platform/MIMETypeRegistry.cpp
    M Source/WebCore/platform/MIMETypeRegistry.h
    M Source/WebCore/platform/graphics/MIMETypeCache.cpp
    M Source/WebCore/platform/graphics/MIMETypeCache.h
    M Source/WebCore/platform/graphics/MediaPlayer.cpp
    M Source/WebCore/platform/graphics/MediaPlayer.h
    M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
    M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
    M Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h
    M Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h
    M Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
    M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h
    M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/mse/GStreamerRegistryScannerMSE.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/GStreamerRegistryScannerMSE.h
    M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
    M Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp
    M Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h
    M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
    M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h
    M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
    M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.h
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h
    M Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm

  Log Message:
  -----------
  REGRESSION (Safari 17 beta): [MSE] Can no longer play .FLAC inside MP4
https://bugs.webkit.org/show_bug.cgi?id=260491
rdar://114276660

Reviewed by Eric Carlson.

In iOS 17 and macOS Sonoma, -[AVURLAsset isPlayableExtendedMIMEType:] is much more restrictive when
reporting which codec types are supported. Previously, any CoreMedia FourCC code was listed as
playable when paired with an ISO BMFF container type such as "video/mp4". Now, only those codec
strings listed with the MP4 registration authority are considered valid. Since the official MP4RA
string for the Flac audio codec is "fLaC", this means that whereas `audio/mp4; codecs="flac"` would
previously succeed, those queries will now fail.

While it is technically "correct" to reject the "flac" codec string when paired with ISO BMFF, there
are a number of pages which are currently broken due to this change, so transform "flac" to "fLaC"
at the WebCore layer.

Additionally, while MIME container types are case-insensitive, the codec parameters on those
container types are case-sensitive, so every Hash container where WebKit caches media MIME types
must be changed from ASCIICaseInsensitiveHash to the default StringHash. This prevents both false
positives and false negatives if the correct or incorrectly-cased versions are queried first.

* LayoutTests/media/media-can-play-case-sensitive-flac-expected.txt: Added.
* LayoutTests/media/media-can-play-case-sensitive-flac.html: Added.
* LayoutTests/media/media-can-play-type-case-sensitive-expected.txt: Added.
* LayoutTests/media/media-can-play-type-case-sensitive.html: Added.
* Source/WebCore/platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::supportedMediaMIMETypes):
* Source/WebCore/platform/MIMETypeRegistry.h:
* Source/WebCore/platform/graphics/MIMETypeCache.cpp:
(WebCore::MIMETypeCache::supportedTypes):
(WebCore::MIMETypeCache::canDecodeType):
(WebCore::MIMETypeCache::addSupportedTypes):
(WebCore::MIMETypeCache::initializeCache):
* Source/WebCore/platform/graphics/MIMETypeCache.h:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::getSupportedTypes):
* Source/WebCore/platform/graphics/MediaPlayer.h:
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h:
* Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
(WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):
(WebCore::AVAssetMIMETypeCache::initializeCache):
* Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
* Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm:
(WebCore::AVStreamDataParserMIMETypeCache::supportedTypes):
(WebCore::AVStreamDataParserMIMETypeCache::initializeCache):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes):
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h:
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateWebM::getSupportedTypes):
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::mimeTypeCache):
(WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
(WebKit::RemoteMediaPlayerManagerProxy::getSupportedTypes):
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp:
(WebKit::RemoteMediaPlayerMIMETypeCache::supportedTypes):
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.h:
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
(WebKit::RemoteMediaPlayerManager::getSupportedTypes):
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h:
* Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm:
(createNSArray): Deleted.

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




More information about the webkit-changes mailing list