-
Notifications
You must be signed in to change notification settings - Fork 10
/
ScheduledInsertableContent.ts
51 lines (44 loc) · 1.49 KB
/
ScheduledInsertableContent.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 BitmovinResource from './BitmovinResource';
import ScheduledInsertableContentStatus from './ScheduledInsertableContentStatus';
/**
* @export
* @class ScheduledInsertableContent
*/
export class ScheduledInsertableContent extends BitmovinResource {
/**
* Id of the insertable content to play instead of the live stream
* @type {string}
* @memberof ScheduledInsertableContent
*/
public contentId?: string;
/**
* Time to play the content in UTC: YYYY-MM-DDThh:mm:ssZ, if this property is not set the content will be played as soon as possible.
* @type {Date}
* @memberof ScheduledInsertableContent
*/
public runAt?: Date;
/**
* Duration for how long to play the content. Cut off if shorter, loop if longer than actual duration. This property is required if the insertable content is an image.
* @type {number}
* @memberof ScheduledInsertableContent
*/
public durationInSeconds?: number;
/**
* Status of the scheduled insertable content.
* @type {ScheduledInsertableContentStatus}
* @memberof ScheduledInsertableContent
*/
public status?: ScheduledInsertableContentStatus;
constructor(obj?: Partial<ScheduledInsertableContent>) {
super(obj);
if(!obj) {
return;
}
this.contentId = map(obj.contentId);
this.runAt = map(obj.runAt, Date);
this.durationInSeconds = map(obj.durationInSeconds);
this.status = map(obj.status);
}
}
export default ScheduledInsertableContent;