mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Extract scheme specific data from PSSH for some FireOS devices
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201679215
This commit is contained in:
parent
9b4981df8a
commit
0a80b47edb
1 changed files with 9 additions and 3 deletions
|
|
@ -121,11 +121,17 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
|
||||||
public KeyRequest getKeyRequest(byte[] scope, byte[] init, String mimeType, int keyType,
|
public KeyRequest getKeyRequest(byte[] scope, byte[] init, String mimeType, int keyType,
|
||||||
HashMap<String, String> optionalParameters) throws NotProvisionedException {
|
HashMap<String, String> optionalParameters) throws NotProvisionedException {
|
||||||
|
|
||||||
// Prior to L the Widevine CDM required data to be extracted from the PSSH atom.
|
// Prior to L the Widevine CDM required data to be extracted from the PSSH atom. Some Amazon
|
||||||
if (Util.SDK_INT < 21 && C.WIDEVINE_UUID.equals(uuid)) {
|
// devices also required data to be extracted from the PSSH atom for PlayReady.
|
||||||
|
if ((Util.SDK_INT < 21 && C.WIDEVINE_UUID.equals(uuid))
|
||||||
|
|| (C.PLAYREADY_UUID.equals(uuid)
|
||||||
|
&& "Amazon".equals(Util.MANUFACTURER)
|
||||||
|
&& ("AFTB".equals(Util.MODEL) // Fire TV Gen 1
|
||||||
|
|| "AFTS".equals(Util.MODEL) // Fire TV Gen 2
|
||||||
|
|| "AFTM".equals(Util.MODEL)))) { // Fire TV Stick Gen 1
|
||||||
byte[] psshData = PsshAtomUtil.parseSchemeSpecificData(init, uuid);
|
byte[] psshData = PsshAtomUtil.parseSchemeSpecificData(init, uuid);
|
||||||
if (psshData == null) {
|
if (psshData == null) {
|
||||||
// Extraction failed. schemeData isn't a Widevine PSSH atom, so leave it unchanged.
|
// Extraction failed. schemeData isn't a PSSH atom, so leave it unchanged.
|
||||||
} else {
|
} else {
|
||||||
init = psshData;
|
init = psshData;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue