-
Notifications
You must be signed in to change notification settings - Fork 10
/
WidevineDrm.ts
51 lines (44 loc) · 1008 Bytes
/
WidevineDrm.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import {map, mapArray} from '../common/Mapper';
import Drm from './Drm';
import DrmType from './DrmType';
import EncodingOutput from './EncodingOutput';
/**
* @export
* @class WidevineDrm
*/
export class WidevineDrm extends Drm {
/**
* Discriminator property for Drm
* @type {string}
* @memberof WidevineDrm
*/
public readonly type: DrmType = DrmType.WIDEVINE;
/**
* 16 byte Encryption key, 32 hexadecimal characters (required)
* @type {string}
* @memberof WidevineDrm
*/
public key?: string;
/**
* 16 byte Key id, 32 hexadecimal characters (required)
* @type {string}
* @memberof WidevineDrm
*/
public kid?: string;
/**
* Base 64 Encoded (required)
* @type {string}
* @memberof WidevineDrm
*/
public pssh?: string;
constructor(obj?: Partial<WidevineDrm>) {
super(obj);
if(!obj) {
return;
}
this.key = map(obj.key);
this.kid = map(obj.kid);
this.pssh = map(obj.pssh);
}
}
export default WidevineDrm;