Commit d92787b5 by olly Committed by Oliver Woodman

Don't request session sharing on CDMs that don't support it

Issue: #4834

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214258163
parent b0cd6cf6
......@@ -145,6 +145,9 @@
looping ([#3829](https://github.com/google/ExoPlayer/issues/3829)).
* Fix issue where `player.getCurrentTag()` throws an `IndexOutOfBoundsException`
([#4822](https://github.com/google/ExoPlayer/issues/4822)).
* Fix bug preventing use of multiple key session support (`multiSession=true`)
for non-Widevine `DefaultDrmSessionManager` instances
([#4834](https://github.com/google/ExoPlayer/issues/4834)).
* IMA extension:
* Refine the previous fix for empty ad groups to avoid discarding ad breaks
unnecessarily ([#4030](https://github.com/google/ExoPlayer/issues/4030) and
......
......@@ -362,7 +362,11 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
mode = MODE_PLAYBACK;
sessions = new ArrayList<>();
provisioningSessions = new ArrayList<>();
if (multiSession) {
if (multiSession && C.WIDEVINE_UUID.equals(uuid) && Util.SDK_INT >= 19) {
// TODO: Enabling session sharing probably doesn't do anything useful here. It would only be
// useful if DefaultDrmSession instances were aware of one another's state, which is not
// implemented. Or if custom renderers are being used that allow playback to proceed before
// keys, which seems unlikely to be true in practice.
mediaDrm.setPropertyString("sessionSharing", "enable");
}
mediaDrm.setOnEventListener(new MediaDrmEventListener());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment