livekit-server-sdk 0.5.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- package/.github/workflows/test.yaml +3 -0
- package/.prettierignore +7 -0
- package/README.md +13 -9
- package/dist/AccessToken.d.ts +5 -0
- package/dist/AccessToken.js +7 -1
- package/dist/AccessToken.js.map +1 -1
- package/dist/AccessToken.test.js +4 -0
- package/dist/AccessToken.test.js.map +1 -1
- package/dist/EgressClient.d.ts +60 -0
- package/dist/EgressClient.js +198 -0
- package/dist/EgressClient.js.map +1 -0
- package/dist/RecordingServiceClient.js +5 -1
- package/dist/RecordingServiceClient.js.map +1 -1
- package/dist/RoomServiceClient.d.ts +1 -2
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/TwirpRPC.js.map +1 -1
- package/dist/WebhookReceiver.test.js.map +1 -1
- package/dist/grants.d.ts +4 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts +6 -2
- package/dist/proto/google/protobuf/empty.js +32 -12
- package/dist/proto/google/protobuf/empty.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +132 -0
- package/dist/proto/google/protobuf/timestamp.js +107 -0
- package/dist/proto/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto/livekit_egress.d.ts +2283 -0
- package/dist/proto/livekit_egress.js +1819 -0
- package/dist/proto/livekit_egress.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +675 -13
- package/dist/proto/livekit_models.js +1414 -838
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_recording.d.ts +199 -17
- package/dist/proto/livekit_recording.js +284 -570
- package/dist/proto/livekit_recording.js.map +1 -1
- package/dist/proto/livekit_room.d.ts +566 -34
- package/dist/proto/livekit_room.js +302 -671
- package/dist/proto/livekit_room.js.map +1 -1
- package/dist/proto/livekit_webhook.d.ts +1031 -6
- package/dist/proto/livekit_webhook.js +106 -95
- package/dist/proto/livekit_webhook.js.map +1 -1
- package/package.json +12 -7
|
@@ -0,0 +1,1819 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.FileInfo = exports.StreamInfo = exports.StreamInfoList = exports.EgressInfo = exports.StopEgressRequest = exports.ListEgressResponse = exports.ListEgressRequest = exports.UpdateStreamRequest = exports.UpdateLayoutRequest = exports.EncodingOptions = exports.StreamOutput = exports.AzureBlobUpload = exports.GCPUpload = exports.S3Upload = exports.DirectFileOutput = exports.EncodedFileOutput = exports.TrackEgressRequest = exports.TrackCompositeEgressRequest = exports.RoomCompositeEgressRequest = exports.egressStatusToJSON = exports.egressStatusFromJSON = exports.EgressStatus = exports.encodingOptionsPresetToJSON = exports.encodingOptionsPresetFromJSON = exports.EncodingOptionsPreset = exports.videoCodecToJSON = exports.videoCodecFromJSON = exports.VideoCodec = exports.audioCodecToJSON = exports.audioCodecFromJSON = exports.AudioCodec = exports.streamProtocolToJSON = exports.streamProtocolFromJSON = exports.StreamProtocol = exports.encodedFileTypeToJSON = exports.encodedFileTypeFromJSON = exports.EncodedFileType = exports.protobufPackage = void 0;
|
|
26
|
+
/* eslint-disable */
|
|
27
|
+
const long_1 = __importDefault(require("long"));
|
|
28
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
29
|
+
exports.protobufPackage = 'livekit';
|
|
30
|
+
var EncodedFileType;
|
|
31
|
+
(function (EncodedFileType) {
|
|
32
|
+
/** DEFAULT_FILETYPE - file type chosen based on codecs */
|
|
33
|
+
EncodedFileType[EncodedFileType["DEFAULT_FILETYPE"] = 0] = "DEFAULT_FILETYPE";
|
|
34
|
+
EncodedFileType[EncodedFileType["MP4"] = 1] = "MP4";
|
|
35
|
+
EncodedFileType[EncodedFileType["OGG"] = 2] = "OGG";
|
|
36
|
+
EncodedFileType[EncodedFileType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
|
+
})(EncodedFileType = exports.EncodedFileType || (exports.EncodedFileType = {}));
|
|
38
|
+
function encodedFileTypeFromJSON(object) {
|
|
39
|
+
switch (object) {
|
|
40
|
+
case 0:
|
|
41
|
+
case 'DEFAULT_FILETYPE':
|
|
42
|
+
return EncodedFileType.DEFAULT_FILETYPE;
|
|
43
|
+
case 1:
|
|
44
|
+
case 'MP4':
|
|
45
|
+
return EncodedFileType.MP4;
|
|
46
|
+
case 2:
|
|
47
|
+
case 'OGG':
|
|
48
|
+
return EncodedFileType.OGG;
|
|
49
|
+
case -1:
|
|
50
|
+
case 'UNRECOGNIZED':
|
|
51
|
+
default:
|
|
52
|
+
return EncodedFileType.UNRECOGNIZED;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.encodedFileTypeFromJSON = encodedFileTypeFromJSON;
|
|
56
|
+
function encodedFileTypeToJSON(object) {
|
|
57
|
+
switch (object) {
|
|
58
|
+
case EncodedFileType.DEFAULT_FILETYPE:
|
|
59
|
+
return 'DEFAULT_FILETYPE';
|
|
60
|
+
case EncodedFileType.MP4:
|
|
61
|
+
return 'MP4';
|
|
62
|
+
case EncodedFileType.OGG:
|
|
63
|
+
return 'OGG';
|
|
64
|
+
default:
|
|
65
|
+
return 'UNKNOWN';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.encodedFileTypeToJSON = encodedFileTypeToJSON;
|
|
69
|
+
var StreamProtocol;
|
|
70
|
+
(function (StreamProtocol) {
|
|
71
|
+
/** DEFAULT_PROTOCOL - protocol chosen based on urls */
|
|
72
|
+
StreamProtocol[StreamProtocol["DEFAULT_PROTOCOL"] = 0] = "DEFAULT_PROTOCOL";
|
|
73
|
+
StreamProtocol[StreamProtocol["RTMP"] = 1] = "RTMP";
|
|
74
|
+
StreamProtocol[StreamProtocol["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
75
|
+
})(StreamProtocol = exports.StreamProtocol || (exports.StreamProtocol = {}));
|
|
76
|
+
function streamProtocolFromJSON(object) {
|
|
77
|
+
switch (object) {
|
|
78
|
+
case 0:
|
|
79
|
+
case 'DEFAULT_PROTOCOL':
|
|
80
|
+
return StreamProtocol.DEFAULT_PROTOCOL;
|
|
81
|
+
case 1:
|
|
82
|
+
case 'RTMP':
|
|
83
|
+
return StreamProtocol.RTMP;
|
|
84
|
+
case -1:
|
|
85
|
+
case 'UNRECOGNIZED':
|
|
86
|
+
default:
|
|
87
|
+
return StreamProtocol.UNRECOGNIZED;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.streamProtocolFromJSON = streamProtocolFromJSON;
|
|
91
|
+
function streamProtocolToJSON(object) {
|
|
92
|
+
switch (object) {
|
|
93
|
+
case StreamProtocol.DEFAULT_PROTOCOL:
|
|
94
|
+
return 'DEFAULT_PROTOCOL';
|
|
95
|
+
case StreamProtocol.RTMP:
|
|
96
|
+
return 'RTMP';
|
|
97
|
+
default:
|
|
98
|
+
return 'UNKNOWN';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.streamProtocolToJSON = streamProtocolToJSON;
|
|
102
|
+
var AudioCodec;
|
|
103
|
+
(function (AudioCodec) {
|
|
104
|
+
AudioCodec[AudioCodec["DEFAULT_AC"] = 0] = "DEFAULT_AC";
|
|
105
|
+
AudioCodec[AudioCodec["OPUS"] = 1] = "OPUS";
|
|
106
|
+
AudioCodec[AudioCodec["AAC"] = 2] = "AAC";
|
|
107
|
+
AudioCodec[AudioCodec["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
108
|
+
})(AudioCodec = exports.AudioCodec || (exports.AudioCodec = {}));
|
|
109
|
+
function audioCodecFromJSON(object) {
|
|
110
|
+
switch (object) {
|
|
111
|
+
case 0:
|
|
112
|
+
case 'DEFAULT_AC':
|
|
113
|
+
return AudioCodec.DEFAULT_AC;
|
|
114
|
+
case 1:
|
|
115
|
+
case 'OPUS':
|
|
116
|
+
return AudioCodec.OPUS;
|
|
117
|
+
case 2:
|
|
118
|
+
case 'AAC':
|
|
119
|
+
return AudioCodec.AAC;
|
|
120
|
+
case -1:
|
|
121
|
+
case 'UNRECOGNIZED':
|
|
122
|
+
default:
|
|
123
|
+
return AudioCodec.UNRECOGNIZED;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.audioCodecFromJSON = audioCodecFromJSON;
|
|
127
|
+
function audioCodecToJSON(object) {
|
|
128
|
+
switch (object) {
|
|
129
|
+
case AudioCodec.DEFAULT_AC:
|
|
130
|
+
return 'DEFAULT_AC';
|
|
131
|
+
case AudioCodec.OPUS:
|
|
132
|
+
return 'OPUS';
|
|
133
|
+
case AudioCodec.AAC:
|
|
134
|
+
return 'AAC';
|
|
135
|
+
default:
|
|
136
|
+
return 'UNKNOWN';
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.audioCodecToJSON = audioCodecToJSON;
|
|
140
|
+
var VideoCodec;
|
|
141
|
+
(function (VideoCodec) {
|
|
142
|
+
VideoCodec[VideoCodec["DEFAULT_VC"] = 0] = "DEFAULT_VC";
|
|
143
|
+
VideoCodec[VideoCodec["H264_BASELINE"] = 1] = "H264_BASELINE";
|
|
144
|
+
VideoCodec[VideoCodec["H264_MAIN"] = 2] = "H264_MAIN";
|
|
145
|
+
VideoCodec[VideoCodec["H264_HIGH"] = 3] = "H264_HIGH";
|
|
146
|
+
VideoCodec[VideoCodec["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
147
|
+
})(VideoCodec = exports.VideoCodec || (exports.VideoCodec = {}));
|
|
148
|
+
function videoCodecFromJSON(object) {
|
|
149
|
+
switch (object) {
|
|
150
|
+
case 0:
|
|
151
|
+
case 'DEFAULT_VC':
|
|
152
|
+
return VideoCodec.DEFAULT_VC;
|
|
153
|
+
case 1:
|
|
154
|
+
case 'H264_BASELINE':
|
|
155
|
+
return VideoCodec.H264_BASELINE;
|
|
156
|
+
case 2:
|
|
157
|
+
case 'H264_MAIN':
|
|
158
|
+
return VideoCodec.H264_MAIN;
|
|
159
|
+
case 3:
|
|
160
|
+
case 'H264_HIGH':
|
|
161
|
+
return VideoCodec.H264_HIGH;
|
|
162
|
+
case -1:
|
|
163
|
+
case 'UNRECOGNIZED':
|
|
164
|
+
default:
|
|
165
|
+
return VideoCodec.UNRECOGNIZED;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.videoCodecFromJSON = videoCodecFromJSON;
|
|
169
|
+
function videoCodecToJSON(object) {
|
|
170
|
+
switch (object) {
|
|
171
|
+
case VideoCodec.DEFAULT_VC:
|
|
172
|
+
return 'DEFAULT_VC';
|
|
173
|
+
case VideoCodec.H264_BASELINE:
|
|
174
|
+
return 'H264_BASELINE';
|
|
175
|
+
case VideoCodec.H264_MAIN:
|
|
176
|
+
return 'H264_MAIN';
|
|
177
|
+
case VideoCodec.H264_HIGH:
|
|
178
|
+
return 'H264_HIGH';
|
|
179
|
+
default:
|
|
180
|
+
return 'UNKNOWN';
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
exports.videoCodecToJSON = videoCodecToJSON;
|
|
184
|
+
var EncodingOptionsPreset;
|
|
185
|
+
(function (EncodingOptionsPreset) {
|
|
186
|
+
/** H264_720P_30 - 720p, 30fps, 3000kpbs, H.264_MAIN / OPUS */
|
|
187
|
+
EncodingOptionsPreset[EncodingOptionsPreset["H264_720P_30"] = 0] = "H264_720P_30";
|
|
188
|
+
/** H264_720P_60 - 720p, 60fps, 4500kbps, H.264_MAIN / OPUS */
|
|
189
|
+
EncodingOptionsPreset[EncodingOptionsPreset["H264_720P_60"] = 1] = "H264_720P_60";
|
|
190
|
+
/** H264_1080P_30 - 1080p, 30fps, 4500kbps, H.264_MAIN / OPUS */
|
|
191
|
+
EncodingOptionsPreset[EncodingOptionsPreset["H264_1080P_30"] = 2] = "H264_1080P_30";
|
|
192
|
+
/** H264_1080P_60 - 1080p, 60fps, 6000kbps, H.264_MAIN / OPUS */
|
|
193
|
+
EncodingOptionsPreset[EncodingOptionsPreset["H264_1080P_60"] = 3] = "H264_1080P_60";
|
|
194
|
+
EncodingOptionsPreset[EncodingOptionsPreset["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
195
|
+
})(EncodingOptionsPreset = exports.EncodingOptionsPreset || (exports.EncodingOptionsPreset = {}));
|
|
196
|
+
function encodingOptionsPresetFromJSON(object) {
|
|
197
|
+
switch (object) {
|
|
198
|
+
case 0:
|
|
199
|
+
case 'H264_720P_30':
|
|
200
|
+
return EncodingOptionsPreset.H264_720P_30;
|
|
201
|
+
case 1:
|
|
202
|
+
case 'H264_720P_60':
|
|
203
|
+
return EncodingOptionsPreset.H264_720P_60;
|
|
204
|
+
case 2:
|
|
205
|
+
case 'H264_1080P_30':
|
|
206
|
+
return EncodingOptionsPreset.H264_1080P_30;
|
|
207
|
+
case 3:
|
|
208
|
+
case 'H264_1080P_60':
|
|
209
|
+
return EncodingOptionsPreset.H264_1080P_60;
|
|
210
|
+
case -1:
|
|
211
|
+
case 'UNRECOGNIZED':
|
|
212
|
+
default:
|
|
213
|
+
return EncodingOptionsPreset.UNRECOGNIZED;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.encodingOptionsPresetFromJSON = encodingOptionsPresetFromJSON;
|
|
217
|
+
function encodingOptionsPresetToJSON(object) {
|
|
218
|
+
switch (object) {
|
|
219
|
+
case EncodingOptionsPreset.H264_720P_30:
|
|
220
|
+
return 'H264_720P_30';
|
|
221
|
+
case EncodingOptionsPreset.H264_720P_60:
|
|
222
|
+
return 'H264_720P_60';
|
|
223
|
+
case EncodingOptionsPreset.H264_1080P_30:
|
|
224
|
+
return 'H264_1080P_30';
|
|
225
|
+
case EncodingOptionsPreset.H264_1080P_60:
|
|
226
|
+
return 'H264_1080P_60';
|
|
227
|
+
default:
|
|
228
|
+
return 'UNKNOWN';
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.encodingOptionsPresetToJSON = encodingOptionsPresetToJSON;
|
|
232
|
+
var EgressStatus;
|
|
233
|
+
(function (EgressStatus) {
|
|
234
|
+
EgressStatus[EgressStatus["EGRESS_STARTING"] = 0] = "EGRESS_STARTING";
|
|
235
|
+
EgressStatus[EgressStatus["EGRESS_ACTIVE"] = 1] = "EGRESS_ACTIVE";
|
|
236
|
+
EgressStatus[EgressStatus["EGRESS_ENDING"] = 2] = "EGRESS_ENDING";
|
|
237
|
+
EgressStatus[EgressStatus["EGRESS_COMPLETE"] = 3] = "EGRESS_COMPLETE";
|
|
238
|
+
EgressStatus[EgressStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
239
|
+
})(EgressStatus = exports.EgressStatus || (exports.EgressStatus = {}));
|
|
240
|
+
function egressStatusFromJSON(object) {
|
|
241
|
+
switch (object) {
|
|
242
|
+
case 0:
|
|
243
|
+
case 'EGRESS_STARTING':
|
|
244
|
+
return EgressStatus.EGRESS_STARTING;
|
|
245
|
+
case 1:
|
|
246
|
+
case 'EGRESS_ACTIVE':
|
|
247
|
+
return EgressStatus.EGRESS_ACTIVE;
|
|
248
|
+
case 2:
|
|
249
|
+
case 'EGRESS_ENDING':
|
|
250
|
+
return EgressStatus.EGRESS_ENDING;
|
|
251
|
+
case 3:
|
|
252
|
+
case 'EGRESS_COMPLETE':
|
|
253
|
+
return EgressStatus.EGRESS_COMPLETE;
|
|
254
|
+
case -1:
|
|
255
|
+
case 'UNRECOGNIZED':
|
|
256
|
+
default:
|
|
257
|
+
return EgressStatus.UNRECOGNIZED;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
exports.egressStatusFromJSON = egressStatusFromJSON;
|
|
261
|
+
function egressStatusToJSON(object) {
|
|
262
|
+
switch (object) {
|
|
263
|
+
case EgressStatus.EGRESS_STARTING:
|
|
264
|
+
return 'EGRESS_STARTING';
|
|
265
|
+
case EgressStatus.EGRESS_ACTIVE:
|
|
266
|
+
return 'EGRESS_ACTIVE';
|
|
267
|
+
case EgressStatus.EGRESS_ENDING:
|
|
268
|
+
return 'EGRESS_ENDING';
|
|
269
|
+
case EgressStatus.EGRESS_COMPLETE:
|
|
270
|
+
return 'EGRESS_COMPLETE';
|
|
271
|
+
default:
|
|
272
|
+
return 'UNKNOWN';
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
exports.egressStatusToJSON = egressStatusToJSON;
|
|
276
|
+
function createBaseRoomCompositeEgressRequest() {
|
|
277
|
+
return {
|
|
278
|
+
roomName: '',
|
|
279
|
+
layout: '',
|
|
280
|
+
audioOnly: false,
|
|
281
|
+
videoOnly: false,
|
|
282
|
+
customBaseUrl: '',
|
|
283
|
+
file: undefined,
|
|
284
|
+
stream: undefined,
|
|
285
|
+
preset: undefined,
|
|
286
|
+
advanced: undefined,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
exports.RoomCompositeEgressRequest = {
|
|
290
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
291
|
+
if (message.roomName !== '') {
|
|
292
|
+
writer.uint32(10).string(message.roomName);
|
|
293
|
+
}
|
|
294
|
+
if (message.layout !== '') {
|
|
295
|
+
writer.uint32(18).string(message.layout);
|
|
296
|
+
}
|
|
297
|
+
if (message.audioOnly === true) {
|
|
298
|
+
writer.uint32(24).bool(message.audioOnly);
|
|
299
|
+
}
|
|
300
|
+
if (message.videoOnly === true) {
|
|
301
|
+
writer.uint32(32).bool(message.videoOnly);
|
|
302
|
+
}
|
|
303
|
+
if (message.customBaseUrl !== '') {
|
|
304
|
+
writer.uint32(42).string(message.customBaseUrl);
|
|
305
|
+
}
|
|
306
|
+
if (message.file !== undefined) {
|
|
307
|
+
exports.EncodedFileOutput.encode(message.file, writer.uint32(50).fork()).ldelim();
|
|
308
|
+
}
|
|
309
|
+
if (message.stream !== undefined) {
|
|
310
|
+
exports.StreamOutput.encode(message.stream, writer.uint32(58).fork()).ldelim();
|
|
311
|
+
}
|
|
312
|
+
if (message.preset !== undefined) {
|
|
313
|
+
writer.uint32(64).int32(message.preset);
|
|
314
|
+
}
|
|
315
|
+
if (message.advanced !== undefined) {
|
|
316
|
+
exports.EncodingOptions.encode(message.advanced, writer.uint32(74).fork()).ldelim();
|
|
317
|
+
}
|
|
318
|
+
return writer;
|
|
319
|
+
},
|
|
320
|
+
decode(input, length) {
|
|
321
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
322
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
323
|
+
const message = createBaseRoomCompositeEgressRequest();
|
|
324
|
+
while (reader.pos < end) {
|
|
325
|
+
const tag = reader.uint32();
|
|
326
|
+
switch (tag >>> 3) {
|
|
327
|
+
case 1:
|
|
328
|
+
message.roomName = reader.string();
|
|
329
|
+
break;
|
|
330
|
+
case 2:
|
|
331
|
+
message.layout = reader.string();
|
|
332
|
+
break;
|
|
333
|
+
case 3:
|
|
334
|
+
message.audioOnly = reader.bool();
|
|
335
|
+
break;
|
|
336
|
+
case 4:
|
|
337
|
+
message.videoOnly = reader.bool();
|
|
338
|
+
break;
|
|
339
|
+
case 5:
|
|
340
|
+
message.customBaseUrl = reader.string();
|
|
341
|
+
break;
|
|
342
|
+
case 6:
|
|
343
|
+
message.file = exports.EncodedFileOutput.decode(reader, reader.uint32());
|
|
344
|
+
break;
|
|
345
|
+
case 7:
|
|
346
|
+
message.stream = exports.StreamOutput.decode(reader, reader.uint32());
|
|
347
|
+
break;
|
|
348
|
+
case 8:
|
|
349
|
+
message.preset = reader.int32();
|
|
350
|
+
break;
|
|
351
|
+
case 9:
|
|
352
|
+
message.advanced = exports.EncodingOptions.decode(reader, reader.uint32());
|
|
353
|
+
break;
|
|
354
|
+
default:
|
|
355
|
+
reader.skipType(tag & 7);
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return message;
|
|
360
|
+
},
|
|
361
|
+
fromJSON(object) {
|
|
362
|
+
return {
|
|
363
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
364
|
+
layout: isSet(object.layout) ? String(object.layout) : '',
|
|
365
|
+
audioOnly: isSet(object.audioOnly) ? Boolean(object.audioOnly) : false,
|
|
366
|
+
videoOnly: isSet(object.videoOnly) ? Boolean(object.videoOnly) : false,
|
|
367
|
+
customBaseUrl: isSet(object.customBaseUrl) ? String(object.customBaseUrl) : '',
|
|
368
|
+
file: isSet(object.file) ? exports.EncodedFileOutput.fromJSON(object.file) : undefined,
|
|
369
|
+
stream: isSet(object.stream) ? exports.StreamOutput.fromJSON(object.stream) : undefined,
|
|
370
|
+
preset: isSet(object.preset) ? encodingOptionsPresetFromJSON(object.preset) : undefined,
|
|
371
|
+
advanced: isSet(object.advanced) ? exports.EncodingOptions.fromJSON(object.advanced) : undefined,
|
|
372
|
+
};
|
|
373
|
+
},
|
|
374
|
+
toJSON(message) {
|
|
375
|
+
const obj = {};
|
|
376
|
+
message.roomName !== undefined && (obj.roomName = message.roomName);
|
|
377
|
+
message.layout !== undefined && (obj.layout = message.layout);
|
|
378
|
+
message.audioOnly !== undefined && (obj.audioOnly = message.audioOnly);
|
|
379
|
+
message.videoOnly !== undefined && (obj.videoOnly = message.videoOnly);
|
|
380
|
+
message.customBaseUrl !== undefined && (obj.customBaseUrl = message.customBaseUrl);
|
|
381
|
+
message.file !== undefined &&
|
|
382
|
+
(obj.file = message.file ? exports.EncodedFileOutput.toJSON(message.file) : undefined);
|
|
383
|
+
message.stream !== undefined &&
|
|
384
|
+
(obj.stream = message.stream ? exports.StreamOutput.toJSON(message.stream) : undefined);
|
|
385
|
+
message.preset !== undefined &&
|
|
386
|
+
(obj.preset =
|
|
387
|
+
message.preset !== undefined ? encodingOptionsPresetToJSON(message.preset) : undefined);
|
|
388
|
+
message.advanced !== undefined &&
|
|
389
|
+
(obj.advanced = message.advanced ? exports.EncodingOptions.toJSON(message.advanced) : undefined);
|
|
390
|
+
return obj;
|
|
391
|
+
},
|
|
392
|
+
fromPartial(object) {
|
|
393
|
+
var _a, _b, _c, _d, _e, _f;
|
|
394
|
+
const message = createBaseRoomCompositeEgressRequest();
|
|
395
|
+
message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
|
|
396
|
+
message.layout = (_b = object.layout) !== null && _b !== void 0 ? _b : '';
|
|
397
|
+
message.audioOnly = (_c = object.audioOnly) !== null && _c !== void 0 ? _c : false;
|
|
398
|
+
message.videoOnly = (_d = object.videoOnly) !== null && _d !== void 0 ? _d : false;
|
|
399
|
+
message.customBaseUrl = (_e = object.customBaseUrl) !== null && _e !== void 0 ? _e : '';
|
|
400
|
+
message.file =
|
|
401
|
+
object.file !== undefined && object.file !== null
|
|
402
|
+
? exports.EncodedFileOutput.fromPartial(object.file)
|
|
403
|
+
: undefined;
|
|
404
|
+
message.stream =
|
|
405
|
+
object.stream !== undefined && object.stream !== null
|
|
406
|
+
? exports.StreamOutput.fromPartial(object.stream)
|
|
407
|
+
: undefined;
|
|
408
|
+
message.preset = (_f = object.preset) !== null && _f !== void 0 ? _f : undefined;
|
|
409
|
+
message.advanced =
|
|
410
|
+
object.advanced !== undefined && object.advanced !== null
|
|
411
|
+
? exports.EncodingOptions.fromPartial(object.advanced)
|
|
412
|
+
: undefined;
|
|
413
|
+
return message;
|
|
414
|
+
},
|
|
415
|
+
};
|
|
416
|
+
function createBaseTrackCompositeEgressRequest() {
|
|
417
|
+
return {
|
|
418
|
+
roomName: '',
|
|
419
|
+
audioTrackId: '',
|
|
420
|
+
videoTrackId: '',
|
|
421
|
+
file: undefined,
|
|
422
|
+
stream: undefined,
|
|
423
|
+
preset: undefined,
|
|
424
|
+
advanced: undefined,
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
exports.TrackCompositeEgressRequest = {
|
|
428
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
429
|
+
if (message.roomName !== '') {
|
|
430
|
+
writer.uint32(10).string(message.roomName);
|
|
431
|
+
}
|
|
432
|
+
if (message.audioTrackId !== '') {
|
|
433
|
+
writer.uint32(18).string(message.audioTrackId);
|
|
434
|
+
}
|
|
435
|
+
if (message.videoTrackId !== '') {
|
|
436
|
+
writer.uint32(26).string(message.videoTrackId);
|
|
437
|
+
}
|
|
438
|
+
if (message.file !== undefined) {
|
|
439
|
+
exports.EncodedFileOutput.encode(message.file, writer.uint32(34).fork()).ldelim();
|
|
440
|
+
}
|
|
441
|
+
if (message.stream !== undefined) {
|
|
442
|
+
exports.StreamOutput.encode(message.stream, writer.uint32(42).fork()).ldelim();
|
|
443
|
+
}
|
|
444
|
+
if (message.preset !== undefined) {
|
|
445
|
+
writer.uint32(48).int32(message.preset);
|
|
446
|
+
}
|
|
447
|
+
if (message.advanced !== undefined) {
|
|
448
|
+
exports.EncodingOptions.encode(message.advanced, writer.uint32(58).fork()).ldelim();
|
|
449
|
+
}
|
|
450
|
+
return writer;
|
|
451
|
+
},
|
|
452
|
+
decode(input, length) {
|
|
453
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
454
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
455
|
+
const message = createBaseTrackCompositeEgressRequest();
|
|
456
|
+
while (reader.pos < end) {
|
|
457
|
+
const tag = reader.uint32();
|
|
458
|
+
switch (tag >>> 3) {
|
|
459
|
+
case 1:
|
|
460
|
+
message.roomName = reader.string();
|
|
461
|
+
break;
|
|
462
|
+
case 2:
|
|
463
|
+
message.audioTrackId = reader.string();
|
|
464
|
+
break;
|
|
465
|
+
case 3:
|
|
466
|
+
message.videoTrackId = reader.string();
|
|
467
|
+
break;
|
|
468
|
+
case 4:
|
|
469
|
+
message.file = exports.EncodedFileOutput.decode(reader, reader.uint32());
|
|
470
|
+
break;
|
|
471
|
+
case 5:
|
|
472
|
+
message.stream = exports.StreamOutput.decode(reader, reader.uint32());
|
|
473
|
+
break;
|
|
474
|
+
case 6:
|
|
475
|
+
message.preset = reader.int32();
|
|
476
|
+
break;
|
|
477
|
+
case 7:
|
|
478
|
+
message.advanced = exports.EncodingOptions.decode(reader, reader.uint32());
|
|
479
|
+
break;
|
|
480
|
+
default:
|
|
481
|
+
reader.skipType(tag & 7);
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return message;
|
|
486
|
+
},
|
|
487
|
+
fromJSON(object) {
|
|
488
|
+
return {
|
|
489
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
490
|
+
audioTrackId: isSet(object.audioTrackId) ? String(object.audioTrackId) : '',
|
|
491
|
+
videoTrackId: isSet(object.videoTrackId) ? String(object.videoTrackId) : '',
|
|
492
|
+
file: isSet(object.file) ? exports.EncodedFileOutput.fromJSON(object.file) : undefined,
|
|
493
|
+
stream: isSet(object.stream) ? exports.StreamOutput.fromJSON(object.stream) : undefined,
|
|
494
|
+
preset: isSet(object.preset) ? encodingOptionsPresetFromJSON(object.preset) : undefined,
|
|
495
|
+
advanced: isSet(object.advanced) ? exports.EncodingOptions.fromJSON(object.advanced) : undefined,
|
|
496
|
+
};
|
|
497
|
+
},
|
|
498
|
+
toJSON(message) {
|
|
499
|
+
const obj = {};
|
|
500
|
+
message.roomName !== undefined && (obj.roomName = message.roomName);
|
|
501
|
+
message.audioTrackId !== undefined && (obj.audioTrackId = message.audioTrackId);
|
|
502
|
+
message.videoTrackId !== undefined && (obj.videoTrackId = message.videoTrackId);
|
|
503
|
+
message.file !== undefined &&
|
|
504
|
+
(obj.file = message.file ? exports.EncodedFileOutput.toJSON(message.file) : undefined);
|
|
505
|
+
message.stream !== undefined &&
|
|
506
|
+
(obj.stream = message.stream ? exports.StreamOutput.toJSON(message.stream) : undefined);
|
|
507
|
+
message.preset !== undefined &&
|
|
508
|
+
(obj.preset =
|
|
509
|
+
message.preset !== undefined ? encodingOptionsPresetToJSON(message.preset) : undefined);
|
|
510
|
+
message.advanced !== undefined &&
|
|
511
|
+
(obj.advanced = message.advanced ? exports.EncodingOptions.toJSON(message.advanced) : undefined);
|
|
512
|
+
return obj;
|
|
513
|
+
},
|
|
514
|
+
fromPartial(object) {
|
|
515
|
+
var _a, _b, _c, _d;
|
|
516
|
+
const message = createBaseTrackCompositeEgressRequest();
|
|
517
|
+
message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
|
|
518
|
+
message.audioTrackId = (_b = object.audioTrackId) !== null && _b !== void 0 ? _b : '';
|
|
519
|
+
message.videoTrackId = (_c = object.videoTrackId) !== null && _c !== void 0 ? _c : '';
|
|
520
|
+
message.file =
|
|
521
|
+
object.file !== undefined && object.file !== null
|
|
522
|
+
? exports.EncodedFileOutput.fromPartial(object.file)
|
|
523
|
+
: undefined;
|
|
524
|
+
message.stream =
|
|
525
|
+
object.stream !== undefined && object.stream !== null
|
|
526
|
+
? exports.StreamOutput.fromPartial(object.stream)
|
|
527
|
+
: undefined;
|
|
528
|
+
message.preset = (_d = object.preset) !== null && _d !== void 0 ? _d : undefined;
|
|
529
|
+
message.advanced =
|
|
530
|
+
object.advanced !== undefined && object.advanced !== null
|
|
531
|
+
? exports.EncodingOptions.fromPartial(object.advanced)
|
|
532
|
+
: undefined;
|
|
533
|
+
return message;
|
|
534
|
+
},
|
|
535
|
+
};
|
|
536
|
+
function createBaseTrackEgressRequest() {
|
|
537
|
+
return { roomName: '', trackId: '', file: undefined, websocketUrl: undefined };
|
|
538
|
+
}
|
|
539
|
+
exports.TrackEgressRequest = {
|
|
540
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
541
|
+
if (message.roomName !== '') {
|
|
542
|
+
writer.uint32(10).string(message.roomName);
|
|
543
|
+
}
|
|
544
|
+
if (message.trackId !== '') {
|
|
545
|
+
writer.uint32(18).string(message.trackId);
|
|
546
|
+
}
|
|
547
|
+
if (message.file !== undefined) {
|
|
548
|
+
exports.DirectFileOutput.encode(message.file, writer.uint32(26).fork()).ldelim();
|
|
549
|
+
}
|
|
550
|
+
if (message.websocketUrl !== undefined) {
|
|
551
|
+
writer.uint32(34).string(message.websocketUrl);
|
|
552
|
+
}
|
|
553
|
+
return writer;
|
|
554
|
+
},
|
|
555
|
+
decode(input, length) {
|
|
556
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
557
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
558
|
+
const message = createBaseTrackEgressRequest();
|
|
559
|
+
while (reader.pos < end) {
|
|
560
|
+
const tag = reader.uint32();
|
|
561
|
+
switch (tag >>> 3) {
|
|
562
|
+
case 1:
|
|
563
|
+
message.roomName = reader.string();
|
|
564
|
+
break;
|
|
565
|
+
case 2:
|
|
566
|
+
message.trackId = reader.string();
|
|
567
|
+
break;
|
|
568
|
+
case 3:
|
|
569
|
+
message.file = exports.DirectFileOutput.decode(reader, reader.uint32());
|
|
570
|
+
break;
|
|
571
|
+
case 4:
|
|
572
|
+
message.websocketUrl = reader.string();
|
|
573
|
+
break;
|
|
574
|
+
default:
|
|
575
|
+
reader.skipType(tag & 7);
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
return message;
|
|
580
|
+
},
|
|
581
|
+
fromJSON(object) {
|
|
582
|
+
return {
|
|
583
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
584
|
+
trackId: isSet(object.trackId) ? String(object.trackId) : '',
|
|
585
|
+
file: isSet(object.file) ? exports.DirectFileOutput.fromJSON(object.file) : undefined,
|
|
586
|
+
websocketUrl: isSet(object.websocketUrl) ? String(object.websocketUrl) : undefined,
|
|
587
|
+
};
|
|
588
|
+
},
|
|
589
|
+
toJSON(message) {
|
|
590
|
+
const obj = {};
|
|
591
|
+
message.roomName !== undefined && (obj.roomName = message.roomName);
|
|
592
|
+
message.trackId !== undefined && (obj.trackId = message.trackId);
|
|
593
|
+
message.file !== undefined &&
|
|
594
|
+
(obj.file = message.file ? exports.DirectFileOutput.toJSON(message.file) : undefined);
|
|
595
|
+
message.websocketUrl !== undefined && (obj.websocketUrl = message.websocketUrl);
|
|
596
|
+
return obj;
|
|
597
|
+
},
|
|
598
|
+
fromPartial(object) {
|
|
599
|
+
var _a, _b, _c;
|
|
600
|
+
const message = createBaseTrackEgressRequest();
|
|
601
|
+
message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
|
|
602
|
+
message.trackId = (_b = object.trackId) !== null && _b !== void 0 ? _b : '';
|
|
603
|
+
message.file =
|
|
604
|
+
object.file !== undefined && object.file !== null
|
|
605
|
+
? exports.DirectFileOutput.fromPartial(object.file)
|
|
606
|
+
: undefined;
|
|
607
|
+
message.websocketUrl = (_c = object.websocketUrl) !== null && _c !== void 0 ? _c : undefined;
|
|
608
|
+
return message;
|
|
609
|
+
},
|
|
610
|
+
};
|
|
611
|
+
function createBaseEncodedFileOutput() {
|
|
612
|
+
return { fileType: 0, filepath: '', s3: undefined, gcp: undefined, azure: undefined };
|
|
613
|
+
}
|
|
614
|
+
exports.EncodedFileOutput = {
|
|
615
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
616
|
+
if (message.fileType !== 0) {
|
|
617
|
+
writer.uint32(8).int32(message.fileType);
|
|
618
|
+
}
|
|
619
|
+
if (message.filepath !== '') {
|
|
620
|
+
writer.uint32(18).string(message.filepath);
|
|
621
|
+
}
|
|
622
|
+
if (message.s3 !== undefined) {
|
|
623
|
+
exports.S3Upload.encode(message.s3, writer.uint32(26).fork()).ldelim();
|
|
624
|
+
}
|
|
625
|
+
if (message.gcp !== undefined) {
|
|
626
|
+
exports.GCPUpload.encode(message.gcp, writer.uint32(34).fork()).ldelim();
|
|
627
|
+
}
|
|
628
|
+
if (message.azure !== undefined) {
|
|
629
|
+
exports.AzureBlobUpload.encode(message.azure, writer.uint32(42).fork()).ldelim();
|
|
630
|
+
}
|
|
631
|
+
return writer;
|
|
632
|
+
},
|
|
633
|
+
decode(input, length) {
|
|
634
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
635
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
636
|
+
const message = createBaseEncodedFileOutput();
|
|
637
|
+
while (reader.pos < end) {
|
|
638
|
+
const tag = reader.uint32();
|
|
639
|
+
switch (tag >>> 3) {
|
|
640
|
+
case 1:
|
|
641
|
+
message.fileType = reader.int32();
|
|
642
|
+
break;
|
|
643
|
+
case 2:
|
|
644
|
+
message.filepath = reader.string();
|
|
645
|
+
break;
|
|
646
|
+
case 3:
|
|
647
|
+
message.s3 = exports.S3Upload.decode(reader, reader.uint32());
|
|
648
|
+
break;
|
|
649
|
+
case 4:
|
|
650
|
+
message.gcp = exports.GCPUpload.decode(reader, reader.uint32());
|
|
651
|
+
break;
|
|
652
|
+
case 5:
|
|
653
|
+
message.azure = exports.AzureBlobUpload.decode(reader, reader.uint32());
|
|
654
|
+
break;
|
|
655
|
+
default:
|
|
656
|
+
reader.skipType(tag & 7);
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
return message;
|
|
661
|
+
},
|
|
662
|
+
fromJSON(object) {
|
|
663
|
+
return {
|
|
664
|
+
fileType: isSet(object.fileType) ? encodedFileTypeFromJSON(object.fileType) : 0,
|
|
665
|
+
filepath: isSet(object.filepath) ? String(object.filepath) : '',
|
|
666
|
+
s3: isSet(object.s3) ? exports.S3Upload.fromJSON(object.s3) : undefined,
|
|
667
|
+
gcp: isSet(object.gcp) ? exports.GCPUpload.fromJSON(object.gcp) : undefined,
|
|
668
|
+
azure: isSet(object.azure) ? exports.AzureBlobUpload.fromJSON(object.azure) : undefined,
|
|
669
|
+
};
|
|
670
|
+
},
|
|
671
|
+
toJSON(message) {
|
|
672
|
+
const obj = {};
|
|
673
|
+
message.fileType !== undefined && (obj.fileType = encodedFileTypeToJSON(message.fileType));
|
|
674
|
+
message.filepath !== undefined && (obj.filepath = message.filepath);
|
|
675
|
+
message.s3 !== undefined && (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
|
|
676
|
+
message.gcp !== undefined &&
|
|
677
|
+
(obj.gcp = message.gcp ? exports.GCPUpload.toJSON(message.gcp) : undefined);
|
|
678
|
+
message.azure !== undefined &&
|
|
679
|
+
(obj.azure = message.azure ? exports.AzureBlobUpload.toJSON(message.azure) : undefined);
|
|
680
|
+
return obj;
|
|
681
|
+
},
|
|
682
|
+
fromPartial(object) {
|
|
683
|
+
var _a, _b;
|
|
684
|
+
const message = createBaseEncodedFileOutput();
|
|
685
|
+
message.fileType = (_a = object.fileType) !== null && _a !== void 0 ? _a : 0;
|
|
686
|
+
message.filepath = (_b = object.filepath) !== null && _b !== void 0 ? _b : '';
|
|
687
|
+
message.s3 =
|
|
688
|
+
object.s3 !== undefined && object.s3 !== null ? exports.S3Upload.fromPartial(object.s3) : undefined;
|
|
689
|
+
message.gcp =
|
|
690
|
+
object.gcp !== undefined && object.gcp !== null
|
|
691
|
+
? exports.GCPUpload.fromPartial(object.gcp)
|
|
692
|
+
: undefined;
|
|
693
|
+
message.azure =
|
|
694
|
+
object.azure !== undefined && object.azure !== null
|
|
695
|
+
? exports.AzureBlobUpload.fromPartial(object.azure)
|
|
696
|
+
: undefined;
|
|
697
|
+
return message;
|
|
698
|
+
},
|
|
699
|
+
};
|
|
700
|
+
function createBaseDirectFileOutput() {
|
|
701
|
+
return { filepath: '', s3: undefined, gcp: undefined, azure: undefined };
|
|
702
|
+
}
|
|
703
|
+
exports.DirectFileOutput = {
|
|
704
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
705
|
+
if (message.filepath !== '') {
|
|
706
|
+
writer.uint32(10).string(message.filepath);
|
|
707
|
+
}
|
|
708
|
+
if (message.s3 !== undefined) {
|
|
709
|
+
exports.S3Upload.encode(message.s3, writer.uint32(18).fork()).ldelim();
|
|
710
|
+
}
|
|
711
|
+
if (message.gcp !== undefined) {
|
|
712
|
+
exports.GCPUpload.encode(message.gcp, writer.uint32(26).fork()).ldelim();
|
|
713
|
+
}
|
|
714
|
+
if (message.azure !== undefined) {
|
|
715
|
+
exports.AzureBlobUpload.encode(message.azure, writer.uint32(34).fork()).ldelim();
|
|
716
|
+
}
|
|
717
|
+
return writer;
|
|
718
|
+
},
|
|
719
|
+
decode(input, length) {
|
|
720
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
721
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
722
|
+
const message = createBaseDirectFileOutput();
|
|
723
|
+
while (reader.pos < end) {
|
|
724
|
+
const tag = reader.uint32();
|
|
725
|
+
switch (tag >>> 3) {
|
|
726
|
+
case 1:
|
|
727
|
+
message.filepath = reader.string();
|
|
728
|
+
break;
|
|
729
|
+
case 2:
|
|
730
|
+
message.s3 = exports.S3Upload.decode(reader, reader.uint32());
|
|
731
|
+
break;
|
|
732
|
+
case 3:
|
|
733
|
+
message.gcp = exports.GCPUpload.decode(reader, reader.uint32());
|
|
734
|
+
break;
|
|
735
|
+
case 4:
|
|
736
|
+
message.azure = exports.AzureBlobUpload.decode(reader, reader.uint32());
|
|
737
|
+
break;
|
|
738
|
+
default:
|
|
739
|
+
reader.skipType(tag & 7);
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return message;
|
|
744
|
+
},
|
|
745
|
+
fromJSON(object) {
|
|
746
|
+
return {
|
|
747
|
+
filepath: isSet(object.filepath) ? String(object.filepath) : '',
|
|
748
|
+
s3: isSet(object.s3) ? exports.S3Upload.fromJSON(object.s3) : undefined,
|
|
749
|
+
gcp: isSet(object.gcp) ? exports.GCPUpload.fromJSON(object.gcp) : undefined,
|
|
750
|
+
azure: isSet(object.azure) ? exports.AzureBlobUpload.fromJSON(object.azure) : undefined,
|
|
751
|
+
};
|
|
752
|
+
},
|
|
753
|
+
toJSON(message) {
|
|
754
|
+
const obj = {};
|
|
755
|
+
message.filepath !== undefined && (obj.filepath = message.filepath);
|
|
756
|
+
message.s3 !== undefined && (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
|
|
757
|
+
message.gcp !== undefined &&
|
|
758
|
+
(obj.gcp = message.gcp ? exports.GCPUpload.toJSON(message.gcp) : undefined);
|
|
759
|
+
message.azure !== undefined &&
|
|
760
|
+
(obj.azure = message.azure ? exports.AzureBlobUpload.toJSON(message.azure) : undefined);
|
|
761
|
+
return obj;
|
|
762
|
+
},
|
|
763
|
+
fromPartial(object) {
|
|
764
|
+
var _a;
|
|
765
|
+
const message = createBaseDirectFileOutput();
|
|
766
|
+
message.filepath = (_a = object.filepath) !== null && _a !== void 0 ? _a : '';
|
|
767
|
+
message.s3 =
|
|
768
|
+
object.s3 !== undefined && object.s3 !== null ? exports.S3Upload.fromPartial(object.s3) : undefined;
|
|
769
|
+
message.gcp =
|
|
770
|
+
object.gcp !== undefined && object.gcp !== null
|
|
771
|
+
? exports.GCPUpload.fromPartial(object.gcp)
|
|
772
|
+
: undefined;
|
|
773
|
+
message.azure =
|
|
774
|
+
object.azure !== undefined && object.azure !== null
|
|
775
|
+
? exports.AzureBlobUpload.fromPartial(object.azure)
|
|
776
|
+
: undefined;
|
|
777
|
+
return message;
|
|
778
|
+
},
|
|
779
|
+
};
|
|
780
|
+
function createBaseS3Upload() {
|
|
781
|
+
return { accessKey: '', secret: '', region: '', endpoint: '', bucket: '' };
|
|
782
|
+
}
|
|
783
|
+
exports.S3Upload = {
|
|
784
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
785
|
+
if (message.accessKey !== '') {
|
|
786
|
+
writer.uint32(10).string(message.accessKey);
|
|
787
|
+
}
|
|
788
|
+
if (message.secret !== '') {
|
|
789
|
+
writer.uint32(18).string(message.secret);
|
|
790
|
+
}
|
|
791
|
+
if (message.region !== '') {
|
|
792
|
+
writer.uint32(26).string(message.region);
|
|
793
|
+
}
|
|
794
|
+
if (message.endpoint !== '') {
|
|
795
|
+
writer.uint32(34).string(message.endpoint);
|
|
796
|
+
}
|
|
797
|
+
if (message.bucket !== '') {
|
|
798
|
+
writer.uint32(42).string(message.bucket);
|
|
799
|
+
}
|
|
800
|
+
return writer;
|
|
801
|
+
},
|
|
802
|
+
decode(input, length) {
|
|
803
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
804
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
805
|
+
const message = createBaseS3Upload();
|
|
806
|
+
while (reader.pos < end) {
|
|
807
|
+
const tag = reader.uint32();
|
|
808
|
+
switch (tag >>> 3) {
|
|
809
|
+
case 1:
|
|
810
|
+
message.accessKey = reader.string();
|
|
811
|
+
break;
|
|
812
|
+
case 2:
|
|
813
|
+
message.secret = reader.string();
|
|
814
|
+
break;
|
|
815
|
+
case 3:
|
|
816
|
+
message.region = reader.string();
|
|
817
|
+
break;
|
|
818
|
+
case 4:
|
|
819
|
+
message.endpoint = reader.string();
|
|
820
|
+
break;
|
|
821
|
+
case 5:
|
|
822
|
+
message.bucket = reader.string();
|
|
823
|
+
break;
|
|
824
|
+
default:
|
|
825
|
+
reader.skipType(tag & 7);
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
return message;
|
|
830
|
+
},
|
|
831
|
+
fromJSON(object) {
|
|
832
|
+
return {
|
|
833
|
+
accessKey: isSet(object.accessKey) ? String(object.accessKey) : '',
|
|
834
|
+
secret: isSet(object.secret) ? String(object.secret) : '',
|
|
835
|
+
region: isSet(object.region) ? String(object.region) : '',
|
|
836
|
+
endpoint: isSet(object.endpoint) ? String(object.endpoint) : '',
|
|
837
|
+
bucket: isSet(object.bucket) ? String(object.bucket) : '',
|
|
838
|
+
};
|
|
839
|
+
},
|
|
840
|
+
toJSON(message) {
|
|
841
|
+
const obj = {};
|
|
842
|
+
message.accessKey !== undefined && (obj.accessKey = message.accessKey);
|
|
843
|
+
message.secret !== undefined && (obj.secret = message.secret);
|
|
844
|
+
message.region !== undefined && (obj.region = message.region);
|
|
845
|
+
message.endpoint !== undefined && (obj.endpoint = message.endpoint);
|
|
846
|
+
message.bucket !== undefined && (obj.bucket = message.bucket);
|
|
847
|
+
return obj;
|
|
848
|
+
},
|
|
849
|
+
fromPartial(object) {
|
|
850
|
+
var _a, _b, _c, _d, _e;
|
|
851
|
+
const message = createBaseS3Upload();
|
|
852
|
+
message.accessKey = (_a = object.accessKey) !== null && _a !== void 0 ? _a : '';
|
|
853
|
+
message.secret = (_b = object.secret) !== null && _b !== void 0 ? _b : '';
|
|
854
|
+
message.region = (_c = object.region) !== null && _c !== void 0 ? _c : '';
|
|
855
|
+
message.endpoint = (_d = object.endpoint) !== null && _d !== void 0 ? _d : '';
|
|
856
|
+
message.bucket = (_e = object.bucket) !== null && _e !== void 0 ? _e : '';
|
|
857
|
+
return message;
|
|
858
|
+
},
|
|
859
|
+
};
|
|
860
|
+
function createBaseGCPUpload() {
|
|
861
|
+
return { credentials: new Uint8Array(), bucket: '' };
|
|
862
|
+
}
|
|
863
|
+
exports.GCPUpload = {
|
|
864
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
865
|
+
if (message.credentials.length !== 0) {
|
|
866
|
+
writer.uint32(10).bytes(message.credentials);
|
|
867
|
+
}
|
|
868
|
+
if (message.bucket !== '') {
|
|
869
|
+
writer.uint32(18).string(message.bucket);
|
|
870
|
+
}
|
|
871
|
+
return writer;
|
|
872
|
+
},
|
|
873
|
+
decode(input, length) {
|
|
874
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
875
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
876
|
+
const message = createBaseGCPUpload();
|
|
877
|
+
while (reader.pos < end) {
|
|
878
|
+
const tag = reader.uint32();
|
|
879
|
+
switch (tag >>> 3) {
|
|
880
|
+
case 1:
|
|
881
|
+
message.credentials = reader.bytes();
|
|
882
|
+
break;
|
|
883
|
+
case 2:
|
|
884
|
+
message.bucket = reader.string();
|
|
885
|
+
break;
|
|
886
|
+
default:
|
|
887
|
+
reader.skipType(tag & 7);
|
|
888
|
+
break;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
return message;
|
|
892
|
+
},
|
|
893
|
+
fromJSON(object) {
|
|
894
|
+
return {
|
|
895
|
+
credentials: isSet(object.credentials)
|
|
896
|
+
? bytesFromBase64(object.credentials)
|
|
897
|
+
: new Uint8Array(),
|
|
898
|
+
bucket: isSet(object.bucket) ? String(object.bucket) : '',
|
|
899
|
+
};
|
|
900
|
+
},
|
|
901
|
+
toJSON(message) {
|
|
902
|
+
const obj = {};
|
|
903
|
+
message.credentials !== undefined &&
|
|
904
|
+
(obj.credentials = base64FromBytes(message.credentials !== undefined ? message.credentials : new Uint8Array()));
|
|
905
|
+
message.bucket !== undefined && (obj.bucket = message.bucket);
|
|
906
|
+
return obj;
|
|
907
|
+
},
|
|
908
|
+
fromPartial(object) {
|
|
909
|
+
var _a, _b;
|
|
910
|
+
const message = createBaseGCPUpload();
|
|
911
|
+
message.credentials = (_a = object.credentials) !== null && _a !== void 0 ? _a : new Uint8Array();
|
|
912
|
+
message.bucket = (_b = object.bucket) !== null && _b !== void 0 ? _b : '';
|
|
913
|
+
return message;
|
|
914
|
+
},
|
|
915
|
+
};
|
|
916
|
+
function createBaseAzureBlobUpload() {
|
|
917
|
+
return { accountName: '', accountKey: '', containerName: '' };
|
|
918
|
+
}
|
|
919
|
+
exports.AzureBlobUpload = {
|
|
920
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
921
|
+
if (message.accountName !== '') {
|
|
922
|
+
writer.uint32(10).string(message.accountName);
|
|
923
|
+
}
|
|
924
|
+
if (message.accountKey !== '') {
|
|
925
|
+
writer.uint32(18).string(message.accountKey);
|
|
926
|
+
}
|
|
927
|
+
if (message.containerName !== '') {
|
|
928
|
+
writer.uint32(26).string(message.containerName);
|
|
929
|
+
}
|
|
930
|
+
return writer;
|
|
931
|
+
},
|
|
932
|
+
decode(input, length) {
|
|
933
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
934
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
935
|
+
const message = createBaseAzureBlobUpload();
|
|
936
|
+
while (reader.pos < end) {
|
|
937
|
+
const tag = reader.uint32();
|
|
938
|
+
switch (tag >>> 3) {
|
|
939
|
+
case 1:
|
|
940
|
+
message.accountName = reader.string();
|
|
941
|
+
break;
|
|
942
|
+
case 2:
|
|
943
|
+
message.accountKey = reader.string();
|
|
944
|
+
break;
|
|
945
|
+
case 3:
|
|
946
|
+
message.containerName = reader.string();
|
|
947
|
+
break;
|
|
948
|
+
default:
|
|
949
|
+
reader.skipType(tag & 7);
|
|
950
|
+
break;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
return message;
|
|
954
|
+
},
|
|
955
|
+
fromJSON(object) {
|
|
956
|
+
return {
|
|
957
|
+
accountName: isSet(object.accountName) ? String(object.accountName) : '',
|
|
958
|
+
accountKey: isSet(object.accountKey) ? String(object.accountKey) : '',
|
|
959
|
+
containerName: isSet(object.containerName) ? String(object.containerName) : '',
|
|
960
|
+
};
|
|
961
|
+
},
|
|
962
|
+
toJSON(message) {
|
|
963
|
+
const obj = {};
|
|
964
|
+
message.accountName !== undefined && (obj.accountName = message.accountName);
|
|
965
|
+
message.accountKey !== undefined && (obj.accountKey = message.accountKey);
|
|
966
|
+
message.containerName !== undefined && (obj.containerName = message.containerName);
|
|
967
|
+
return obj;
|
|
968
|
+
},
|
|
969
|
+
fromPartial(object) {
|
|
970
|
+
var _a, _b, _c;
|
|
971
|
+
const message = createBaseAzureBlobUpload();
|
|
972
|
+
message.accountName = (_a = object.accountName) !== null && _a !== void 0 ? _a : '';
|
|
973
|
+
message.accountKey = (_b = object.accountKey) !== null && _b !== void 0 ? _b : '';
|
|
974
|
+
message.containerName = (_c = object.containerName) !== null && _c !== void 0 ? _c : '';
|
|
975
|
+
return message;
|
|
976
|
+
},
|
|
977
|
+
};
|
|
978
|
+
function createBaseStreamOutput() {
|
|
979
|
+
return { protocol: 0, urls: [] };
|
|
980
|
+
}
|
|
981
|
+
exports.StreamOutput = {
|
|
982
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
983
|
+
if (message.protocol !== 0) {
|
|
984
|
+
writer.uint32(8).int32(message.protocol);
|
|
985
|
+
}
|
|
986
|
+
for (const v of message.urls) {
|
|
987
|
+
writer.uint32(18).string(v);
|
|
988
|
+
}
|
|
989
|
+
return writer;
|
|
990
|
+
},
|
|
991
|
+
decode(input, length) {
|
|
992
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
993
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
994
|
+
const message = createBaseStreamOutput();
|
|
995
|
+
while (reader.pos < end) {
|
|
996
|
+
const tag = reader.uint32();
|
|
997
|
+
switch (tag >>> 3) {
|
|
998
|
+
case 1:
|
|
999
|
+
message.protocol = reader.int32();
|
|
1000
|
+
break;
|
|
1001
|
+
case 2:
|
|
1002
|
+
message.urls.push(reader.string());
|
|
1003
|
+
break;
|
|
1004
|
+
default:
|
|
1005
|
+
reader.skipType(tag & 7);
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
return message;
|
|
1010
|
+
},
|
|
1011
|
+
fromJSON(object) {
|
|
1012
|
+
return {
|
|
1013
|
+
protocol: isSet(object.protocol) ? streamProtocolFromJSON(object.protocol) : 0,
|
|
1014
|
+
urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls) ? object.urls.map((e) => String(e)) : [],
|
|
1015
|
+
};
|
|
1016
|
+
},
|
|
1017
|
+
toJSON(message) {
|
|
1018
|
+
const obj = {};
|
|
1019
|
+
message.protocol !== undefined && (obj.protocol = streamProtocolToJSON(message.protocol));
|
|
1020
|
+
if (message.urls) {
|
|
1021
|
+
obj.urls = message.urls.map((e) => e);
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
obj.urls = [];
|
|
1025
|
+
}
|
|
1026
|
+
return obj;
|
|
1027
|
+
},
|
|
1028
|
+
fromPartial(object) {
|
|
1029
|
+
var _a, _b;
|
|
1030
|
+
const message = createBaseStreamOutput();
|
|
1031
|
+
message.protocol = (_a = object.protocol) !== null && _a !== void 0 ? _a : 0;
|
|
1032
|
+
message.urls = ((_b = object.urls) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
1033
|
+
return message;
|
|
1034
|
+
},
|
|
1035
|
+
};
|
|
1036
|
+
function createBaseEncodingOptions() {
|
|
1037
|
+
return {
|
|
1038
|
+
width: 0,
|
|
1039
|
+
height: 0,
|
|
1040
|
+
depth: 0,
|
|
1041
|
+
framerate: 0,
|
|
1042
|
+
audioCodec: 0,
|
|
1043
|
+
audioBitrate: 0,
|
|
1044
|
+
audioFrequency: 0,
|
|
1045
|
+
videoCodec: 0,
|
|
1046
|
+
videoBitrate: 0,
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
exports.EncodingOptions = {
|
|
1050
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1051
|
+
if (message.width !== 0) {
|
|
1052
|
+
writer.uint32(8).int32(message.width);
|
|
1053
|
+
}
|
|
1054
|
+
if (message.height !== 0) {
|
|
1055
|
+
writer.uint32(16).int32(message.height);
|
|
1056
|
+
}
|
|
1057
|
+
if (message.depth !== 0) {
|
|
1058
|
+
writer.uint32(24).int32(message.depth);
|
|
1059
|
+
}
|
|
1060
|
+
if (message.framerate !== 0) {
|
|
1061
|
+
writer.uint32(32).int32(message.framerate);
|
|
1062
|
+
}
|
|
1063
|
+
if (message.audioCodec !== 0) {
|
|
1064
|
+
writer.uint32(40).int32(message.audioCodec);
|
|
1065
|
+
}
|
|
1066
|
+
if (message.audioBitrate !== 0) {
|
|
1067
|
+
writer.uint32(48).int32(message.audioBitrate);
|
|
1068
|
+
}
|
|
1069
|
+
if (message.audioFrequency !== 0) {
|
|
1070
|
+
writer.uint32(56).int32(message.audioFrequency);
|
|
1071
|
+
}
|
|
1072
|
+
if (message.videoCodec !== 0) {
|
|
1073
|
+
writer.uint32(64).int32(message.videoCodec);
|
|
1074
|
+
}
|
|
1075
|
+
if (message.videoBitrate !== 0) {
|
|
1076
|
+
writer.uint32(72).int32(message.videoBitrate);
|
|
1077
|
+
}
|
|
1078
|
+
return writer;
|
|
1079
|
+
},
|
|
1080
|
+
decode(input, length) {
|
|
1081
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1082
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1083
|
+
const message = createBaseEncodingOptions();
|
|
1084
|
+
while (reader.pos < end) {
|
|
1085
|
+
const tag = reader.uint32();
|
|
1086
|
+
switch (tag >>> 3) {
|
|
1087
|
+
case 1:
|
|
1088
|
+
message.width = reader.int32();
|
|
1089
|
+
break;
|
|
1090
|
+
case 2:
|
|
1091
|
+
message.height = reader.int32();
|
|
1092
|
+
break;
|
|
1093
|
+
case 3:
|
|
1094
|
+
message.depth = reader.int32();
|
|
1095
|
+
break;
|
|
1096
|
+
case 4:
|
|
1097
|
+
message.framerate = reader.int32();
|
|
1098
|
+
break;
|
|
1099
|
+
case 5:
|
|
1100
|
+
message.audioCodec = reader.int32();
|
|
1101
|
+
break;
|
|
1102
|
+
case 6:
|
|
1103
|
+
message.audioBitrate = reader.int32();
|
|
1104
|
+
break;
|
|
1105
|
+
case 7:
|
|
1106
|
+
message.audioFrequency = reader.int32();
|
|
1107
|
+
break;
|
|
1108
|
+
case 8:
|
|
1109
|
+
message.videoCodec = reader.int32();
|
|
1110
|
+
break;
|
|
1111
|
+
case 9:
|
|
1112
|
+
message.videoBitrate = reader.int32();
|
|
1113
|
+
break;
|
|
1114
|
+
default:
|
|
1115
|
+
reader.skipType(tag & 7);
|
|
1116
|
+
break;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
return message;
|
|
1120
|
+
},
|
|
1121
|
+
fromJSON(object) {
|
|
1122
|
+
return {
|
|
1123
|
+
width: isSet(object.width) ? Number(object.width) : 0,
|
|
1124
|
+
height: isSet(object.height) ? Number(object.height) : 0,
|
|
1125
|
+
depth: isSet(object.depth) ? Number(object.depth) : 0,
|
|
1126
|
+
framerate: isSet(object.framerate) ? Number(object.framerate) : 0,
|
|
1127
|
+
audioCodec: isSet(object.audioCodec) ? audioCodecFromJSON(object.audioCodec) : 0,
|
|
1128
|
+
audioBitrate: isSet(object.audioBitrate) ? Number(object.audioBitrate) : 0,
|
|
1129
|
+
audioFrequency: isSet(object.audioFrequency) ? Number(object.audioFrequency) : 0,
|
|
1130
|
+
videoCodec: isSet(object.videoCodec) ? videoCodecFromJSON(object.videoCodec) : 0,
|
|
1131
|
+
videoBitrate: isSet(object.videoBitrate) ? Number(object.videoBitrate) : 0,
|
|
1132
|
+
};
|
|
1133
|
+
},
|
|
1134
|
+
toJSON(message) {
|
|
1135
|
+
const obj = {};
|
|
1136
|
+
message.width !== undefined && (obj.width = Math.round(message.width));
|
|
1137
|
+
message.height !== undefined && (obj.height = Math.round(message.height));
|
|
1138
|
+
message.depth !== undefined && (obj.depth = Math.round(message.depth));
|
|
1139
|
+
message.framerate !== undefined && (obj.framerate = Math.round(message.framerate));
|
|
1140
|
+
message.audioCodec !== undefined && (obj.audioCodec = audioCodecToJSON(message.audioCodec));
|
|
1141
|
+
message.audioBitrate !== undefined && (obj.audioBitrate = Math.round(message.audioBitrate));
|
|
1142
|
+
message.audioFrequency !== undefined &&
|
|
1143
|
+
(obj.audioFrequency = Math.round(message.audioFrequency));
|
|
1144
|
+
message.videoCodec !== undefined && (obj.videoCodec = videoCodecToJSON(message.videoCodec));
|
|
1145
|
+
message.videoBitrate !== undefined && (obj.videoBitrate = Math.round(message.videoBitrate));
|
|
1146
|
+
return obj;
|
|
1147
|
+
},
|
|
1148
|
+
fromPartial(object) {
|
|
1149
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1150
|
+
const message = createBaseEncodingOptions();
|
|
1151
|
+
message.width = (_a = object.width) !== null && _a !== void 0 ? _a : 0;
|
|
1152
|
+
message.height = (_b = object.height) !== null && _b !== void 0 ? _b : 0;
|
|
1153
|
+
message.depth = (_c = object.depth) !== null && _c !== void 0 ? _c : 0;
|
|
1154
|
+
message.framerate = (_d = object.framerate) !== null && _d !== void 0 ? _d : 0;
|
|
1155
|
+
message.audioCodec = (_e = object.audioCodec) !== null && _e !== void 0 ? _e : 0;
|
|
1156
|
+
message.audioBitrate = (_f = object.audioBitrate) !== null && _f !== void 0 ? _f : 0;
|
|
1157
|
+
message.audioFrequency = (_g = object.audioFrequency) !== null && _g !== void 0 ? _g : 0;
|
|
1158
|
+
message.videoCodec = (_h = object.videoCodec) !== null && _h !== void 0 ? _h : 0;
|
|
1159
|
+
message.videoBitrate = (_j = object.videoBitrate) !== null && _j !== void 0 ? _j : 0;
|
|
1160
|
+
return message;
|
|
1161
|
+
},
|
|
1162
|
+
};
|
|
1163
|
+
function createBaseUpdateLayoutRequest() {
|
|
1164
|
+
return { egressId: '', layout: '' };
|
|
1165
|
+
}
|
|
1166
|
+
exports.UpdateLayoutRequest = {
|
|
1167
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1168
|
+
if (message.egressId !== '') {
|
|
1169
|
+
writer.uint32(10).string(message.egressId);
|
|
1170
|
+
}
|
|
1171
|
+
if (message.layout !== '') {
|
|
1172
|
+
writer.uint32(18).string(message.layout);
|
|
1173
|
+
}
|
|
1174
|
+
return writer;
|
|
1175
|
+
},
|
|
1176
|
+
decode(input, length) {
|
|
1177
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1178
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1179
|
+
const message = createBaseUpdateLayoutRequest();
|
|
1180
|
+
while (reader.pos < end) {
|
|
1181
|
+
const tag = reader.uint32();
|
|
1182
|
+
switch (tag >>> 3) {
|
|
1183
|
+
case 1:
|
|
1184
|
+
message.egressId = reader.string();
|
|
1185
|
+
break;
|
|
1186
|
+
case 2:
|
|
1187
|
+
message.layout = reader.string();
|
|
1188
|
+
break;
|
|
1189
|
+
default:
|
|
1190
|
+
reader.skipType(tag & 7);
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
return message;
|
|
1195
|
+
},
|
|
1196
|
+
fromJSON(object) {
|
|
1197
|
+
return {
|
|
1198
|
+
egressId: isSet(object.egressId) ? String(object.egressId) : '',
|
|
1199
|
+
layout: isSet(object.layout) ? String(object.layout) : '',
|
|
1200
|
+
};
|
|
1201
|
+
},
|
|
1202
|
+
toJSON(message) {
|
|
1203
|
+
const obj = {};
|
|
1204
|
+
message.egressId !== undefined && (obj.egressId = message.egressId);
|
|
1205
|
+
message.layout !== undefined && (obj.layout = message.layout);
|
|
1206
|
+
return obj;
|
|
1207
|
+
},
|
|
1208
|
+
fromPartial(object) {
|
|
1209
|
+
var _a, _b;
|
|
1210
|
+
const message = createBaseUpdateLayoutRequest();
|
|
1211
|
+
message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
|
|
1212
|
+
message.layout = (_b = object.layout) !== null && _b !== void 0 ? _b : '';
|
|
1213
|
+
return message;
|
|
1214
|
+
},
|
|
1215
|
+
};
|
|
1216
|
+
function createBaseUpdateStreamRequest() {
|
|
1217
|
+
return { egressId: '', addOutputUrls: [], removeOutputUrls: [] };
|
|
1218
|
+
}
|
|
1219
|
+
exports.UpdateStreamRequest = {
|
|
1220
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1221
|
+
if (message.egressId !== '') {
|
|
1222
|
+
writer.uint32(10).string(message.egressId);
|
|
1223
|
+
}
|
|
1224
|
+
for (const v of message.addOutputUrls) {
|
|
1225
|
+
writer.uint32(18).string(v);
|
|
1226
|
+
}
|
|
1227
|
+
for (const v of message.removeOutputUrls) {
|
|
1228
|
+
writer.uint32(26).string(v);
|
|
1229
|
+
}
|
|
1230
|
+
return writer;
|
|
1231
|
+
},
|
|
1232
|
+
decode(input, length) {
|
|
1233
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1234
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1235
|
+
const message = createBaseUpdateStreamRequest();
|
|
1236
|
+
while (reader.pos < end) {
|
|
1237
|
+
const tag = reader.uint32();
|
|
1238
|
+
switch (tag >>> 3) {
|
|
1239
|
+
case 1:
|
|
1240
|
+
message.egressId = reader.string();
|
|
1241
|
+
break;
|
|
1242
|
+
case 2:
|
|
1243
|
+
message.addOutputUrls.push(reader.string());
|
|
1244
|
+
break;
|
|
1245
|
+
case 3:
|
|
1246
|
+
message.removeOutputUrls.push(reader.string());
|
|
1247
|
+
break;
|
|
1248
|
+
default:
|
|
1249
|
+
reader.skipType(tag & 7);
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return message;
|
|
1254
|
+
},
|
|
1255
|
+
fromJSON(object) {
|
|
1256
|
+
return {
|
|
1257
|
+
egressId: isSet(object.egressId) ? String(object.egressId) : '',
|
|
1258
|
+
addOutputUrls: Array.isArray(object === null || object === void 0 ? void 0 : object.addOutputUrls)
|
|
1259
|
+
? object.addOutputUrls.map((e) => String(e))
|
|
1260
|
+
: [],
|
|
1261
|
+
removeOutputUrls: Array.isArray(object === null || object === void 0 ? void 0 : object.removeOutputUrls)
|
|
1262
|
+
? object.removeOutputUrls.map((e) => String(e))
|
|
1263
|
+
: [],
|
|
1264
|
+
};
|
|
1265
|
+
},
|
|
1266
|
+
toJSON(message) {
|
|
1267
|
+
const obj = {};
|
|
1268
|
+
message.egressId !== undefined && (obj.egressId = message.egressId);
|
|
1269
|
+
if (message.addOutputUrls) {
|
|
1270
|
+
obj.addOutputUrls = message.addOutputUrls.map((e) => e);
|
|
1271
|
+
}
|
|
1272
|
+
else {
|
|
1273
|
+
obj.addOutputUrls = [];
|
|
1274
|
+
}
|
|
1275
|
+
if (message.removeOutputUrls) {
|
|
1276
|
+
obj.removeOutputUrls = message.removeOutputUrls.map((e) => e);
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
obj.removeOutputUrls = [];
|
|
1280
|
+
}
|
|
1281
|
+
return obj;
|
|
1282
|
+
},
|
|
1283
|
+
fromPartial(object) {
|
|
1284
|
+
var _a, _b, _c;
|
|
1285
|
+
const message = createBaseUpdateStreamRequest();
|
|
1286
|
+
message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
|
|
1287
|
+
message.addOutputUrls = ((_b = object.addOutputUrls) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
1288
|
+
message.removeOutputUrls = ((_c = object.removeOutputUrls) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
1289
|
+
return message;
|
|
1290
|
+
},
|
|
1291
|
+
};
|
|
1292
|
+
function createBaseListEgressRequest() {
|
|
1293
|
+
return { roomName: '' };
|
|
1294
|
+
}
|
|
1295
|
+
exports.ListEgressRequest = {
|
|
1296
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1297
|
+
if (message.roomName !== '') {
|
|
1298
|
+
writer.uint32(10).string(message.roomName);
|
|
1299
|
+
}
|
|
1300
|
+
return writer;
|
|
1301
|
+
},
|
|
1302
|
+
decode(input, length) {
|
|
1303
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1304
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1305
|
+
const message = createBaseListEgressRequest();
|
|
1306
|
+
while (reader.pos < end) {
|
|
1307
|
+
const tag = reader.uint32();
|
|
1308
|
+
switch (tag >>> 3) {
|
|
1309
|
+
case 1:
|
|
1310
|
+
message.roomName = reader.string();
|
|
1311
|
+
break;
|
|
1312
|
+
default:
|
|
1313
|
+
reader.skipType(tag & 7);
|
|
1314
|
+
break;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
return message;
|
|
1318
|
+
},
|
|
1319
|
+
fromJSON(object) {
|
|
1320
|
+
return {
|
|
1321
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
1322
|
+
};
|
|
1323
|
+
},
|
|
1324
|
+
toJSON(message) {
|
|
1325
|
+
const obj = {};
|
|
1326
|
+
message.roomName !== undefined && (obj.roomName = message.roomName);
|
|
1327
|
+
return obj;
|
|
1328
|
+
},
|
|
1329
|
+
fromPartial(object) {
|
|
1330
|
+
var _a;
|
|
1331
|
+
const message = createBaseListEgressRequest();
|
|
1332
|
+
message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
|
|
1333
|
+
return message;
|
|
1334
|
+
},
|
|
1335
|
+
};
|
|
1336
|
+
function createBaseListEgressResponse() {
|
|
1337
|
+
return { items: [] };
|
|
1338
|
+
}
|
|
1339
|
+
exports.ListEgressResponse = {
|
|
1340
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1341
|
+
for (const v of message.items) {
|
|
1342
|
+
exports.EgressInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1343
|
+
}
|
|
1344
|
+
return writer;
|
|
1345
|
+
},
|
|
1346
|
+
decode(input, length) {
|
|
1347
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1348
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1349
|
+
const message = createBaseListEgressResponse();
|
|
1350
|
+
while (reader.pos < end) {
|
|
1351
|
+
const tag = reader.uint32();
|
|
1352
|
+
switch (tag >>> 3) {
|
|
1353
|
+
case 1:
|
|
1354
|
+
message.items.push(exports.EgressInfo.decode(reader, reader.uint32()));
|
|
1355
|
+
break;
|
|
1356
|
+
default:
|
|
1357
|
+
reader.skipType(tag & 7);
|
|
1358
|
+
break;
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
return message;
|
|
1362
|
+
},
|
|
1363
|
+
fromJSON(object) {
|
|
1364
|
+
return {
|
|
1365
|
+
items: Array.isArray(object === null || object === void 0 ? void 0 : object.items)
|
|
1366
|
+
? object.items.map((e) => exports.EgressInfo.fromJSON(e))
|
|
1367
|
+
: [],
|
|
1368
|
+
};
|
|
1369
|
+
},
|
|
1370
|
+
toJSON(message) {
|
|
1371
|
+
const obj = {};
|
|
1372
|
+
if (message.items) {
|
|
1373
|
+
obj.items = message.items.map((e) => (e ? exports.EgressInfo.toJSON(e) : undefined));
|
|
1374
|
+
}
|
|
1375
|
+
else {
|
|
1376
|
+
obj.items = [];
|
|
1377
|
+
}
|
|
1378
|
+
return obj;
|
|
1379
|
+
},
|
|
1380
|
+
fromPartial(object) {
|
|
1381
|
+
var _a;
|
|
1382
|
+
const message = createBaseListEgressResponse();
|
|
1383
|
+
message.items = ((_a = object.items) === null || _a === void 0 ? void 0 : _a.map((e) => exports.EgressInfo.fromPartial(e))) || [];
|
|
1384
|
+
return message;
|
|
1385
|
+
},
|
|
1386
|
+
};
|
|
1387
|
+
function createBaseStopEgressRequest() {
|
|
1388
|
+
return { egressId: '' };
|
|
1389
|
+
}
|
|
1390
|
+
exports.StopEgressRequest = {
|
|
1391
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1392
|
+
if (message.egressId !== '') {
|
|
1393
|
+
writer.uint32(10).string(message.egressId);
|
|
1394
|
+
}
|
|
1395
|
+
return writer;
|
|
1396
|
+
},
|
|
1397
|
+
decode(input, length) {
|
|
1398
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1399
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1400
|
+
const message = createBaseStopEgressRequest();
|
|
1401
|
+
while (reader.pos < end) {
|
|
1402
|
+
const tag = reader.uint32();
|
|
1403
|
+
switch (tag >>> 3) {
|
|
1404
|
+
case 1:
|
|
1405
|
+
message.egressId = reader.string();
|
|
1406
|
+
break;
|
|
1407
|
+
default:
|
|
1408
|
+
reader.skipType(tag & 7);
|
|
1409
|
+
break;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
return message;
|
|
1413
|
+
},
|
|
1414
|
+
fromJSON(object) {
|
|
1415
|
+
return {
|
|
1416
|
+
egressId: isSet(object.egressId) ? String(object.egressId) : '',
|
|
1417
|
+
};
|
|
1418
|
+
},
|
|
1419
|
+
toJSON(message) {
|
|
1420
|
+
const obj = {};
|
|
1421
|
+
message.egressId !== undefined && (obj.egressId = message.egressId);
|
|
1422
|
+
return obj;
|
|
1423
|
+
},
|
|
1424
|
+
fromPartial(object) {
|
|
1425
|
+
var _a;
|
|
1426
|
+
const message = createBaseStopEgressRequest();
|
|
1427
|
+
message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
|
|
1428
|
+
return message;
|
|
1429
|
+
},
|
|
1430
|
+
};
|
|
1431
|
+
function createBaseEgressInfo() {
|
|
1432
|
+
return {
|
|
1433
|
+
egressId: '',
|
|
1434
|
+
roomId: '',
|
|
1435
|
+
status: 0,
|
|
1436
|
+
startedAt: 0,
|
|
1437
|
+
endedAt: 0,
|
|
1438
|
+
error: '',
|
|
1439
|
+
roomComposite: undefined,
|
|
1440
|
+
trackComposite: undefined,
|
|
1441
|
+
track: undefined,
|
|
1442
|
+
stream: undefined,
|
|
1443
|
+
file: undefined,
|
|
1444
|
+
};
|
|
1445
|
+
}
|
|
1446
|
+
exports.EgressInfo = {
|
|
1447
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1448
|
+
if (message.egressId !== '') {
|
|
1449
|
+
writer.uint32(10).string(message.egressId);
|
|
1450
|
+
}
|
|
1451
|
+
if (message.roomId !== '') {
|
|
1452
|
+
writer.uint32(18).string(message.roomId);
|
|
1453
|
+
}
|
|
1454
|
+
if (message.status !== 0) {
|
|
1455
|
+
writer.uint32(24).int32(message.status);
|
|
1456
|
+
}
|
|
1457
|
+
if (message.startedAt !== 0) {
|
|
1458
|
+
writer.uint32(80).int64(message.startedAt);
|
|
1459
|
+
}
|
|
1460
|
+
if (message.endedAt !== 0) {
|
|
1461
|
+
writer.uint32(88).int64(message.endedAt);
|
|
1462
|
+
}
|
|
1463
|
+
if (message.error !== '') {
|
|
1464
|
+
writer.uint32(74).string(message.error);
|
|
1465
|
+
}
|
|
1466
|
+
if (message.roomComposite !== undefined) {
|
|
1467
|
+
exports.RoomCompositeEgressRequest.encode(message.roomComposite, writer.uint32(34).fork()).ldelim();
|
|
1468
|
+
}
|
|
1469
|
+
if (message.trackComposite !== undefined) {
|
|
1470
|
+
exports.TrackCompositeEgressRequest.encode(message.trackComposite, writer.uint32(42).fork()).ldelim();
|
|
1471
|
+
}
|
|
1472
|
+
if (message.track !== undefined) {
|
|
1473
|
+
exports.TrackEgressRequest.encode(message.track, writer.uint32(50).fork()).ldelim();
|
|
1474
|
+
}
|
|
1475
|
+
if (message.stream !== undefined) {
|
|
1476
|
+
exports.StreamInfoList.encode(message.stream, writer.uint32(58).fork()).ldelim();
|
|
1477
|
+
}
|
|
1478
|
+
if (message.file !== undefined) {
|
|
1479
|
+
exports.FileInfo.encode(message.file, writer.uint32(66).fork()).ldelim();
|
|
1480
|
+
}
|
|
1481
|
+
return writer;
|
|
1482
|
+
},
|
|
1483
|
+
decode(input, length) {
|
|
1484
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1485
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1486
|
+
const message = createBaseEgressInfo();
|
|
1487
|
+
while (reader.pos < end) {
|
|
1488
|
+
const tag = reader.uint32();
|
|
1489
|
+
switch (tag >>> 3) {
|
|
1490
|
+
case 1:
|
|
1491
|
+
message.egressId = reader.string();
|
|
1492
|
+
break;
|
|
1493
|
+
case 2:
|
|
1494
|
+
message.roomId = reader.string();
|
|
1495
|
+
break;
|
|
1496
|
+
case 3:
|
|
1497
|
+
message.status = reader.int32();
|
|
1498
|
+
break;
|
|
1499
|
+
case 10:
|
|
1500
|
+
message.startedAt = longToNumber(reader.int64());
|
|
1501
|
+
break;
|
|
1502
|
+
case 11:
|
|
1503
|
+
message.endedAt = longToNumber(reader.int64());
|
|
1504
|
+
break;
|
|
1505
|
+
case 9:
|
|
1506
|
+
message.error = reader.string();
|
|
1507
|
+
break;
|
|
1508
|
+
case 4:
|
|
1509
|
+
message.roomComposite = exports.RoomCompositeEgressRequest.decode(reader, reader.uint32());
|
|
1510
|
+
break;
|
|
1511
|
+
case 5:
|
|
1512
|
+
message.trackComposite = exports.TrackCompositeEgressRequest.decode(reader, reader.uint32());
|
|
1513
|
+
break;
|
|
1514
|
+
case 6:
|
|
1515
|
+
message.track = exports.TrackEgressRequest.decode(reader, reader.uint32());
|
|
1516
|
+
break;
|
|
1517
|
+
case 7:
|
|
1518
|
+
message.stream = exports.StreamInfoList.decode(reader, reader.uint32());
|
|
1519
|
+
break;
|
|
1520
|
+
case 8:
|
|
1521
|
+
message.file = exports.FileInfo.decode(reader, reader.uint32());
|
|
1522
|
+
break;
|
|
1523
|
+
default:
|
|
1524
|
+
reader.skipType(tag & 7);
|
|
1525
|
+
break;
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
return message;
|
|
1529
|
+
},
|
|
1530
|
+
fromJSON(object) {
|
|
1531
|
+
return {
|
|
1532
|
+
egressId: isSet(object.egressId) ? String(object.egressId) : '',
|
|
1533
|
+
roomId: isSet(object.roomId) ? String(object.roomId) : '',
|
|
1534
|
+
status: isSet(object.status) ? egressStatusFromJSON(object.status) : 0,
|
|
1535
|
+
startedAt: isSet(object.startedAt) ? Number(object.startedAt) : 0,
|
|
1536
|
+
endedAt: isSet(object.endedAt) ? Number(object.endedAt) : 0,
|
|
1537
|
+
error: isSet(object.error) ? String(object.error) : '',
|
|
1538
|
+
roomComposite: isSet(object.roomComposite)
|
|
1539
|
+
? exports.RoomCompositeEgressRequest.fromJSON(object.roomComposite)
|
|
1540
|
+
: undefined,
|
|
1541
|
+
trackComposite: isSet(object.trackComposite)
|
|
1542
|
+
? exports.TrackCompositeEgressRequest.fromJSON(object.trackComposite)
|
|
1543
|
+
: undefined,
|
|
1544
|
+
track: isSet(object.track) ? exports.TrackEgressRequest.fromJSON(object.track) : undefined,
|
|
1545
|
+
stream: isSet(object.stream) ? exports.StreamInfoList.fromJSON(object.stream) : undefined,
|
|
1546
|
+
file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
|
|
1547
|
+
};
|
|
1548
|
+
},
|
|
1549
|
+
toJSON(message) {
|
|
1550
|
+
const obj = {};
|
|
1551
|
+
message.egressId !== undefined && (obj.egressId = message.egressId);
|
|
1552
|
+
message.roomId !== undefined && (obj.roomId = message.roomId);
|
|
1553
|
+
message.status !== undefined && (obj.status = egressStatusToJSON(message.status));
|
|
1554
|
+
message.startedAt !== undefined && (obj.startedAt = Math.round(message.startedAt));
|
|
1555
|
+
message.endedAt !== undefined && (obj.endedAt = Math.round(message.endedAt));
|
|
1556
|
+
message.error !== undefined && (obj.error = message.error);
|
|
1557
|
+
message.roomComposite !== undefined &&
|
|
1558
|
+
(obj.roomComposite = message.roomComposite
|
|
1559
|
+
? exports.RoomCompositeEgressRequest.toJSON(message.roomComposite)
|
|
1560
|
+
: undefined);
|
|
1561
|
+
message.trackComposite !== undefined &&
|
|
1562
|
+
(obj.trackComposite = message.trackComposite
|
|
1563
|
+
? exports.TrackCompositeEgressRequest.toJSON(message.trackComposite)
|
|
1564
|
+
: undefined);
|
|
1565
|
+
message.track !== undefined &&
|
|
1566
|
+
(obj.track = message.track ? exports.TrackEgressRequest.toJSON(message.track) : undefined);
|
|
1567
|
+
message.stream !== undefined &&
|
|
1568
|
+
(obj.stream = message.stream ? exports.StreamInfoList.toJSON(message.stream) : undefined);
|
|
1569
|
+
message.file !== undefined &&
|
|
1570
|
+
(obj.file = message.file ? exports.FileInfo.toJSON(message.file) : undefined);
|
|
1571
|
+
return obj;
|
|
1572
|
+
},
|
|
1573
|
+
fromPartial(object) {
|
|
1574
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1575
|
+
const message = createBaseEgressInfo();
|
|
1576
|
+
message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
|
|
1577
|
+
message.roomId = (_b = object.roomId) !== null && _b !== void 0 ? _b : '';
|
|
1578
|
+
message.status = (_c = object.status) !== null && _c !== void 0 ? _c : 0;
|
|
1579
|
+
message.startedAt = (_d = object.startedAt) !== null && _d !== void 0 ? _d : 0;
|
|
1580
|
+
message.endedAt = (_e = object.endedAt) !== null && _e !== void 0 ? _e : 0;
|
|
1581
|
+
message.error = (_f = object.error) !== null && _f !== void 0 ? _f : '';
|
|
1582
|
+
message.roomComposite =
|
|
1583
|
+
object.roomComposite !== undefined && object.roomComposite !== null
|
|
1584
|
+
? exports.RoomCompositeEgressRequest.fromPartial(object.roomComposite)
|
|
1585
|
+
: undefined;
|
|
1586
|
+
message.trackComposite =
|
|
1587
|
+
object.trackComposite !== undefined && object.trackComposite !== null
|
|
1588
|
+
? exports.TrackCompositeEgressRequest.fromPartial(object.trackComposite)
|
|
1589
|
+
: undefined;
|
|
1590
|
+
message.track =
|
|
1591
|
+
object.track !== undefined && object.track !== null
|
|
1592
|
+
? exports.TrackEgressRequest.fromPartial(object.track)
|
|
1593
|
+
: undefined;
|
|
1594
|
+
message.stream =
|
|
1595
|
+
object.stream !== undefined && object.stream !== null
|
|
1596
|
+
? exports.StreamInfoList.fromPartial(object.stream)
|
|
1597
|
+
: undefined;
|
|
1598
|
+
message.file =
|
|
1599
|
+
object.file !== undefined && object.file !== null
|
|
1600
|
+
? exports.FileInfo.fromPartial(object.file)
|
|
1601
|
+
: undefined;
|
|
1602
|
+
return message;
|
|
1603
|
+
},
|
|
1604
|
+
};
|
|
1605
|
+
function createBaseStreamInfoList() {
|
|
1606
|
+
return { info: [] };
|
|
1607
|
+
}
|
|
1608
|
+
exports.StreamInfoList = {
|
|
1609
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1610
|
+
for (const v of message.info) {
|
|
1611
|
+
exports.StreamInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1612
|
+
}
|
|
1613
|
+
return writer;
|
|
1614
|
+
},
|
|
1615
|
+
decode(input, length) {
|
|
1616
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1617
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1618
|
+
const message = createBaseStreamInfoList();
|
|
1619
|
+
while (reader.pos < end) {
|
|
1620
|
+
const tag = reader.uint32();
|
|
1621
|
+
switch (tag >>> 3) {
|
|
1622
|
+
case 1:
|
|
1623
|
+
message.info.push(exports.StreamInfo.decode(reader, reader.uint32()));
|
|
1624
|
+
break;
|
|
1625
|
+
default:
|
|
1626
|
+
reader.skipType(tag & 7);
|
|
1627
|
+
break;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
return message;
|
|
1631
|
+
},
|
|
1632
|
+
fromJSON(object) {
|
|
1633
|
+
return {
|
|
1634
|
+
info: Array.isArray(object === null || object === void 0 ? void 0 : object.info) ? object.info.map((e) => exports.StreamInfo.fromJSON(e)) : [],
|
|
1635
|
+
};
|
|
1636
|
+
},
|
|
1637
|
+
toJSON(message) {
|
|
1638
|
+
const obj = {};
|
|
1639
|
+
if (message.info) {
|
|
1640
|
+
obj.info = message.info.map((e) => (e ? exports.StreamInfo.toJSON(e) : undefined));
|
|
1641
|
+
}
|
|
1642
|
+
else {
|
|
1643
|
+
obj.info = [];
|
|
1644
|
+
}
|
|
1645
|
+
return obj;
|
|
1646
|
+
},
|
|
1647
|
+
fromPartial(object) {
|
|
1648
|
+
var _a;
|
|
1649
|
+
const message = createBaseStreamInfoList();
|
|
1650
|
+
message.info = ((_a = object.info) === null || _a === void 0 ? void 0 : _a.map((e) => exports.StreamInfo.fromPartial(e))) || [];
|
|
1651
|
+
return message;
|
|
1652
|
+
},
|
|
1653
|
+
};
|
|
1654
|
+
function createBaseStreamInfo() {
|
|
1655
|
+
return { url: '', duration: 0 };
|
|
1656
|
+
}
|
|
1657
|
+
exports.StreamInfo = {
|
|
1658
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1659
|
+
if (message.url !== '') {
|
|
1660
|
+
writer.uint32(10).string(message.url);
|
|
1661
|
+
}
|
|
1662
|
+
if (message.duration !== 0) {
|
|
1663
|
+
writer.uint32(32).int64(message.duration);
|
|
1664
|
+
}
|
|
1665
|
+
return writer;
|
|
1666
|
+
},
|
|
1667
|
+
decode(input, length) {
|
|
1668
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1669
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1670
|
+
const message = createBaseStreamInfo();
|
|
1671
|
+
while (reader.pos < end) {
|
|
1672
|
+
const tag = reader.uint32();
|
|
1673
|
+
switch (tag >>> 3) {
|
|
1674
|
+
case 1:
|
|
1675
|
+
message.url = reader.string();
|
|
1676
|
+
break;
|
|
1677
|
+
case 4:
|
|
1678
|
+
message.duration = longToNumber(reader.int64());
|
|
1679
|
+
break;
|
|
1680
|
+
default:
|
|
1681
|
+
reader.skipType(tag & 7);
|
|
1682
|
+
break;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
return message;
|
|
1686
|
+
},
|
|
1687
|
+
fromJSON(object) {
|
|
1688
|
+
return {
|
|
1689
|
+
url: isSet(object.url) ? String(object.url) : '',
|
|
1690
|
+
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
1691
|
+
};
|
|
1692
|
+
},
|
|
1693
|
+
toJSON(message) {
|
|
1694
|
+
const obj = {};
|
|
1695
|
+
message.url !== undefined && (obj.url = message.url);
|
|
1696
|
+
message.duration !== undefined && (obj.duration = Math.round(message.duration));
|
|
1697
|
+
return obj;
|
|
1698
|
+
},
|
|
1699
|
+
fromPartial(object) {
|
|
1700
|
+
var _a, _b;
|
|
1701
|
+
const message = createBaseStreamInfo();
|
|
1702
|
+
message.url = (_a = object.url) !== null && _a !== void 0 ? _a : '';
|
|
1703
|
+
message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
|
|
1704
|
+
return message;
|
|
1705
|
+
},
|
|
1706
|
+
};
|
|
1707
|
+
function createBaseFileInfo() {
|
|
1708
|
+
return { filename: '', duration: 0, size: 0, location: '' };
|
|
1709
|
+
}
|
|
1710
|
+
exports.FileInfo = {
|
|
1711
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1712
|
+
if (message.filename !== '') {
|
|
1713
|
+
writer.uint32(10).string(message.filename);
|
|
1714
|
+
}
|
|
1715
|
+
if (message.duration !== 0) {
|
|
1716
|
+
writer.uint32(48).int64(message.duration);
|
|
1717
|
+
}
|
|
1718
|
+
if (message.size !== 0) {
|
|
1719
|
+
writer.uint32(32).int64(message.size);
|
|
1720
|
+
}
|
|
1721
|
+
if (message.location !== '') {
|
|
1722
|
+
writer.uint32(42).string(message.location);
|
|
1723
|
+
}
|
|
1724
|
+
return writer;
|
|
1725
|
+
},
|
|
1726
|
+
decode(input, length) {
|
|
1727
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1728
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1729
|
+
const message = createBaseFileInfo();
|
|
1730
|
+
while (reader.pos < end) {
|
|
1731
|
+
const tag = reader.uint32();
|
|
1732
|
+
switch (tag >>> 3) {
|
|
1733
|
+
case 1:
|
|
1734
|
+
message.filename = reader.string();
|
|
1735
|
+
break;
|
|
1736
|
+
case 6:
|
|
1737
|
+
message.duration = longToNumber(reader.int64());
|
|
1738
|
+
break;
|
|
1739
|
+
case 4:
|
|
1740
|
+
message.size = longToNumber(reader.int64());
|
|
1741
|
+
break;
|
|
1742
|
+
case 5:
|
|
1743
|
+
message.location = reader.string();
|
|
1744
|
+
break;
|
|
1745
|
+
default:
|
|
1746
|
+
reader.skipType(tag & 7);
|
|
1747
|
+
break;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
return message;
|
|
1751
|
+
},
|
|
1752
|
+
fromJSON(object) {
|
|
1753
|
+
return {
|
|
1754
|
+
filename: isSet(object.filename) ? String(object.filename) : '',
|
|
1755
|
+
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
1756
|
+
size: isSet(object.size) ? Number(object.size) : 0,
|
|
1757
|
+
location: isSet(object.location) ? String(object.location) : '',
|
|
1758
|
+
};
|
|
1759
|
+
},
|
|
1760
|
+
toJSON(message) {
|
|
1761
|
+
const obj = {};
|
|
1762
|
+
message.filename !== undefined && (obj.filename = message.filename);
|
|
1763
|
+
message.duration !== undefined && (obj.duration = Math.round(message.duration));
|
|
1764
|
+
message.size !== undefined && (obj.size = Math.round(message.size));
|
|
1765
|
+
message.location !== undefined && (obj.location = message.location);
|
|
1766
|
+
return obj;
|
|
1767
|
+
},
|
|
1768
|
+
fromPartial(object) {
|
|
1769
|
+
var _a, _b, _c, _d;
|
|
1770
|
+
const message = createBaseFileInfo();
|
|
1771
|
+
message.filename = (_a = object.filename) !== null && _a !== void 0 ? _a : '';
|
|
1772
|
+
message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
|
|
1773
|
+
message.size = (_c = object.size) !== null && _c !== void 0 ? _c : 0;
|
|
1774
|
+
message.location = (_d = object.location) !== null && _d !== void 0 ? _d : '';
|
|
1775
|
+
return message;
|
|
1776
|
+
},
|
|
1777
|
+
};
|
|
1778
|
+
var globalThis = (() => {
|
|
1779
|
+
if (typeof globalThis !== 'undefined')
|
|
1780
|
+
return globalThis;
|
|
1781
|
+
if (typeof self !== 'undefined')
|
|
1782
|
+
return self;
|
|
1783
|
+
if (typeof window !== 'undefined')
|
|
1784
|
+
return window;
|
|
1785
|
+
if (typeof global !== 'undefined')
|
|
1786
|
+
return global;
|
|
1787
|
+
throw 'Unable to locate global object';
|
|
1788
|
+
})();
|
|
1789
|
+
const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, 'base64').toString('binary'));
|
|
1790
|
+
function bytesFromBase64(b64) {
|
|
1791
|
+
const bin = atob(b64);
|
|
1792
|
+
const arr = new Uint8Array(bin.length);
|
|
1793
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
1794
|
+
arr[i] = bin.charCodeAt(i);
|
|
1795
|
+
}
|
|
1796
|
+
return arr;
|
|
1797
|
+
}
|
|
1798
|
+
const btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, 'binary').toString('base64'));
|
|
1799
|
+
function base64FromBytes(arr) {
|
|
1800
|
+
const bin = [];
|
|
1801
|
+
for (const byte of arr) {
|
|
1802
|
+
bin.push(String.fromCharCode(byte));
|
|
1803
|
+
}
|
|
1804
|
+
return btoa(bin.join(''));
|
|
1805
|
+
}
|
|
1806
|
+
function longToNumber(long) {
|
|
1807
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
1808
|
+
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
|
|
1809
|
+
}
|
|
1810
|
+
return long.toNumber();
|
|
1811
|
+
}
|
|
1812
|
+
if (_m0.util.Long !== long_1.default) {
|
|
1813
|
+
_m0.util.Long = long_1.default;
|
|
1814
|
+
_m0.configure();
|
|
1815
|
+
}
|
|
1816
|
+
function isSet(value) {
|
|
1817
|
+
return value !== null && value !== undefined;
|
|
1818
|
+
}
|
|
1819
|
+
//# sourceMappingURL=livekit_egress.js.map
|