From 6e640ae39c4c3706f314e0213d1b9aaad7f6d980 Mon Sep 17 00:00:00 2001 From: Minhui Zhao Date: Mon, 20 Mar 2023 23:00:40 +1100 Subject: [PATCH] Fix drm checking for single representation in adaptation (#4140) --- src/streaming/Stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streaming/Stream.js b/src/streaming/Stream.js index c58c84ba5d..9f31d6750a 100644 --- a/src/streaming/Stream.js +++ b/src/streaming/Stream.js @@ -983,7 +983,7 @@ function Stream(config) { } // If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers. - return !!(adaptation.ContentProtection || (adaptation.Representation && adaptation.Representation.length > 0 && adaptation.Representation[0].ContentProtection)); + return !!(adaptation.ContentProtection || (adaptation.Representation_asArray && adaptation.Representation_asArray.length > 0 && adaptation.Representation_asArray[0].ContentProtection)); } function compareCodecs(newStream, type, previousStream = null) {