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
dce74f42
authored
Sep 28, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add onDrmKeysLoaded back again (oops)
parent
e96e6180
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java
library/src/main/java/com/google/android/exoplayer/drm/StreamingDrmSessionManager.java
demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java
View file @
dce74f42
...
@@ -449,6 +449,11 @@ public class DemoPlayer implements ExoPlayer.Listener, ChunkSampleSource.EventLi
...
@@ -449,6 +449,11 @@ public class DemoPlayer implements ExoPlayer.Listener, ChunkSampleSource.EventLi
}
}
@Override
@Override
public
void
onDrmKeysLoaded
()
{
// Do nothing.
}
@Override
public
void
onDrmSessionManagerError
(
Exception
e
)
{
public
void
onDrmSessionManagerError
(
Exception
e
)
{
if
(
internalErrorListener
!=
null
)
{
if
(
internalErrorListener
!=
null
)
{
internalErrorListener
.
onDrmSessionManagerError
(
e
);
internalErrorListener
.
onDrmSessionManagerError
(
e
);
...
...
library/src/main/java/com/google/android/exoplayer/drm/StreamingDrmSessionManager.java
View file @
dce74f42
...
@@ -51,6 +51,11 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
...
@@ -51,6 +51,11 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
public
interface
EventListener
{
public
interface
EventListener
{
/**
/**
* Invoked each time keys are loaded.
*/
void
onDrmKeysLoaded
();
/**
* Invoked when a drm error occurs.
* Invoked when a drm error occurs.
*
*
* @param e The corresponding exception.
* @param e The corresponding exception.
...
@@ -386,6 +391,14 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
...
@@ -386,6 +391,14 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
try
{
try
{
mediaDrm
.
provideKeyResponse
(
sessionId
,
(
byte
[])
response
);
mediaDrm
.
provideKeyResponse
(
sessionId
,
(
byte
[])
response
);
state
=
STATE_OPENED_WITH_KEYS
;
state
=
STATE_OPENED_WITH_KEYS
;
if
(
eventHandler
!=
null
&&
eventListener
!=
null
)
{
eventHandler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
eventListener
.
onDrmKeysLoaded
();
}
});
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
onKeysError
(
e
);
onKeysError
(
e
);
}
}
...
...
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