Fix "setMediaDrmSession failed: session not opened" when next between WV and ClearKey MediaItem

Exception when next or prev between MediaItem Widevine and ClearKey
This commit is contained in:
Thuc Nguyen 2022-09-03 16:41:19 +07:00
parent ab4d37f499
commit 6ffa8e2fd1

View file

@ -2073,6 +2073,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
// Note: Both oldSession and newSession are non-null, and they are different sessions.
if(!newSession.getSchemeUuid().equals(oldSession.getSchemeUuid())) return true;
if (Util.SDK_INT < 23) {
// MediaCrypto.setMediaDrmSession is only available from API level 23, so re-initialization is