Skip to content

Commit 002b79d

Browse files
committed
ProtectionKeyController: revert issue fixing from PR#2318
1 parent d6001cb commit 002b79d

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/streaming/protection/controllers/ProtectionKeyController.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,20 @@ function ProtectionKeyController() {
194194
cp = cps[cpIdx];
195195
if (cp.schemeIdUri.toLowerCase() === ks.schemeIdURI) {
196196
// Look for DRM-specific ContentProtection
197-
supportedKS.push({
198-
ks: ks,
199-
initData: ks.getInitData(cp),
200-
cdmData: ks.getCDMData(),
201-
sessionId: ks.getSessionId(cp)
202-
});
197+
let initData = ks.getInitData(cp);
198+
if (!!initData) {
199+
supportedKS.push({
200+
ks: keySystems[ksIdx],
201+
initData: initData,
202+
cdmData: ks.getCDMData(),
203+
sessionId: ks.getSessionId(cp)
204+
});
205+
} else if (this.isClearKey(ks)) {
206+
supportedKS.push({
207+
ks: ks,
208+
initData: null
209+
});
210+
}
203211
}
204212
}
205213
}

0 commit comments

Comments
 (0)