-
Notifications
You must be signed in to change notification settings - Fork 10
/
StartLiveEncodingRequest.ts
87 lines (76 loc) · 3.45 KB
/
StartLiveEncodingRequest.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import {map, mapArray} from '../common/Mapper';
import AutoRestartConfiguration from './AutoRestartConfiguration';
import EncodingMode from './EncodingMode';
import LiveAutoShutdownConfiguration from './LiveAutoShutdownConfiguration';
import LiveDashManifest from './LiveDashManifest';
import LiveHlsManifest from './LiveHlsManifest';
import ManifestGenerator from './ManifestGenerator';
import ReuploadSettings from './ReuploadSettings';
/**
* @export
* @class StartLiveEncodingRequest
*/
export class StartLiveEncodingRequest {
/**
* Key for the stream. (a-zA-Z, 3-20 characters) (required)
* @type {string}
* @memberof StartLiveEncodingRequest
*/
public streamKey?: string;
/**
* HLS manifests to be generated during the encoding. See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {LiveHlsManifest[]}
* @memberof StartLiveEncodingRequest
*/
public hlsManifests?: LiveHlsManifest[];
/**
* DASH manifests to be generated during the encoding. See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {LiveDashManifest[]}
* @memberof StartLiveEncodingRequest
*/
public dashManifests?: LiveDashManifest[];
/**
* The pass mode of the encoding. Must only be set when `encodingMode` is not set on any codec configuration used by this encoding.
* @type {EncodingMode}
* @memberof StartLiveEncodingRequest
*/
public liveEncodingMode?: EncodingMode;
/**
* Reupload specific files during a live encoding. This can be helpful if an automatic life cycle policy is enabled on the output storage
* @type {ReuploadSettings}
* @memberof StartLiveEncodingRequest
*/
public reuploadSettings?: ReuploadSettings;
/**
* Major version of the manifest generator to be used for manifests referenced in this request (by properties dashManifests, dashManifests). `V2` is available for encoder versions 2.70.0 and above and is the recommended option. The default value depends on the sign-up date of your organization. See [documentation](https://developer.bitmovin.com/encoding/docs/manifest-generator-v2) page for a detailed explanation.
* @type {ManifestGenerator}
* @memberof StartLiveEncodingRequest
*/
public manifestGenerator?: ManifestGenerator;
/**
* Configuration for auto restarting the live encoding
* @type {AutoRestartConfiguration}
* @memberof StartLiveEncodingRequest
*/
public autoRestartConfiguration?: AutoRestartConfiguration;
/**
* Configuration for auto shutdown of the live encoding
* @type {LiveAutoShutdownConfiguration}
* @memberof StartLiveEncodingRequest
*/
public autoShutdownConfiguration?: LiveAutoShutdownConfiguration;
constructor(obj?: Partial<StartLiveEncodingRequest>) {
if(!obj) {
return;
}
this.streamKey = map(obj.streamKey);
this.hlsManifests = mapArray(obj.hlsManifests, LiveHlsManifest);
this.dashManifests = mapArray(obj.dashManifests, LiveDashManifest);
this.liveEncodingMode = map(obj.liveEncodingMode);
this.reuploadSettings = map(obj.reuploadSettings, ReuploadSettings);
this.manifestGenerator = map(obj.manifestGenerator);
this.autoRestartConfiguration = map(obj.autoRestartConfiguration, AutoRestartConfiguration);
this.autoShutdownConfiguration = map(obj.autoShutdownConfiguration, LiveAutoShutdownConfiguration);
}
}
export default StartLiveEncodingRequest;