-
Notifications
You must be signed in to change notification settings - Fork 10
/
StreamsVideoResponse.ts
109 lines (95 loc) · 2.94 KB
/
StreamsVideoResponse.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import {map, mapArray} from '../common/Mapper';
import StreamsAdConfigResponse from './StreamsAdConfigResponse';
import StreamsDomainRestrictionResponse from './StreamsDomainRestrictionResponse';
import StreamsResponse from './StreamsResponse';
import StreamsStyleConfigResponse from './StreamsStyleConfigResponse';
import StreamsTrimmingStatus from './StreamsTrimmingStatus';
import StreamsType from './StreamsType';
import StreamsVideoEncodingTask from './StreamsVideoEncodingTask';
import StreamsVideoStatus from './StreamsVideoStatus';
/**
* @export
* @class StreamsVideoResponse
*/
export class StreamsVideoResponse extends StreamsResponse {
/**
* Discriminator property for StreamsResponse
* @type {string}
* @memberof StreamsVideoResponse
*/
public readonly type: StreamsType = StreamsType.VIDEO;
/**
* The asset URL of the stream
* @type {string}
* @memberof StreamsVideoResponse
*/
public assetUrl?: string;
/**
* The status of the stream
* @type {StreamsVideoStatus}
* @memberof StreamsVideoResponse
*/
public status?: StreamsVideoStatus;
/**
* @type {StreamsStyleConfigResponse}
* @memberof StreamsVideoResponse
*/
public styleConfig?: StreamsStyleConfigResponse;
/**
* List of encoding status information
* @type {StreamsVideoEncodingTask[]}
* @memberof StreamsVideoResponse
*/
public encodingTasks?: StreamsVideoEncodingTask[];
/**
* Poster URL
* @type {string}
* @memberof StreamsVideoResponse
*/
public posterUrl?: string;
/**
* @type {StreamsAdConfigResponse}
* @memberof StreamsVideoResponse
*/
public adConfig?: StreamsAdConfigResponse;
/**
* @type {StreamsDomainRestrictionResponse}
* @memberof StreamsVideoResponse
*/
public domainRestriction?: StreamsDomainRestrictionResponse;
/**
* Stream trimming information
* @type {StreamsTrimmingStatus}
* @memberof StreamsVideoResponse
*/
public trimming?: StreamsTrimmingStatus;
/**
* Single-file download URL of the unaltered video in the best available quality
* @type {string}
* @memberof StreamsVideoResponse
*/
public downloadUrl?: string;
/**
* True if the stream is signature protected
* @type {boolean}
* @memberof StreamsVideoResponse
*/
public signed?: boolean;
constructor(obj?: Partial<StreamsVideoResponse>) {
super(obj);
if(!obj) {
return;
}
this.assetUrl = map(obj.assetUrl);
this.status = map(obj.status);
this.styleConfig = map(obj.styleConfig, StreamsStyleConfigResponse);
this.encodingTasks = mapArray(obj.encodingTasks, StreamsVideoEncodingTask);
this.posterUrl = map(obj.posterUrl);
this.adConfig = map(obj.adConfig, StreamsAdConfigResponse);
this.domainRestriction = map(obj.domainRestriction, StreamsDomainRestrictionResponse);
this.trimming = map(obj.trimming);
this.downloadUrl = map(obj.downloadUrl);
this.signed = map(obj.signed);
}
}
export default StreamsVideoResponse;