-
Notifications
You must be signed in to change notification settings - Fork 10
/
DefaultManifestAttributeCondition.ts
51 lines (44 loc) · 2.03 KB
/
DefaultManifestAttributeCondition.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 ConditionOperator from './ConditionOperator';
import ConditionType from './ConditionType';
import DefaultManifestCondition from './DefaultManifestCondition';
/**
* @export
* @class DefaultManifestAttributeCondition
*/
export class DefaultManifestAttributeCondition extends DefaultManifestCondition {
/**
* Discriminator property for DefaultManifestCondition
* @type {string}
* @memberof DefaultManifestAttributeCondition
*/
public readonly type: ConditionType = ConditionType.CONDITION;
/**
* The attribute that should be used for the evaluation: - audio.codec - audio.language - audio.bitrate - subtitle.format - subtitle.language - video.height - video.width - video.codec - video.bitrate - drm.type - muxing.type (required)
* @type {string}
* @memberof DefaultManifestAttributeCondition
*/
public attribute?: string;
/**
* The operator that should be used for the evaluation (required)
* @type {ConditionOperator}
* @memberof DefaultManifestAttributeCondition
*/
public operator?: ConditionOperator;
/**
* The value that should be used for comparison. Valid values depend on the attribute: - audio.codec (Enum; e.g., AAC, MP3, OPUS) - audio.language (String) - audio.bitrate (Integer) - subtitle.format (Enum; e.g., WEBVTT) - subtitle.language (String) - video.height (Integer) - video.width (Integer) - video.codec (Enum; e.g., AV1, H264, VP9) - video.bitrate (Integer) - drm.type (Enum; NoDrm, Cenc, CencWidevine, CencPlayReady, CencMarlin, CencFairPlay, Aes128, ClearKey, PrimeTime, Widevine, PlayReady, Marlin, FairPlay) - muxing.type (Enum; e.g., FMP4, MP4) (required)
* @type {string}
* @memberof DefaultManifestAttributeCondition
*/
public value?: string;
constructor(obj?: Partial<DefaultManifestAttributeCondition>) {
super(obj);
if(!obj) {
return;
}
this.attribute = map(obj.attribute);
this.operator = map(obj.operator);
this.value = map(obj.value);
}
}
export default DefaultManifestAttributeCondition;