Skip to content

Commit

Permalink
Cherry-pick de27958. rdar://problem/112625311
Browse files Browse the repository at this point in the history
    [Cocoa] memorialpress.com: Video not playing in iOS 17
    https://bugs.webkit.org/show_bug.cgi?id=259838
    rdar://112625311

    Reviewed by Simon Fraser.

    There was a misspelling of a new AVFoundation option to be passed into -isPlayableExtendedMIMEType:options:
    which prevents queries of `application/x-mpegURL; codecs="avc1.42E01E"` from succeding.

    * Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h:
    * Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm:
    * Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
    (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):

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

Identifier: 265870.305@safari-7616.1.27.10-branch
  • Loading branch information
jernoble authored and rjepstein committed Aug 7, 2023
1 parent 0a1a05f commit a76acff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ SOFT_LINK_CLASS_FOR_HEADER(PAL, AVAudioPCMBuffer)
SOFT_LINK_CONSTANT_FOR_HEADER(PAL, AVFoundation, AVAssetExportPresetHighestQuality, NSString *)
#define AVAssetExportPresetHighestQuality PAL::get_AVFoundation_AVAssetExportPresetHighestQuality()

SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER(PAL, AVFoundation, AVURLAssetExtendedMIMETypePlayabilityTreatSupportedPlaylistMIMETypesAsISOBMFFMediaDataContainersKey, NSString *)
#define AVURLAssetExtendedMIMETypePlayabilityTreatSupportedPlaylistMIMETypesAsISOBMFFMediaDataContainersKey PAL::get_AVFoundation_AVURLAssetExtendedMIMETypePlayabilityTreatSupportedPlaylistMIMETypesAsISOBMFFMediaDataContainersKey()
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER(PAL, AVFoundation, AVURLAssetExtendedMIMETypePlayabilityTreatPlaylistMIMETypesAsISOBMFFMediaDataContainersKey, NSString *)
#define AVURLAssetExtendedMIMETypePlayabilityTreatPlaylistMIMETypesAsISOBMFFMediaDataContainersKey PAL::get_AVFoundation_AVURLAssetExtendedMIMETypePlayabilityTreatPlaylistMIMETypesAsISOBMFFMediaDataContainersKey()

#endif // USE(AVFOUNDATION)
2 changes: 1 addition & 1 deletion Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,6 @@ static BOOL justReturnsNO()
SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVOutputContextOutputDevicesDidChangeNotification, NSNotificationName, PAL_EXPORT)
#endif // HAVE(AVROUTEPICKERVIEW)

SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVURLAssetExtendedMIMETypePlayabilityTreatSupportedPlaylistMIMETypesAsISOBMFFMediaDataContainersKey, NSString *, PAL_EXPORT)
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVURLAssetExtendedMIMETypePlayabilityTreatPlaylistMIMETypesAsISOBMFFMediaDataContainersKey, NSString *, PAL_EXPORT)

#endif // USE(AVFOUNDATION)
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ static bool isMultichannelOpusAvailable()
ASSERT(isAvailable());

#if HAVE(AVURLASSET_ISPLAYABLEEXTENDEDMIMETYPEWITHOPTIONS)
if (PAL::canLoad_AVFoundation_AVURLAssetExtendedMIMETypePlayabilityTreatSupportedPlaylistMIMETypesAsISOBMFFMediaDataContainersKey()
if (PAL::canLoad_AVFoundation_AVURLAssetExtendedMIMETypePlayabilityTreatPlaylistMIMETypesAsISOBMFFMediaDataContainersKey()
&& [PAL::getAVURLAssetClass() respondsToSelector:@selector(isPlayableExtendedMIMEType:options:)]) {
if ([PAL::getAVURLAssetClass() isPlayableExtendedMIMEType:type.raw() options:@{ AVURLAssetExtendedMIMETypePlayabilityTreatSupportedPlaylistMIMETypesAsISOBMFFMediaDataContainersKey: @YES }])
if ([PAL::getAVURLAssetClass() isPlayableExtendedMIMEType:type.raw() options:@{ AVURLAssetExtendedMIMETypePlayabilityTreatPlaylistMIMETypesAsISOBMFFMediaDataContainersKey: @YES }])
return true;
} else
#endif
Expand Down

0 comments on commit a76acff

Please sign in to comment.