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
bcc4f797
authored
Aug 10, 2020
by
olly
Committed by
Oliver Woodman
Aug 19, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Demo app: Fix DRM support check for ClearKey
Issue: Issue: #7735 PiperOrigin-RevId: 325900705
parent
4faee07d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
RELEASENOTES.md
demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
RELEASENOTES.md
View file @
bcc4f797
...
...
@@ -23,6 +23,8 @@
*
IMA extension: Upgrade to IMA SDK 3.19.4, bringing in a fix for setting the
media load timeout
(
[
#7170
](
https://github.com/google/ExoPlayer/issues/7170
)
).
*
Demo app: Fix playback of ClearKey protected content on API level 26 and
earlier (
[
#7735
](
https://github.com/google/ExoPlayer/issues/7735
)
).
### 2.11.7 (2020-06-29) ###
...
...
demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
View file @
bcc4f797
...
...
@@ -17,7 +17,6 @@ package com.google.android.exoplayer2.demo;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.media.MediaDrm
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.util.Pair
;
...
...
@@ -47,6 +46,7 @@ import com.google.android.exoplayer2.drm.ExoMediaCrypto;
import
com.google.android.exoplayer2.drm.FrameworkMediaDrm
;
import
com.google.android.exoplayer2.drm.HttpMediaDrmCallback
;
import
com.google.android.exoplayer2.drm.MediaDrmCallback
;
import
com.google.android.exoplayer2.drm.FrameworkMediaDrm
;
import
com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException
;
import
com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException
;
import
com.google.android.exoplayer2.offline.DownloadHelper
;
...
...
@@ -485,7 +485,7 @@ public class PlayerActivity extends AppCompatActivity
drmSessionManager
=
DrmSessionManager
.
getDummyDrmSessionManager
();
}
else
if
(
Util
.
SDK_INT
<
18
)
{
errorStringId
=
R
.
string
.
error_drm_unsupported_before_api_18
;
}
else
if
(!
MediaDrm
.
isCryptoSchemeSupported
(
drmInfo
.
drmScheme
))
{
}
else
if
(!
Framework
MediaDrm
.
isCryptoSchemeSupported
(
drmInfo
.
drmScheme
))
{
errorStringId
=
R
.
string
.
error_drm_unsupported_scheme
;
}
else
{
MediaDrmCallback
mediaDrmCallback
=
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
View file @
bcc4f797
...
...
@@ -76,6 +76,15 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
private
int
referenceCount
;
/**
* Returns whether the DRM scheme with the given UUID is supported on this device.
*
* @see MediaDrm#isCryptoSchemeSupported(UUID)
*/
public
static
boolean
isCryptoSchemeSupported
(
UUID
uuid
)
{
return
MediaDrm
.
isCryptoSchemeSupported
(
adjustUuid
(
uuid
));
}
/**
* Creates an instance with an initial reference count of 1. {@link #release()} must be called on
* the instance when it's no longer required.
*
...
...
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