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
6cb029d8
authored
Sep 28, 2015
by
ojw28
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #818 from pakerfeldt/on-drm-session-ready
Add onDrmSessionReady callback
parents
765d1659
95db1eac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
library/src/main/java/com/google/android/exoplayer/drm/StreamingDrmSessionManager.java
library/src/main/java/com/google/android/exoplayer/drm/StreamingDrmSessionManager.java
View file @
6cb029d8
...
...
@@ -51,6 +51,12 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
public
interface
EventListener
{
/**
* Invoked when DRM keys have been loaded. Depending on license setup, this might occur multiple
* times during playback.
*/
void
onKeysLoaded
();
/**
* Invoked when a drm error occurs.
*
* @param e The corresponding exception.
...
...
@@ -386,6 +392,14 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
try
{
mediaDrm
.
provideKeyResponse
(
sessionId
,
(
byte
[])
response
);
state
=
STATE_OPENED_WITH_KEYS
;
if
(
eventHandler
!=
null
&&
eventListener
!=
null
)
{
eventHandler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
eventListener
.
onKeysLoaded
();
}
});
}
}
catch
(
Exception
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