Bug 1871097 - don't check GMP on Android. r=media-playback-reviewers,aosmond

Differential Revision: https://phabricator.services.mozilla.com/D196983
This commit is contained in:
alwu 2023-12-20 17:57:31 +00:00
parent 25da9bcee7
commit 7cf94a160f

View file

@ -30,18 +30,18 @@ namespace mozilla {
/* static */
bool KeySystemConfig::Supports(const nsAString& aKeySystem) {
#ifdef MOZ_WIDGET_ANDROID
// No GMP on Android, check if we can use MediaDrm for this keysystem.
if (mozilla::java::MediaDrmProxy::IsSchemeSupported(
NS_ConvertUTF16toUTF8(aKeySystem))) {
return true;
}
#else
// Check if Widevine L3 or Clearkey has been downloaded via GMP downloader.
if (IsWidevineKeySystem(aKeySystem) || IsClearkeyKeySystem(aKeySystem)) {
return HaveGMPFor(nsCString(CHROMIUM_CDM_API),
{NS_ConvertUTF16toUTF8(aKeySystem)});
}
#ifdef MOZ_WIDGET_ANDROID
// Check if we can use MediaDrm for this keysystem.
if (mozilla::java::MediaDrmProxy::IsSchemeSupported(
NS_ConvertUTF16toUTF8(aKeySystem))) {
return true;
}
#endif
#if MOZ_WMF_CDM