Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
282cf303
authored
Nov 29, 2018
by
andrewlewis
Committed by
Andrew Lewis
Nov 29, 2018
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix clearkey DRM UUID passed to MediaCrypto
PiperOrigin-RevId: 223324279
parent
1093aaf1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
RELEASENOTES.md
View file @
282cf303
...
...
@@ -8,6 +8,7 @@
*
Add options for controlling audio track selections to
`DefaultTrackSelector`
(
[
#3314
](
https://github.com/google/ExoPlayer/issues/3314
)
).
*
Do not retry failed loads whose error is
`FileNotFoundException`
.
*
Fix UUID passed to
`MediaCrypto`
when using
`C.CLEARKEY_UUID`
before API 27.
### 2.9.2 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
View file @
282cf303
...
...
@@ -70,9 +70,7 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
Assertions
.
checkNotNull
(
uuid
);
Assertions
.
checkArgument
(!
C
.
COMMON_PSSH_UUID
.
equals
(
uuid
),
"Use C.CLEARKEY_UUID instead"
);
this
.
uuid
=
uuid
;
// ClearKey had to be accessed using the Common PSSH UUID prior to API level 27.
this
.
mediaDrm
=
new
MediaDrm
(
Util
.
SDK_INT
<
27
&&
C
.
CLEARKEY_UUID
.
equals
(
uuid
)
?
C
.
COMMON_PSSH_UUID
:
uuid
);
this
.
mediaDrm
=
new
MediaDrm
(
adjustUuid
(
uuid
));
if
(
C
.
WIDEVINE_UUID
.
equals
(
uuid
)
&&
needsForceWidevineL3Workaround
())
{
forceWidevineL3
(
mediaDrm
);
}
...
...
@@ -152,7 +150,6 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
@Override
public
byte
[]
provideKeyResponse
(
byte
[]
scope
,
byte
[]
response
)
throws
NotProvisionedException
,
DeniedByServerException
{
if
(
C
.
CLEARKEY_UUID
.
equals
(
uuid
))
{
response
=
ClearKeyUtil
.
adjustResponseData
(
response
);
}
...
...
@@ -212,8 +209,8 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
// indicate that it required secure video decoders [Internal ref: b/11428937].
boolean
forceAllowInsecureDecoderComponents
=
Util
.
SDK_INT
<
21
&&
C
.
WIDEVINE_UUID
.
equals
(
uuid
)
&&
"L3"
.
equals
(
getPropertyString
(
"securityLevel"
));
return
new
FrameworkMediaCrypto
(
new
MediaCrypto
(
uuid
,
initData
),
forceAllowInsecureDecoderComponents
);
return
new
FrameworkMediaCrypto
(
new
MediaCrypto
(
adjustUuid
(
uuid
),
initData
),
forceAllowInsecureDecoderComponents
);
}
private
static
SchemeData
getSchemeData
(
UUID
uuid
,
List
<
SchemeData
>
schemeDatas
)
{
...
...
@@ -271,6 +268,11 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
return
schemeDatas
.
get
(
0
);
}
private
static
UUID
adjustUuid
(
UUID
uuid
)
{
// ClearKey had to be accessed using the Common PSSH UUID prior to API level 27.
return
Util
.
SDK_INT
<
27
&&
C
.
CLEARKEY_UUID
.
equals
(
uuid
)
?
C
.
COMMON_PSSH_UUID
:
uuid
;
}
private
static
byte
[]
adjustRequestInitData
(
UUID
uuid
,
byte
[]
initData
)
{
// Prior to L the Widevine CDM required data to be extracted from the PSSH atom. Some Amazon
// devices also required data to be extracted from the PSSH atom for PlayReady.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment