Commit dce74f42 by Oliver Woodman

Add onDrmKeysLoaded back again (oops)

parent e96e6180
...@@ -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);
......
...@@ -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);
} }
......
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