From 010bc0cb42a6b25ef805d0a576f13d492dccd520 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 8 Nov 2024 12:59:40 -0800 Subject: [PATCH] Correct key system supportability queries (#4403) Concatenated container mime type and codecs for mime and key system supportability queries. b/322021829 --- .../renderer/platform/media/key_system_config_selector.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/third_party/blink/renderer/platform/media/key_system_config_selector.cc b/third_party/blink/renderer/platform/media/key_system_config_selector.cc index 33827ac741b3..bafe9e90ec1d 100644 --- a/third_party/blink/renderer/platform/media/key_system_config_selector.cc +++ b/third_party/blink/renderer/platform/media/key_system_config_selector.cc @@ -418,14 +418,14 @@ bool KeySystemConfigSelector::IsSupportedContentType( // CDM cannot support codecs that Chrome does not (which could complicate the // robustness algorithm). #if BUILDFLAG(USE_STARBOARD_MEDIA) - if (SbMediaCanPlayMimeAndKeySystem(container_mime_type.c_str(), - key_system.c_str()) == + const std::string full_mime = container_lower + "; codecs=\"" + codecs + "\""; + if (SbMediaCanPlayMimeAndKeySystem(full_mime.c_str(), key_system.c_str()) == kSbMediaSupportTypeNotSupported) { - LOG(INFO) << __func__ << "(" << container_lower << " and " << key_system + LOG(INFO) << __func__ << "(" << full_mime << " and " << key_system << ") are unsupported."; return false; } else { - LOG(INFO) << __func__ << "(" << container_lower << " and " << key_system + LOG(INFO) << __func__ << "(" << full_mime << " and " << key_system << ") are supported."; } #else // BUILDFLAG(USE_STARBOARD_MEDIA)