-
Notifications
You must be signed in to change notification settings - Fork 10
/
SidecarFile.ts
62 lines (53 loc) · 1.51 KB
/
SidecarFile.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
import {map, mapArray} from '../common/Mapper';
import BitmovinResource from './BitmovinResource';
import EncodingOutput from './EncodingOutput';
import SidecarErrorMode from './SidecarErrorMode';
import SidecarFileType from './SidecarFileType';
import WebVttSidecarFile from './WebVttSidecarFile';
export type SidecarFileUnion =
WebVttSidecarFile;
/**
* A file that is added to an encoding. The size limit for a sidecar file is 10 MB
* @export
* @class SidecarFile
*/
export class SidecarFile extends BitmovinResource {
protected static readonly _discriminatorName = 'type';
protected static readonly _discriminatorMapping: { [key in keyof typeof SidecarFileType]: string; } = {
WEB_VTT: 'WebVttSidecarFile'
};
/**
* Id of input (required)
* @type {string}
* @memberof SidecarFile
*/
public inputId?: string;
/**
* Path to sidecar file (required)
* @type {string}
* @memberof SidecarFile
*/
public inputPath?: string;
/**
* @type {EncodingOutput[]}
* @memberof SidecarFile
*/
public outputs?: EncodingOutput[];
/**
* This defines how errors should be handled
* @type {SidecarErrorMode}
* @memberof SidecarFile
*/
public errorMode?: SidecarErrorMode;
constructor(obj?: Partial<SidecarFile>) {
super(obj);
if(!obj) {
return;
}
this.inputId = map(obj.inputId);
this.inputPath = map(obj.inputPath);
this.outputs = mapArray(obj.outputs, EncodingOutput);
this.errorMode = map(obj.errorMode);
}
}
export default SidecarFile;