-
Notifications
You must be signed in to change notification settings - Fork 10
/
WebVttConfiguration.ts
58 lines (50 loc) · 1.63 KB
/
WebVttConfiguration.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
import {map, mapArray} from '../common/Mapper';
import CodecConfigType from './CodecConfigType';
import SubtitleConfiguration from './SubtitleConfiguration';
import WebVttCueIdentifierPolicy from './WebVttCueIdentifierPolicy';
import WebVttStyling from './WebVttStyling';
/**
* @export
* @class WebVttConfiguration
*/
export class WebVttConfiguration extends SubtitleConfiguration {
/**
* Discriminator property for CodecConfiguration
* @type {string}
* @memberof WebVttConfiguration
*/
public readonly type: CodecConfigType = CodecConfigType.WEBVTT;
/**
* If set to true, the hours section on webvtt timestamp values will explicitely have zeroes instead of being omitted for values where hours = 0.
* @type {boolean}
* @memberof WebVttConfiguration
*/
public appendOptionalZeroHour?: boolean;
/**
* If set to true, the region information of the resulting webvtt file will be omitted. Defaults to false.
* @type {boolean}
* @memberof WebVttConfiguration
*/
public ignoreRegion?: boolean;
/**
* @type {WebVttCueIdentifierPolicy}
* @memberof WebVttConfiguration
*/
public cueIdentifierPolicy?: WebVttCueIdentifierPolicy;
/**
* @type {WebVttStyling}
* @memberof WebVttConfiguration
*/
public styling?: WebVttStyling;
constructor(obj?: Partial<WebVttConfiguration>) {
super(obj);
if(!obj) {
return;
}
this.appendOptionalZeroHour = map(obj.appendOptionalZeroHour);
this.ignoreRegion = map(obj.ignoreRegion);
this.cueIdentifierPolicy = map(obj.cueIdentifierPolicy);
this.styling = map(obj.styling, WebVttStyling);
}
}
export default WebVttConfiguration;