-
Notifications
You must be signed in to change notification settings - Fork 10
/
LiveDashManifest.ts
65 lines (56 loc) · 1.66 KB
/
LiveDashManifest.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
import {map, mapArray} from '../common/Mapper';
import AvailabilityStartTimeMode from './AvailabilityStartTimeMode';
/**
* @export
* @class LiveDashManifest
*/
export class LiveDashManifest {
/**
* Dash manifest id (required)
* @type {string}
* @memberof LiveDashManifest
*/
public manifestId?: string;
/**
* Timeshift in seconds
* @type {number}
* @memberof LiveDashManifest
*/
public timeshift?: number;
/**
* Live edge offset in seconds
* @type {number}
* @memberof LiveDashManifest
*/
public liveEdgeOffset?: number;
/**
* The suggestedPresentationDelay to be set in the DASH manifest. If nothing is set, no value will be set.
* @type {number}
* @memberof LiveDashManifest
*/
public suggestedPresentationDelay?: number;
/**
* The minimumUpdatePeriod to be set in the DASH manifest. If nothing is set, the segment duration will be set.
* @type {number}
* @memberof LiveDashManifest
*/
public minimumUpdatePeriod?: number;
/**
* The mode to trigger the availabilityStartTime initialization.
* @type {AvailabilityStartTimeMode}
* @memberof LiveDashManifest
*/
public availabilityStartTimeMode?: AvailabilityStartTimeMode;
constructor(obj?: Partial<LiveDashManifest>) {
if(!obj) {
return;
}
this.manifestId = map(obj.manifestId);
this.timeshift = map(obj.timeshift);
this.liveEdgeOffset = map(obj.liveEdgeOffset);
this.suggestedPresentationDelay = map(obj.suggestedPresentationDelay);
this.minimumUpdatePeriod = map(obj.minimumUpdatePeriod);
this.availabilityStartTimeMode = map(obj.availabilityStartTimeMode);
}
}
export default LiveDashManifest;