Skip to content

Commit

Permalink
Add DRM workaround for Asus Zenfone 2.
Browse files Browse the repository at this point in the history
Issue: #4413

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202277924
  • Loading branch information
tonihei authored and ojw28 committed Jul 23, 2018
1 parent be995f0 commit a081085
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
* Allow DrmInitData to carry a license server URL
([#3393](https://github.com/google/ExoPlayer/issues/3393)).
* 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 ###

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ private FrameworkMediaDrm(UUID uuid) throws UnsupportedSchemeException {
uuid = Util.SDK_INT < 27 && C.CLEARKEY_UUID.equals(uuid) ? C.COMMON_PSSH_UUID : uuid;
this.uuid = uuid;
this.mediaDrm = new MediaDrm(uuid);
if (C.WIDEVINE_UUID.equals(uuid) && needsForceL3Workaround()) {
mediaDrm.setPropertyString("securityLevel", "L3");
}
}

@Override
Expand Down Expand Up @@ -222,4 +225,12 @@ public FrameworkMediaCrypto createMediaCrypto(byte[] initData) throws MediaCrypt
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);
}
}

0 comments on commit a081085

Please sign in to comment.