Add onDrmKeysLoaded back again (oops)

This commit is contained in:
Oliver Woodman 2015-09-28 20:24:46 +01:00
parent e96e618046
commit dce74f4209
2 changed files with 18 additions and 0 deletions

View file

@ -448,6 +448,11 @@ public class DemoPlayer implements ExoPlayer.Listener, ChunkSampleSource.EventLi
}
}
@Override
public void onDrmKeysLoaded() {
// Do nothing.
}
@Override
public void onDrmSessionManagerError(Exception e) {
if (internalErrorListener != null) {

View file

@ -50,6 +50,11 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
*/
public interface EventListener {
/**
* Invoked each time keys are loaded.
*/
void onDrmKeysLoaded();
/**
* Invoked when a drm error occurs.
*
@ -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);
}