I'm implementing DRM for my app but the request for getting a provisioning certificate is not working. This is an example of the generated url (POST) https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE&signedRequest=CloKTAgAEkgAAAACAAAWOhe56yXvv4bS5HsN9tcC1CDSSeLQ33QhETq_xJainehEOj9ydrcwebiZ-oGsQJqImOAtmGLp7I12QOBURBH0oPESBFh4r1oaBAgAEgASIG2kLvPaj2acjLz9TCUxWtI6PcOjr97TmOj4_5dlb8xO, but this request seems much sorter than this one for example. My code to generate the url is the same as in the ExoPlayer source
@Override
public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request)
throws MediaDrmCallbackException {
String url =
request.getDefaultUrl() + "&signedRequest=" + Util.fromUtf8Bytes(request.getData());
return executePost(
dataSourceFactory,
url,
/* httpBody= */ null,
/* requestProperties= */ Collections.emptyMap());
}
I've also tried to use HttpMediaDrmCallback from ExoPlayer and it's not working either. I guess request.getData() is wrong. The request happens when I tested on a Nexus 9 with Android 7.1.1, if I try with Android 10/11 it works fine. Any idea what's going on?
It works by forcing Widevine L3