From 391b3c3591f6dbe4758cc9081599a918eb3285b4 Mon Sep 17 00:00:00 2001 From: Andrzej Surdej Date: Fri, 20 Mar 2026 11:51:48 +0100 Subject: [PATCH] [EME] Check support for full content type string (including codecs) When evaluating media capability support in EME::requestMediaKeySystemAccess(), MediaPlayer::supportsType() was called with only the container MIME type (e.g. 'video/mp4'), stripping codecs and other parameters. Pass the full content type string (e.g. 'video/mp4; codecs="avc1.42E01E"') so the media engine can properly validate codec support, not just the container. --- Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp b/Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp index 88ff86897d1e5..566b8c029cbcf 100644 --- a/Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp +++ b/Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp @@ -420,7 +420,7 @@ std::optional> CDMPrivate::getSupportedCapabilitiesFo // combination of container, media types, robustness and local accumulated configuration in combination // with restrictions: MediaEngineSupportParameters parameters; - parameters.type = ContentType(contentType->mimeType()); + parameters.type = ContentType(requestedCapability.contentType); if (MediaPlayer::supportsType(parameters) == MediaPlayer::SupportsType::IsNotSupported) { // Try with Media Source: