Support Multi-Key Content with Key Rotation
@icbaker is already working on this.
Since Apr 2, 2025.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 main branch
More version details
I have selected release branch
Videos: v7-MultiDRM-MultiKey 1080p and v7-MultiDRM-MultiKey-MultiPeriod 1080p from the Axinom playlist.
The videos are encrypted using different keys for different tracks (or groups of tracks). See https://github.com/Axinom/dash-test-vectors for more info.
Playback should work fine as according to Media3 documentation it supports key rotation, but playback is not working says crypto key not available
Devices that reproduce the issue
Amazon FireTv 7.6.2, FireStick Lite,
Samsung J7 Prime etc.
I am unable to play the content on Any device
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Download the axinom playlist and replace the media.exoplaylist in demo, play Videos: v7-MultiDRM-MultiKey 1080p and v7-MultiDRM-MultiKey-MultiPeriod 1080p from the Axinom playlist.
Expected result
Video Should play fine after acquiring license from DRM server.
Actual result
Throwing error and playback doesn't start policy_engine.cpp(55):CanDecryptContent] PolicyEngine::CanDecryptContent Key '1E7784EA2EB98E233F05ABD96E8D46E6' not in license.
androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(stream_06, null, null, audio/mp4a-latm, mp4a.40.2, 128000, es, [-1, -1, -1.0, null], [2, 48000]), format_supported=YES
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:641)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: android.media.MediaCodec$CryptoException: Crypto key not available
Media
https://raw.githubusercontent.com/Axinom/dash-test-vectors/master/axinom.exolist.json
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.