Skip to content

Commit 882ab9b

Browse files
committed
Update ProtectionModel_01b.js
1 parent d20f23d commit 882ab9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/streaming/protection/models/ProtectionModel_01b.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ import KeySystemConfiguration from '../vo/KeySystemConfiguration.js';
4545
import KeySystemAccess from '../vo/KeySystemAccess.js';
4646
import ProtectionErrors from '../errors/ProtectionErrors.js';
4747
import FactoryMaker from '../../../core/FactoryMaker.js';
48-
import ProtectionConstants from '../../constants/ProtectionConstants.js';
48+
49+
// imports from common-media-library
50+
import { INITIALIZATION_DATA_TYPE } from '@svta/common-media-library/drm/common/const/INITIALIZATION_DATA_TYPE.js';
4951

5052
function ProtectionModel_01b(config) {
5153

@@ -311,7 +313,7 @@ function ProtectionModel_01b(config) {
311313
switch (event.type) {
312314
case api.needkey:
313315
let initData = ArrayBuffer.isView(event.initData) ? event.initData.buffer : event.initData;
314-
eventBus.trigger(events.NEED_KEY, { key: new NeedKey(initData, ProtectionConstants.INITIALIZATION_DATA_TYPE_CENC) });
316+
eventBus.trigger(events.NEED_KEY, { key: new NeedKey(initData, INITIALIZATION_DATA_TYPE.CENC) });
315317
break;
316318

317319
case api.keyerror:

0 commit comments

Comments
 (0)