Commit 65a58ffc by tonihei Committed by Oliver Woodman

Add DRM workaround for Asus Zenfone 2.

Issue: #4413

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202277924
parent 5dd9ef00
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
directly made with the `AnalyticsListener` interface. directly made with the `AnalyticsListener` interface.
* IMA: Fix behavior when creating/releasing the player then releasing * IMA: Fix behavior when creating/releasing the player then releasing
`ImaAdsLoader` ([#3879](https://github.com/google/ExoPlayer/issues/3879)). `ImaAdsLoader` ([#3879](https://github.com/google/ExoPlayer/issues/3879)).
* Fix issue playing DRM protected streams on Asus Zenfone 2
([#4403](https://github.com/google/ExoPlayer/issues/4413)).
### 2.8.2 ### ### 2.8.2 ###
......
...@@ -71,6 +71,9 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto ...@@ -71,6 +71,9 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
uuid = Util.SDK_INT < 27 && C.CLEARKEY_UUID.equals(uuid) ? C.COMMON_PSSH_UUID : uuid; uuid = Util.SDK_INT < 27 && C.CLEARKEY_UUID.equals(uuid) ? C.COMMON_PSSH_UUID : uuid;
this.uuid = uuid; this.uuid = uuid;
this.mediaDrm = new MediaDrm(uuid); this.mediaDrm = new MediaDrm(uuid);
if (C.WIDEVINE_UUID.equals(uuid) && needsForceL3Workaround()) {
mediaDrm.setPropertyString("securityLevel", "L3");
}
} }
@Override @Override
...@@ -222,4 +225,12 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto ...@@ -222,4 +225,12 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
forceAllowInsecureDecoderComponents); forceAllowInsecureDecoderComponents);
} }
/**
* Returns whether the device codec is known to fail if security level L1 is used.
*
* <p>See <a href="https://github.com/google/ExoPlayer/issues/4413">GitHub issue #4413</a>.
*/
private static boolean needsForceL3Workaround() {
return "ASUS_Z00AD".equals(Util.MODEL);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment