Skip to content

Commit

Permalink
Check for length of content protection element when checking if media…
Browse files Browse the repository at this point in the history
… is supported (#4420)
  • Loading branch information
dsilhavy committed Mar 15, 2024
1 parent 6155a68 commit 147a215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/Stream.js
Expand Up @@ -431,7 +431,7 @@ function Stream(config) {
return true;
}

if (!!mediaInfo.contentProtection && !capabilities.supportsEncryptedMedia()) {
if (!!mediaInfo.contentProtection && mediaInfo.contentProtection.length > 0 && !capabilities.supportsEncryptedMedia()) {
errHandler.error(new DashJSError(Errors.CAPABILITY_MEDIAKEYS_ERROR_CODE, Errors.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));
return false;
}
Expand Down

0 comments on commit 147a215

Please sign in to comment.