Commit dce74f42 by Oliver Woodman

Add onDrmKeysLoaded back again (oops)

parent e96e6180
......@@ -449,6 +449,11 @@ public class DemoPlayer implements ExoPlayer.Listener, ChunkSampleSource.EventLi
}
@Override
public void onDrmKeysLoaded() {
// Do nothing.
}
@Override
public void onDrmSessionManagerError(Exception e) {
if (internalErrorListener != null) {
internalErrorListener.onDrmSessionManagerError(e);
......
......@@ -51,6 +51,11 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
public interface EventListener {
/**
* Invoked each time keys are loaded.
*/
void onDrmKeysLoaded();
/**
* Invoked when a drm error occurs.
*
* @param e The corresponding exception.
......@@ -386,6 +391,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.onDrmKeysLoaded();
}
});
}
} catch (Exception e) {
onKeysError(e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment