Skip to content

Instantly share code, notes, and snippets.

@TakuSemba
Created April 15, 2019 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TakuSemba/64d27edcb4ac1aff4583dbe757183e80 to your computer and use it in GitHub Desktop.
Save TakuSemba/64d27edcb4ac1aff4583dbe757183e80 to your computer and use it in GitHub Desktop.
public final class Case1MediaDrmCallback implements MediaDrmCallback {
private final byte[] keyResponse;
public DemoMediaDrmCallback() {
keyResponse = "{\"keys\":[{\"kty\":\"oct\",\"k\":\"7s2ytUnwKnyXzlDBf0lMoA\",\"kid\":\"x3/uNeUf1hWnuRr8sQkcXg\"}, {\"kty\":\"oct\",\"k\":\"mrt6tsxK07hsIZPa2x54bA\",\"kid\":\"BF9+zDWEjtezwBLqdhRCLw\"}],\"type\":\"temporary\"}".getBytes()
}
@Override public byte[] executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest request)
throws IOException {
throw new UnsupportedOperationException();
}
@Override public byte[] executeKeyRequest(UUID uuid, ExoMediaDrm.KeyRequest request)
throws Exception {
return keyResponse;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment