-
Notifications
You must be signed in to change notification settings - Fork 10
/
PlayReadyDrm.ts
83 lines (72 loc) · 1.85 KB
/
PlayReadyDrm.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import {map, mapArray} from '../common/Mapper';
import Drm from './Drm';
import DrmType from './DrmType';
import EncodingOutput from './EncodingOutput';
import PlayReadyAdditionalInformation from './PlayReadyAdditionalInformation';
import PlayReadyEncryptionMethod from './PlayReadyEncryptionMethod';
/**
* @export
* @class PlayReadyDrm
*/
export class PlayReadyDrm extends Drm {
/**
* Discriminator property for Drm
* @type {string}
* @memberof PlayReadyDrm
*/
public readonly type: DrmType = DrmType.PLAYREADY;
/**
* 16 byte encryption key, 32 hexadecimal characters. Either key or keySeed is required
* @type {string}
* @memberof PlayReadyDrm
*/
public key?: string;
/**
* Key seed to generate key. Either key or keySeed is required
* @type {string}
* @memberof PlayReadyDrm
*/
public keySeed?: string;
/**
* URL of the license server
* @type {string}
* @memberof PlayReadyDrm
*/
public laUrl?: string;
/**
* Base64 encoded pssh payload
* @type {string}
* @memberof PlayReadyDrm
*/
public pssh?: string;
/**
* @type {PlayReadyEncryptionMethod}
* @memberof PlayReadyDrm
*/
public method?: PlayReadyEncryptionMethod;
/**
* Key identifier
* @type {string}
* @memberof PlayReadyDrm
*/
public kid?: string;
/**
* @type {PlayReadyAdditionalInformation}
* @memberof PlayReadyDrm
*/
public additionalInformation?: PlayReadyAdditionalInformation;
constructor(obj?: Partial<PlayReadyDrm>) {
super(obj);
if(!obj) {
return;
}
this.key = map(obj.key);
this.keySeed = map(obj.keySeed);
this.laUrl = map(obj.laUrl);
this.pssh = map(obj.pssh);
this.method = map(obj.method);
this.kid = map(obj.kid);
this.additionalInformation = map(obj.additionalInformation, PlayReadyAdditionalInformation);
}
}
export default PlayReadyDrm;