mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
|
@Override
|
||||||
public void onDrmSessionManagerError(Exception e) {
|
public void onDrmSessionManagerError(Exception e) {
|
||||||
if (internalErrorListener != null) {
|
if (internalErrorListener != null) {
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,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.
|
||||||
*
|
*
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue