-
Notifications
You must be signed in to change notification settings - Fork 10
/
LiveHlsManifest.ts
66 lines (57 loc) · 1.82 KB
/
LiveHlsManifest.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
import {map, mapArray} from '../common/Mapper';
import HlsManifestAdMarkerSettings from './HlsManifestAdMarkerSettings';
import ProgramDateTimeSettings from './ProgramDateTimeSettings';
/**
* @export
* @class LiveHlsManifest
*/
export class LiveHlsManifest {
/**
* HLS manifest id (required)
* @type {string}
* @memberof LiveHlsManifest
*/
public manifestId?: string;
/**
* Timeshift in seconds. We recommend to use a timeshift value not greater than 3 hours (10800.0 seconds). Longer values could negatively impact the manifest update frequency.
* @type {number}
* @memberof LiveHlsManifest
*/
public timeshift?: number;
/**
* Live edge offset in seconds
* @type {number}
* @memberof LiveHlsManifest
*/
public liveEdgeOffset?: number;
/**
* Specifies if the EXT-X-PROGRAM-DATETIME tag will be included
* @type {boolean}
* @memberof LiveHlsManifest
*/
public insertProgramDateTime?: boolean;
/**
* Configuration for the EXT-X-PROGRAM-DATETIME tag
* @type {ProgramDateTimeSettings}
* @memberof LiveHlsManifest
*/
public programDateTimeSettings?: ProgramDateTimeSettings;
/**
* Configuration for tags related to ad markers (e.g. Scte35)
* @type {HlsManifestAdMarkerSettings}
* @memberof LiveHlsManifest
*/
public adMarkerSettings?: HlsManifestAdMarkerSettings;
constructor(obj?: Partial<LiveHlsManifest>) {
if(!obj) {
return;
}
this.manifestId = map(obj.manifestId);
this.timeshift = map(obj.timeshift);
this.liveEdgeOffset = map(obj.liveEdgeOffset);
this.insertProgramDateTime = map(obj.insertProgramDateTime);
this.programDateTimeSettings = map(obj.programDateTimeSettings, ProgramDateTimeSettings);
this.adMarkerSettings = map(obj.adMarkerSettings, HlsManifestAdMarkerSettings);
}
}
export default LiveHlsManifest;