Skip to content

Commit ad81972

Browse files
committed
Update KeySystemClearKey.js
Call CML's parseInitDataFromContentProtection
1 parent a8d5268 commit ad81972

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/streaming/protection/drm/KeySystemClearKey.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131

3232
import KeyPair from '../vo/KeyPair.js';
3333
import ClearKeyKeySet from '../vo/ClearKeyKeySet.js';
34-
import CommonEncryption from '../CommonEncryption.js';
3534
import ProtectionConstants from '../../constants/ProtectionConstants.js';
3635
import FactoryMaker from '../../../core/FactoryMaker.js';
3736

3837
const uuid = ProtectionConstants.CLEARKEY_UUID;
3938
const systemString = ProtectionConstants.CLEARKEY_KEYSTEM_STRING;
4039
const schemeIdURI = 'urn:uuid:' + uuid;
4140

41+
import { parseInitDataFromContentProtection } from '@svta/common-media-library/drm/common-encryption/parseInitDataFromContentProtection.js';
42+
4243
function KeySystemClearKey(config) {
4344

4445
config = config || {};
@@ -78,7 +79,7 @@ function KeySystemClearKey(config) {
7879

7980
function getInitData(cp, cencContentProtection) {
8081
try {
81-
let initData = CommonEncryption.parseInitDataFromContentProtection(cp, BASE64);
82+
let initData = parseInitDataFromContentProtection(cp, BASE64);
8283

8384
if (!initData && cencContentProtection) {
8485
const cencDefaultKid = cencDefaultKidToBase64Representation(cencContentProtection.cencDefaultKid);

0 commit comments

Comments
 (0)