-
Notifications
You must be signed in to change notification settings - Fork 10
/
CustomTag.ts
59 lines (51 loc) · 1.46 KB
/
CustomTag.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
import {map, mapArray} from '../common/Mapper';
import BitmovinResource from './BitmovinResource';
import PositionMode from './PositionMode';
/**
* @export
* @class CustomTag
*/
export class CustomTag extends BitmovinResource {
/**
* The positioning mode that should be used when inserting the placement opportunity (required)
* @type {PositionMode}
* @memberof CustomTag
*/
public positionMode?: PositionMode;
/**
* Id of keyframe where the custom tag should be inserted. Required, when KEYFRAME is selected as position mode.
* @type {string}
* @memberof CustomTag
*/
public keyframeId?: string;
/**
* Time in seconds where the custom tag should be inserted. Required, when TIME is selected as position mode.
* @type {number}
* @memberof CustomTag
*/
public time?: number;
/**
* The custom tag will be inserted before the specified segment. Required, when SEGMENT is selected as position mode.
* @type {number}
* @memberof CustomTag
*/
public segment?: number;
/**
* The data to be contained in the custom tag. (required)
* @type {string}
* @memberof CustomTag
*/
public data?: string;
constructor(obj?: Partial<CustomTag>) {
super(obj);
if(!obj) {
return;
}
this.positionMode = map(obj.positionMode);
this.keyframeId = map(obj.keyframeId);
this.time = map(obj.time);
this.segment = map(obj.segment);
this.data = map(obj.data);
}
}
export default CustomTag;