LocalDrmSessionManager(KeySetId keySetIdToRestore, ExoMediaDrm<FrameworkMediaCrypto> mediaDrm, UUID drmScheme, Handler handler, DefaultDrmSessionManager.EventListener eventListener) { this.keySetIdToRestore = keySetIdToRestore; this.mediaDrm = mediaDrm; this.eventListener = eventListener; this.drmScheme = drmScheme; this.handler = handler; }
@Override public byte[] executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest provisionRequest) throws Exception { String url = provisionRequest.getDefaultUrl() + "&signedRequest=" + new String(provisionRequest.getData()); return executePost(url, null, null); }
@Override public byte[] executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest request) throws Exception { return provisionExecutor.execute(new ModularDrmProvisionRequest(request.getDefaultUrl(), request.getData())); }
@Override public byte[] executeKeyRequest(UUID uuid, ExoMediaDrm.KeyRequest request) throws Exception { return streamingModularDrm.executeKeyRequest(new ModularDrmKeyRequest(request.getDefaultUrl(), request.getData())); }
@Override public byte[] executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest request) throws Exception { return drmCallback != null ? drmCallback.executeProvisionRequest(uuid, request) : new byte[0]; }
@Override public byte[] executeKeyRequest(UUID uuid, ExoMediaDrm.KeyRequest request) throws Exception { return drmCallback != null ? drmCallback.executeKeyRequest(uuid, request) : new byte[0]; }