Bug 1315850 - Ensure we query for the correct string in HavePluginForKeySystem. r=gerald

Otherwise navigator.requestMediaKeySystemAccess() doesn't know whether we have
a CDM or not.

MozReview-Commit-ID: Hic6UneGA4u

--HG--
extra : rebase_source : 68ce766bede0f5c8e41de3a3f9e46b6ef88cab96
This commit is contained in:
Chris Pearce 2017-02-22 13:06:58 +13:00
Родитель a619213252
Коммит 1d0fde26c0
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -99,8 +99,11 @@ MediaKeySystemAccess::CreateMediaKeys(ErrorResult& aRv)
static bool
HavePluginForKeySystem(const nsCString& aKeySystem)
{
bool havePlugin = HaveGMPFor(NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
{ aKeySystem });
nsCString api = MediaPrefs::EMEChromiumAPIEnabled()
? NS_LITERAL_CSTRING(CHROMIUM_CDM_API)
: NS_LITERAL_CSTRING(GMP_API_DECRYPTOR);
bool havePlugin = HaveGMPFor(api, { aKeySystem });
#ifdef MOZ_WIDGET_ANDROID
// Check if we can use MediaDrm for this keysystem.
if (!havePlugin) {