I'm trying to play a video protected by DRM (Widevine) through ExoPlayer Android library. But I observe that some google api was called when playing the content, like: https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE&signedRequest=CloKTAgAEkgAAAACAAARXQ2Uk20H84uZwd-GgomF4yknNzh91QhUZHxuThGrF5WLuZE6xUzyEWRwhnBlUVV0dmDoaIS2bF9yCUtW-awQeLkSBA-nt1QaBAgAEgASII3yfAKXhcwZhE1ft-BI3AQMe_jgIefj-QS8F9kOZtzt
.
I don know why google api was called? And how can I avoid to call it ?
When DRM is used the device needs to provision a DRM certificate - this is so the DRM servers can be sure they know who they are talking to.
This used to be once per device but is now per application/package, AFAIK.
The Android documentation for MediaDRM notes:
Update May 2022
EVENT_PROVISION_REQUIRED event was deprecated since API 23. Instead a not provisioned exception will be raised:
(https://developer.android.com/reference/android/media/NotProvisionedException)
/Update May 2022
The diagram below shows the separate paths for the provisioning request and the individual license requests (source at time of writing - https://developer.android.com/reference/android/media/MediaDrm):
So, basically you don't want to avoid this being called as it is necessary step in the regular DRM process to allow your device retrieve the key and play back the content.
For browsers, a similar mechanism exists but is based around EME (HTML5 Encrypted Media Extension) and the CDM (Content Decryption Module - a DRM specific module that browsers use to decrypt and play back encrypted content - each DRM system typically has one, e.g. the Widevine CDM is used for Chrome and Firefox, the PlayReady one for Edge etc).
The EME specification includes the following notes (https://www.w3.org/TR/encrypted-media/#individualization):