mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Add onDrmKeysLoaded back again (oops)
This commit is contained in:
parent
e96e618046
commit
dce74f4209
2 changed files with 18 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue