Skip to content

Commit

Permalink
Bug 1833266 - part3 : guard the PlayReady support with the media engi…
Browse files Browse the repository at this point in the history
…ne pref. r=jolin

PlayReady can only be played through the media engine, so it doesn't
make sense to support it when the media engine is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D178126
  • Loading branch information
alastor0325 committed May 18, 2023
1 parent c8a3640 commit 42570e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dom/media/eme/EMEUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ bool IsPlayReadyKeySystemAndSupported(const nsAString& aKeySystem) {
if (!StaticPrefs::media_eme_playready_enabled()) {
return false;
}
// 1=enabled encrypted and clear, 2=enabled encrytped.
if (StaticPrefs::media_wmf_media_engine_enabled() != 1 &&
StaticPrefs::media_wmf_media_engine_enabled() != 2) {
return false;
}
return aKeySystem.EqualsLiteral(kPlayReadyKeySystemName) ||
aKeySystem.EqualsLiteral(kPlayReadyKeySystemHardware);
}
Expand Down

0 comments on commit 42570e8

Please sign in to comment.