media icon indicating copy to clipboard operation
media copied to clipboard

DRM: Check key status before adapting to a different representation

Open cdongieux opened this issue 1 year ago • 4 comments

Hi,

This issue follows up issue #4825 created in ExoPlayer repo some times ago. I did not see any issue here about the next steps about this, so I created this issue.

Now that MediaDrm#setOnKeyStatusChangeListener is implemented, do you plan to enhance the player to check a key status before playing the corresponding track? For now, the player just plays what the ABR rules dictate without knowing key status, and thus potentially leading to a playback error with CryptoException.

I see 2 use-cases for which this enhancement would be useful:

  1. The device does not support a certain protection level (for example Widevine L1, but it also could be PlayReady3000).
  2. The user playing a content does not have the right to play a certain protection level (for example a VOD content available with SD and HD representations, the user bought the SD version, so the license he owns only permits to play SD representations even if HD representations are available in the content).

Limiting the resolution on the app side is not flexible enough because we can imagine an app dealing with different stream providers having their own licensing rules, so it would be really better if the player could do that.

Best regards

cdongieux avatar Oct 03 '24 16:10 cdongieux

Thanks, I'll close https://github.com/google/ExoPlayer/issues/4825 as a duplicate of this one and use this one to track the enhancement.

icbaker avatar Oct 07 '24 11:10 icbaker

Hi there ! We are having the exact same issue. There is any update on this enhacement?

soyniqolas avatar Mar 13 '25 17:03 soyniqolas

We are also seeing this issue, any update on this?

akhilesh-dubey avatar Mar 17 '25 06:03 akhilesh-dubey

This would be very nice to have.

Surprisingly, the widevine team suggests this approach during CWIP training - to use WV proxy to limit available profiles by not returning keys but it is not supported by the player :(

jakubvojacek avatar Nov 12 '25 08:11 jakubvojacek