Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d8474d43be34f4568b8cfc5ce3895ff20ac8e1fe
https://github.com/WebKit/WebKit/commit/d8474d43be34f4568b8cfc5ce3895ff20ac8e1fe
Author: David Kilzer <[email protected]>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm
Log Message:
-----------
REGRESSION (317433@main): Build failure: AVOutputDeviceTypeCustomProtocol is
only available on macOS 27.0 or newer
<https://bugs.webkit.org/show_bug.cgi?id=319732>
<rdar://182570316>
Unreviewed build fix.
Fix the `-Wunguarded-availability-new` error introduced by 317433@main.
The AVRouting SDK annotates the `AVOutputDeviceType` enumerator
`AVOutputDeviceTypeCustomProtocol` as `SPI_AVAILABLE(macos(27.0),
ios(27.0), tvos(27.0), watchos(27.0), visionos(27.0))`, so referencing
it in `supportsCustomProtocolVideoPlayback()` fails to build for
deployment targets earlier than 27.0.
Suppress the availability warning rather than adding a runtime
`@available` guard. The enumerator is a compile-time constant and
`-[AVOutputDevice deviceType]` has been available since macOS 10.12, so
no runtime API is absent on older systems. On those systems, no output
device reports the custom-protocol type, so the loop already returns
false.
No new tests since this change is not directly testable.
* Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
(WebCore::MediaPlaybackTargetCocoa::supportsCustomProtocolVideoPlayback const):
Canonical link: https://commits.webkit.org/317450@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications