google / google/ExoPlayer

Can/should we have an API for re-provisioning DRM certificates?

Open
#8,039 44 comments 0 reactions 1 assignee Claimed by @icbaker View on GitHub
bug: in platform drm enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### [REQUIRED] Searched documentation and issues
Indeed, I did.

### [REQUIRED] Question
tl;dr what, if any, are the ill effects of "over-provisioning" DRM certificates? As an extreme example, if we were to provision each time the player started up, would we have any problems besides unnecessary resource usage and added latency?

We see a relatively constant low-level trickle of `MediaDrmStateException`, and we've always chalked them up to hw vendor issues on odd devices, but recently somebody on our dev team ended up in a state where they were consistently getting `MediaDrmStateException` caused by `Failed to get key request: General DRM error` on their Pixel 4 after the Android 11 upgrade. It was consistently reproducible so we dove in.

We tried everything imaginable short of a factory reset, but the device was stuck, it just wouldn't give us the key request. Other apps successfully played DRMed content, just not ours. Then we forced a re-provision in our own code (outside of Exo). Things got unstuck and magically started working.

Now we're trying to figure out if this could help the handful of users who are getting this error on a regular basis, and if it might help the multiple handfuls of users who get other various DRM errors on a regular basis.

Our working plan is to trigger a re-provision based on an allow-list of DRM exceptions, and potentially give users a control "recalibrate their player" that they can use when support tells them to.

If this is something that might help other people and isn't a "bad idea" for some opaque DRM-related reason it might be nice to have an API to perform the reprovision from inside of Exo, perhaps by allowing us to inject an overriden `ProvisioningManagerImpl`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.