Skip to content

Commit 3c32f7a

Browse files
authored
fix(DASH): Inconsistent DRM across periods when using clearkeys (#8602)
Fixes #8559
1 parent 892be53 commit 3c32f7a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/drm/drm_utils.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ shaka.drm.DrmUtils = class {
9999
};
100100
commonDrms.push(mergedDrm);
101101
break;
102+
} else {
103+
const isClearkeys = (drmInfo) => {
104+
const licenseServerUri = drmInfo.licenseServerUri;
105+
if (!licenseServerUri) {
106+
return false;
107+
}
108+
return licenseServerUri.startsWith('data:application/json;base64,');
109+
};
110+
if (isClearkeys(drm1)) {
111+
commonDrms.push(drm1);
112+
} else if (isClearkeys(drm2)) {
113+
commonDrms.push(drm2);
114+
}
102115
}
103116
}
104117
}

0 commit comments

Comments
 (0)