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
361e5d93
authored
Aug 10, 2020
by
olly
Committed by
kim-vde
Aug 17, 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
ad346fbd
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 @
361e5d93
...
...
@@ -282,6 +282,8 @@
*
Removed support for media tunneling
*
Removed support for random ABR (random track selection)
*
Removed support for playing back in spherical stereo mode
*
Fix playback of ClearKey protected content on API level 26 and earlier
(
[
#7735
](
https://github.com/google/ExoPlayer/issues/7735
)
).
*
Add Guava dependency.
### 2.11.7 (2020-06-29) ###
...
...
demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
View file @
361e5d93
...
...
@@ -19,7 +19,6 @@ import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
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
;
...
...
@@ -41,6 +40,7 @@ import com.google.android.exoplayer2.Player;
import
com.google.android.exoplayer2.RenderersFactory
;
import
com.google.android.exoplayer2.SimpleExoPlayer
;
import
com.google.android.exoplayer2.audio.AudioAttributes
;
import
com.google.android.exoplayer2.drm.FrameworkMediaDrm
;
import
com.google.android.exoplayer2.ext.ima.ImaAdsLoader
;
import
com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException
;
import
com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException
;
...
...
@@ -346,7 +346,7 @@ public class PlayerActivity extends AppCompatActivity
showToast
(
R
.
string
.
error_drm_unsupported_before_api_18
);
finish
();
return
Collections
.
emptyList
();
}
else
if
(!
MediaDrm
.
isCryptoSchemeSupported
(
drmConfiguration
.
uuid
))
{
}
else
if
(!
Framework
MediaDrm
.
isCryptoSchemeSupported
(
drmConfiguration
.
uuid
))
{
showToast
(
R
.
string
.
error_drm_unsupported_scheme
);
finish
();
return
Collections
.
emptyList
();
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
View file @
361e5d93
...
...
@@ -74,6 +74,15 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
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