livekit-server-sdk 0.5.10 → 1.0.2

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.
Files changed (43) hide show
  1. package/.eslintrc.js +1 -1
  2. package/.github/workflows/test.yaml +3 -0
  3. package/.prettierignore +7 -0
  4. package/README.md +8 -8
  5. package/dist/AccessToken.js +1 -1
  6. package/dist/AccessToken.js.map +1 -1
  7. package/dist/EgressClient.d.ts +42 -27
  8. package/dist/EgressClient.js +114 -57
  9. package/dist/EgressClient.js.map +1 -1
  10. package/dist/RoomServiceClient.js.map +1 -1
  11. package/dist/TwirpRPC.js.map +1 -1
  12. package/dist/WebhookReceiver.test.js.map +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +12 -3
  15. package/dist/index.js.map +1 -1
  16. package/dist/proto/google/protobuf/empty.d.ts +1 -1
  17. package/dist/proto/google/protobuf/empty.js +1 -1
  18. package/dist/proto/google/protobuf/empty.js.map +1 -1
  19. package/dist/proto/google/protobuf/timestamp.d.ts +1 -1
  20. package/dist/proto/google/protobuf/timestamp.js +8 -9
  21. package/dist/proto/google/protobuf/timestamp.js.map +1 -1
  22. package/dist/proto/livekit_egress.d.ts +1412 -128
  23. package/dist/proto/livekit_egress.js +735 -386
  24. package/dist/proto/livekit_egress.js.map +1 -1
  25. package/dist/proto/livekit_ingress.d.ts +1803 -0
  26. package/dist/proto/livekit_ingress.js +1095 -0
  27. package/dist/proto/livekit_ingress.js.map +1 -0
  28. package/dist/proto/livekit_models.d.ts +397 -1
  29. package/dist/proto/livekit_models.js +797 -402
  30. package/dist/proto/livekit_models.js.map +1 -1
  31. package/dist/proto/livekit_room.d.ts +246 -2
  32. package/dist/proto/livekit_room.js +81 -109
  33. package/dist/proto/livekit_room.js.map +1 -1
  34. package/dist/proto/livekit_webhook.d.ts +1174 -124
  35. package/dist/proto/livekit_webhook.js +35 -47
  36. package/dist/proto/livekit_webhook.js.map +1 -1
  37. package/package.json +11 -6
  38. package/dist/RecordingServiceClient.d.ts +0 -25
  39. package/dist/RecordingServiceClient.js +0 -87
  40. package/dist/RecordingServiceClient.js.map +0 -1
  41. package/dist/proto/livekit_recording.d.ts +0 -361
  42. package/dist/proto/livekit_recording.js +0 -879
  43. package/dist/proto/livekit_recording.js.map +0 -1
@@ -22,28 +22,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
22
22
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
23
  };
24
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.EncodedFileOutput = exports.TrackEgressRequest = exports.TrackCompositeEgressRequest = exports.WebCompositeEgressRequest = 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;
25
+ exports.SegmentsInfo = 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.SegmentedFileOutput = exports.EncodedFileOutput = exports.TrackEgressRequest = exports.TrackCompositeEgressRequest = exports.RoomCompositeEgressRequest = exports.streamInfo_StatusToJSON = exports.streamInfo_StatusFromJSON = exports.StreamInfo_Status = 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.segmentedFileProtocolToJSON = exports.segmentedFileProtocolFromJSON = exports.SegmentedFileProtocol = exports.streamProtocolToJSON = exports.streamProtocolFromJSON = exports.StreamProtocol = exports.encodedFileTypeToJSON = exports.encodedFileTypeFromJSON = exports.EncodedFileType = exports.protobufPackage = void 0;
26
26
  /* eslint-disable */
27
27
  const long_1 = __importDefault(require("long"));
28
28
  const _m0 = __importStar(require("protobufjs/minimal"));
29
- exports.protobufPackage = "livekit";
29
+ exports.protobufPackage = 'livekit';
30
30
  var EncodedFileType;
31
31
  (function (EncodedFileType) {
32
- EncodedFileType[EncodedFileType["MP4"] = 0] = "MP4";
33
- /** OGG - WEBM = 2; coming soon */
34
- EncodedFileType[EncodedFileType["OGG"] = 1] = "OGG";
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";
35
36
  EncodedFileType[EncodedFileType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
36
37
  })(EncodedFileType = exports.EncodedFileType || (exports.EncodedFileType = {}));
37
38
  function encodedFileTypeFromJSON(object) {
38
39
  switch (object) {
39
40
  case 0:
40
- case "MP4":
41
- return EncodedFileType.MP4;
41
+ case 'DEFAULT_FILETYPE':
42
+ return EncodedFileType.DEFAULT_FILETYPE;
42
43
  case 1:
43
- case "OGG":
44
+ case 'MP4':
45
+ return EncodedFileType.MP4;
46
+ case 2:
47
+ case 'OGG':
44
48
  return EncodedFileType.OGG;
45
49
  case -1:
46
- case "UNRECOGNIZED":
50
+ case 'UNRECOGNIZED':
47
51
  default:
48
52
  return EncodedFileType.UNRECOGNIZED;
49
53
  }
@@ -51,28 +55,34 @@ function encodedFileTypeFromJSON(object) {
51
55
  exports.encodedFileTypeFromJSON = encodedFileTypeFromJSON;
52
56
  function encodedFileTypeToJSON(object) {
53
57
  switch (object) {
58
+ case EncodedFileType.DEFAULT_FILETYPE:
59
+ return 'DEFAULT_FILETYPE';
54
60
  case EncodedFileType.MP4:
55
- return "MP4";
61
+ return 'MP4';
56
62
  case EncodedFileType.OGG:
57
- return "OGG";
63
+ return 'OGG';
58
64
  default:
59
- return "UNKNOWN";
65
+ return 'UNKNOWN';
60
66
  }
61
67
  }
62
68
  exports.encodedFileTypeToJSON = encodedFileTypeToJSON;
63
69
  var StreamProtocol;
64
70
  (function (StreamProtocol) {
65
- /** RTMP - SRT = 1; coming soon */
66
- StreamProtocol[StreamProtocol["RTMP"] = 0] = "RTMP";
71
+ /** DEFAULT_PROTOCOL - protocol chosen based on urls */
72
+ StreamProtocol[StreamProtocol["DEFAULT_PROTOCOL"] = 0] = "DEFAULT_PROTOCOL";
73
+ StreamProtocol[StreamProtocol["RTMP"] = 1] = "RTMP";
67
74
  StreamProtocol[StreamProtocol["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
68
75
  })(StreamProtocol = exports.StreamProtocol || (exports.StreamProtocol = {}));
69
76
  function streamProtocolFromJSON(object) {
70
77
  switch (object) {
71
78
  case 0:
72
- case "RTMP":
79
+ case 'DEFAULT_PROTOCOL':
80
+ return StreamProtocol.DEFAULT_PROTOCOL;
81
+ case 1:
82
+ case 'RTMP':
73
83
  return StreamProtocol.RTMP;
74
84
  case -1:
75
- case "UNRECOGNIZED":
85
+ case 'UNRECOGNIZED':
76
86
  default:
77
87
  return StreamProtocol.UNRECOGNIZED;
78
88
  }
@@ -80,13 +90,47 @@ function streamProtocolFromJSON(object) {
80
90
  exports.streamProtocolFromJSON = streamProtocolFromJSON;
81
91
  function streamProtocolToJSON(object) {
82
92
  switch (object) {
93
+ case StreamProtocol.DEFAULT_PROTOCOL:
94
+ return 'DEFAULT_PROTOCOL';
83
95
  case StreamProtocol.RTMP:
84
- return "RTMP";
96
+ return 'RTMP';
85
97
  default:
86
- return "UNKNOWN";
98
+ return 'UNKNOWN';
87
99
  }
88
100
  }
89
101
  exports.streamProtocolToJSON = streamProtocolToJSON;
102
+ var SegmentedFileProtocol;
103
+ (function (SegmentedFileProtocol) {
104
+ SegmentedFileProtocol[SegmentedFileProtocol["DEFAULT_SEGMENTED_FILE_PROTOCOL"] = 0] = "DEFAULT_SEGMENTED_FILE_PROTOCOL";
105
+ SegmentedFileProtocol[SegmentedFileProtocol["HLS_PROTOCOL"] = 1] = "HLS_PROTOCOL";
106
+ SegmentedFileProtocol[SegmentedFileProtocol["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
107
+ })(SegmentedFileProtocol = exports.SegmentedFileProtocol || (exports.SegmentedFileProtocol = {}));
108
+ function segmentedFileProtocolFromJSON(object) {
109
+ switch (object) {
110
+ case 0:
111
+ case 'DEFAULT_SEGMENTED_FILE_PROTOCOL':
112
+ return SegmentedFileProtocol.DEFAULT_SEGMENTED_FILE_PROTOCOL;
113
+ case 1:
114
+ case 'HLS_PROTOCOL':
115
+ return SegmentedFileProtocol.HLS_PROTOCOL;
116
+ case -1:
117
+ case 'UNRECOGNIZED':
118
+ default:
119
+ return SegmentedFileProtocol.UNRECOGNIZED;
120
+ }
121
+ }
122
+ exports.segmentedFileProtocolFromJSON = segmentedFileProtocolFromJSON;
123
+ function segmentedFileProtocolToJSON(object) {
124
+ switch (object) {
125
+ case SegmentedFileProtocol.DEFAULT_SEGMENTED_FILE_PROTOCOL:
126
+ return 'DEFAULT_SEGMENTED_FILE_PROTOCOL';
127
+ case SegmentedFileProtocol.HLS_PROTOCOL:
128
+ return 'HLS_PROTOCOL';
129
+ default:
130
+ return 'UNKNOWN';
131
+ }
132
+ }
133
+ exports.segmentedFileProtocolToJSON = segmentedFileProtocolToJSON;
90
134
  var AudioCodec;
91
135
  (function (AudioCodec) {
92
136
  AudioCodec[AudioCodec["DEFAULT_AC"] = 0] = "DEFAULT_AC";
@@ -97,16 +141,16 @@ var AudioCodec;
97
141
  function audioCodecFromJSON(object) {
98
142
  switch (object) {
99
143
  case 0:
100
- case "DEFAULT_AC":
144
+ case 'DEFAULT_AC':
101
145
  return AudioCodec.DEFAULT_AC;
102
146
  case 1:
103
- case "OPUS":
147
+ case 'OPUS':
104
148
  return AudioCodec.OPUS;
105
149
  case 2:
106
- case "AAC":
150
+ case 'AAC':
107
151
  return AudioCodec.AAC;
108
152
  case -1:
109
- case "UNRECOGNIZED":
153
+ case 'UNRECOGNIZED':
110
154
  default:
111
155
  return AudioCodec.UNRECOGNIZED;
112
156
  }
@@ -115,13 +159,13 @@ exports.audioCodecFromJSON = audioCodecFromJSON;
115
159
  function audioCodecToJSON(object) {
116
160
  switch (object) {
117
161
  case AudioCodec.DEFAULT_AC:
118
- return "DEFAULT_AC";
162
+ return 'DEFAULT_AC';
119
163
  case AudioCodec.OPUS:
120
- return "OPUS";
164
+ return 'OPUS';
121
165
  case AudioCodec.AAC:
122
- return "AAC";
166
+ return 'AAC';
123
167
  default:
124
- return "UNKNOWN";
168
+ return 'UNKNOWN';
125
169
  }
126
170
  }
127
171
  exports.audioCodecToJSON = audioCodecToJSON;
@@ -130,30 +174,25 @@ var VideoCodec;
130
174
  VideoCodec[VideoCodec["DEFAULT_VC"] = 0] = "DEFAULT_VC";
131
175
  VideoCodec[VideoCodec["H264_BASELINE"] = 1] = "H264_BASELINE";
132
176
  VideoCodec[VideoCodec["H264_MAIN"] = 2] = "H264_MAIN";
133
- /**
134
- * H264_HIGH - HEVC = 4; coming soon
135
- * VP8 = 5; coming soon
136
- * VP9 = 6; coming soon
137
- */
138
177
  VideoCodec[VideoCodec["H264_HIGH"] = 3] = "H264_HIGH";
139
178
  VideoCodec[VideoCodec["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
140
179
  })(VideoCodec = exports.VideoCodec || (exports.VideoCodec = {}));
141
180
  function videoCodecFromJSON(object) {
142
181
  switch (object) {
143
182
  case 0:
144
- case "DEFAULT_VC":
183
+ case 'DEFAULT_VC':
145
184
  return VideoCodec.DEFAULT_VC;
146
185
  case 1:
147
- case "H264_BASELINE":
186
+ case 'H264_BASELINE':
148
187
  return VideoCodec.H264_BASELINE;
149
188
  case 2:
150
- case "H264_MAIN":
189
+ case 'H264_MAIN':
151
190
  return VideoCodec.H264_MAIN;
152
191
  case 3:
153
- case "H264_HIGH":
192
+ case 'H264_HIGH':
154
193
  return VideoCodec.H264_HIGH;
155
194
  case -1:
156
- case "UNRECOGNIZED":
195
+ case 'UNRECOGNIZED':
157
196
  default:
158
197
  return VideoCodec.UNRECOGNIZED;
159
198
  }
@@ -162,15 +201,15 @@ exports.videoCodecFromJSON = videoCodecFromJSON;
162
201
  function videoCodecToJSON(object) {
163
202
  switch (object) {
164
203
  case VideoCodec.DEFAULT_VC:
165
- return "DEFAULT_VC";
204
+ return 'DEFAULT_VC';
166
205
  case VideoCodec.H264_BASELINE:
167
- return "H264_BASELINE";
206
+ return 'H264_BASELINE';
168
207
  case VideoCodec.H264_MAIN:
169
- return "H264_MAIN";
208
+ return 'H264_MAIN';
170
209
  case VideoCodec.H264_HIGH:
171
- return "H264_HIGH";
210
+ return 'H264_HIGH';
172
211
  default:
173
- return "UNKNOWN";
212
+ return 'UNKNOWN';
174
213
  }
175
214
  }
176
215
  exports.videoCodecToJSON = videoCodecToJSON;
@@ -189,19 +228,19 @@ var EncodingOptionsPreset;
189
228
  function encodingOptionsPresetFromJSON(object) {
190
229
  switch (object) {
191
230
  case 0:
192
- case "H264_720P_30":
231
+ case 'H264_720P_30':
193
232
  return EncodingOptionsPreset.H264_720P_30;
194
233
  case 1:
195
- case "H264_720P_60":
234
+ case 'H264_720P_60':
196
235
  return EncodingOptionsPreset.H264_720P_60;
197
236
  case 2:
198
- case "H264_1080P_30":
237
+ case 'H264_1080P_30':
199
238
  return EncodingOptionsPreset.H264_1080P_30;
200
239
  case 3:
201
- case "H264_1080P_60":
240
+ case 'H264_1080P_60':
202
241
  return EncodingOptionsPreset.H264_1080P_60;
203
242
  case -1:
204
- case "UNRECOGNIZED":
243
+ case 'UNRECOGNIZED':
205
244
  default:
206
245
  return EncodingOptionsPreset.UNRECOGNIZED;
207
246
  }
@@ -210,15 +249,15 @@ exports.encodingOptionsPresetFromJSON = encodingOptionsPresetFromJSON;
210
249
  function encodingOptionsPresetToJSON(object) {
211
250
  switch (object) {
212
251
  case EncodingOptionsPreset.H264_720P_30:
213
- return "H264_720P_30";
252
+ return 'H264_720P_30';
214
253
  case EncodingOptionsPreset.H264_720P_60:
215
- return "H264_720P_60";
254
+ return 'H264_720P_60';
216
255
  case EncodingOptionsPreset.H264_1080P_30:
217
- return "H264_1080P_30";
256
+ return 'H264_1080P_30';
218
257
  case EncodingOptionsPreset.H264_1080P_60:
219
- return "H264_1080P_60";
258
+ return 'H264_1080P_60';
220
259
  default:
221
- return "UNKNOWN";
260
+ return 'UNKNOWN';
222
261
  }
223
262
  }
224
263
  exports.encodingOptionsPresetToJSON = encodingOptionsPresetToJSON;
@@ -228,24 +267,36 @@ var EgressStatus;
228
267
  EgressStatus[EgressStatus["EGRESS_ACTIVE"] = 1] = "EGRESS_ACTIVE";
229
268
  EgressStatus[EgressStatus["EGRESS_ENDING"] = 2] = "EGRESS_ENDING";
230
269
  EgressStatus[EgressStatus["EGRESS_COMPLETE"] = 3] = "EGRESS_COMPLETE";
270
+ EgressStatus[EgressStatus["EGRESS_FAILED"] = 4] = "EGRESS_FAILED";
271
+ EgressStatus[EgressStatus["EGRESS_ABORTED"] = 5] = "EGRESS_ABORTED";
272
+ EgressStatus[EgressStatus["EGRESS_LIMIT_REACHED"] = 6] = "EGRESS_LIMIT_REACHED";
231
273
  EgressStatus[EgressStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
232
274
  })(EgressStatus = exports.EgressStatus || (exports.EgressStatus = {}));
233
275
  function egressStatusFromJSON(object) {
234
276
  switch (object) {
235
277
  case 0:
236
- case "EGRESS_STARTING":
278
+ case 'EGRESS_STARTING':
237
279
  return EgressStatus.EGRESS_STARTING;
238
280
  case 1:
239
- case "EGRESS_ACTIVE":
281
+ case 'EGRESS_ACTIVE':
240
282
  return EgressStatus.EGRESS_ACTIVE;
241
283
  case 2:
242
- case "EGRESS_ENDING":
284
+ case 'EGRESS_ENDING':
243
285
  return EgressStatus.EGRESS_ENDING;
244
286
  case 3:
245
- case "EGRESS_COMPLETE":
287
+ case 'EGRESS_COMPLETE':
246
288
  return EgressStatus.EGRESS_COMPLETE;
289
+ case 4:
290
+ case 'EGRESS_FAILED':
291
+ return EgressStatus.EGRESS_FAILED;
292
+ case 5:
293
+ case 'EGRESS_ABORTED':
294
+ return EgressStatus.EGRESS_ABORTED;
295
+ case 6:
296
+ case 'EGRESS_LIMIT_REACHED':
297
+ return EgressStatus.EGRESS_LIMIT_REACHED;
247
298
  case -1:
248
- case "UNRECOGNIZED":
299
+ case 'UNRECOGNIZED':
249
300
  default:
250
301
  return EgressStatus.UNRECOGNIZED;
251
302
  }
@@ -254,37 +305,82 @@ exports.egressStatusFromJSON = egressStatusFromJSON;
254
305
  function egressStatusToJSON(object) {
255
306
  switch (object) {
256
307
  case EgressStatus.EGRESS_STARTING:
257
- return "EGRESS_STARTING";
308
+ return 'EGRESS_STARTING';
258
309
  case EgressStatus.EGRESS_ACTIVE:
259
- return "EGRESS_ACTIVE";
310
+ return 'EGRESS_ACTIVE';
260
311
  case EgressStatus.EGRESS_ENDING:
261
- return "EGRESS_ENDING";
312
+ return 'EGRESS_ENDING';
262
313
  case EgressStatus.EGRESS_COMPLETE:
263
- return "EGRESS_COMPLETE";
314
+ return 'EGRESS_COMPLETE';
315
+ case EgressStatus.EGRESS_FAILED:
316
+ return 'EGRESS_FAILED';
317
+ case EgressStatus.EGRESS_ABORTED:
318
+ return 'EGRESS_ABORTED';
319
+ case EgressStatus.EGRESS_LIMIT_REACHED:
320
+ return 'EGRESS_LIMIT_REACHED';
264
321
  default:
265
- return "UNKNOWN";
322
+ return 'UNKNOWN';
266
323
  }
267
324
  }
268
325
  exports.egressStatusToJSON = egressStatusToJSON;
269
- function createBaseWebCompositeEgressRequest() {
326
+ var StreamInfo_Status;
327
+ (function (StreamInfo_Status) {
328
+ StreamInfo_Status[StreamInfo_Status["ACTIVE"] = 0] = "ACTIVE";
329
+ StreamInfo_Status[StreamInfo_Status["FINISHED"] = 1] = "FINISHED";
330
+ StreamInfo_Status[StreamInfo_Status["FAILED"] = 2] = "FAILED";
331
+ StreamInfo_Status[StreamInfo_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
332
+ })(StreamInfo_Status = exports.StreamInfo_Status || (exports.StreamInfo_Status = {}));
333
+ function streamInfo_StatusFromJSON(object) {
334
+ switch (object) {
335
+ case 0:
336
+ case 'ACTIVE':
337
+ return StreamInfo_Status.ACTIVE;
338
+ case 1:
339
+ case 'FINISHED':
340
+ return StreamInfo_Status.FINISHED;
341
+ case 2:
342
+ case 'FAILED':
343
+ return StreamInfo_Status.FAILED;
344
+ case -1:
345
+ case 'UNRECOGNIZED':
346
+ default:
347
+ return StreamInfo_Status.UNRECOGNIZED;
348
+ }
349
+ }
350
+ exports.streamInfo_StatusFromJSON = streamInfo_StatusFromJSON;
351
+ function streamInfo_StatusToJSON(object) {
352
+ switch (object) {
353
+ case StreamInfo_Status.ACTIVE:
354
+ return 'ACTIVE';
355
+ case StreamInfo_Status.FINISHED:
356
+ return 'FINISHED';
357
+ case StreamInfo_Status.FAILED:
358
+ return 'FAILED';
359
+ default:
360
+ return 'UNKNOWN';
361
+ }
362
+ }
363
+ exports.streamInfo_StatusToJSON = streamInfo_StatusToJSON;
364
+ function createBaseRoomCompositeEgressRequest() {
270
365
  return {
271
- roomName: "",
272
- layout: "",
366
+ roomName: '',
367
+ layout: '',
273
368
  audioOnly: false,
274
369
  videoOnly: false,
275
- customBaseUrl: "",
370
+ customBaseUrl: '',
276
371
  file: undefined,
277
372
  stream: undefined,
373
+ segments: undefined,
278
374
  preset: undefined,
279
375
  advanced: undefined,
280
376
  };
281
377
  }
282
- exports.WebCompositeEgressRequest = {
378
+ exports.RoomCompositeEgressRequest = {
283
379
  encode(message, writer = _m0.Writer.create()) {
284
- if (message.roomName !== "") {
380
+ if (message.roomName !== '') {
285
381
  writer.uint32(10).string(message.roomName);
286
382
  }
287
- if (message.layout !== "") {
383
+ if (message.layout !== '') {
288
384
  writer.uint32(18).string(message.layout);
289
385
  }
290
386
  if (message.audioOnly === true) {
@@ -293,7 +389,7 @@ exports.WebCompositeEgressRequest = {
293
389
  if (message.videoOnly === true) {
294
390
  writer.uint32(32).bool(message.videoOnly);
295
391
  }
296
- if (message.customBaseUrl !== "") {
392
+ if (message.customBaseUrl !== '') {
297
393
  writer.uint32(42).string(message.customBaseUrl);
298
394
  }
299
395
  if (message.file !== undefined) {
@@ -302,6 +398,9 @@ exports.WebCompositeEgressRequest = {
302
398
  if (message.stream !== undefined) {
303
399
  exports.StreamOutput.encode(message.stream, writer.uint32(58).fork()).ldelim();
304
400
  }
401
+ if (message.segments !== undefined) {
402
+ exports.SegmentedFileOutput.encode(message.segments, writer.uint32(82).fork()).ldelim();
403
+ }
305
404
  if (message.preset !== undefined) {
306
405
  writer.uint32(64).int32(message.preset);
307
406
  }
@@ -313,7 +412,7 @@ exports.WebCompositeEgressRequest = {
313
412
  decode(input, length) {
314
413
  const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
315
414
  let end = length === undefined ? reader.len : reader.pos + length;
316
- const message = createBaseWebCompositeEgressRequest();
415
+ const message = createBaseRoomCompositeEgressRequest();
317
416
  while (reader.pos < end) {
318
417
  const tag = reader.uint32();
319
418
  switch (tag >>> 3) {
@@ -338,6 +437,9 @@ exports.WebCompositeEgressRequest = {
338
437
  case 7:
339
438
  message.stream = exports.StreamOutput.decode(reader, reader.uint32());
340
439
  break;
440
+ case 10:
441
+ message.segments = exports.SegmentedFileOutput.decode(reader, reader.uint32());
442
+ break;
341
443
  case 8:
342
444
  message.preset = reader.int32();
343
445
  break;
@@ -353,25 +455,16 @@ exports.WebCompositeEgressRequest = {
353
455
  },
354
456
  fromJSON(object) {
355
457
  return {
356
- roomName: isSet(object.roomName) ? String(object.roomName) : "",
357
- layout: isSet(object.layout) ? String(object.layout) : "",
458
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
459
+ layout: isSet(object.layout) ? String(object.layout) : '',
358
460
  audioOnly: isSet(object.audioOnly) ? Boolean(object.audioOnly) : false,
359
461
  videoOnly: isSet(object.videoOnly) ? Boolean(object.videoOnly) : false,
360
- customBaseUrl: isSet(object.customBaseUrl)
361
- ? String(object.customBaseUrl)
362
- : "",
363
- file: isSet(object.file)
364
- ? exports.EncodedFileOutput.fromJSON(object.file)
365
- : undefined,
366
- stream: isSet(object.stream)
367
- ? exports.StreamOutput.fromJSON(object.stream)
368
- : undefined,
369
- preset: isSet(object.preset)
370
- ? encodingOptionsPresetFromJSON(object.preset)
371
- : undefined,
372
- advanced: isSet(object.advanced)
373
- ? exports.EncodingOptions.fromJSON(object.advanced)
374
- : undefined,
462
+ customBaseUrl: isSet(object.customBaseUrl) ? String(object.customBaseUrl) : '',
463
+ file: isSet(object.file) ? exports.EncodedFileOutput.fromJSON(object.file) : undefined,
464
+ stream: isSet(object.stream) ? exports.StreamOutput.fromJSON(object.stream) : undefined,
465
+ segments: isSet(object.segments) ? exports.SegmentedFileOutput.fromJSON(object.segments) : undefined,
466
+ preset: isSet(object.preset) ? encodingOptionsPresetFromJSON(object.preset) : undefined,
467
+ advanced: isSet(object.advanced) ? exports.EncodingOptions.fromJSON(object.advanced) : undefined,
375
468
  };
376
469
  },
377
470
  toJSON(message) {
@@ -380,35 +473,28 @@ exports.WebCompositeEgressRequest = {
380
473
  message.layout !== undefined && (obj.layout = message.layout);
381
474
  message.audioOnly !== undefined && (obj.audioOnly = message.audioOnly);
382
475
  message.videoOnly !== undefined && (obj.videoOnly = message.videoOnly);
383
- message.customBaseUrl !== undefined &&
384
- (obj.customBaseUrl = message.customBaseUrl);
476
+ message.customBaseUrl !== undefined && (obj.customBaseUrl = message.customBaseUrl);
385
477
  message.file !== undefined &&
386
- (obj.file = message.file
387
- ? exports.EncodedFileOutput.toJSON(message.file)
388
- : undefined);
478
+ (obj.file = message.file ? exports.EncodedFileOutput.toJSON(message.file) : undefined);
389
479
  message.stream !== undefined &&
390
- (obj.stream = message.stream
391
- ? exports.StreamOutput.toJSON(message.stream)
392
- : undefined);
480
+ (obj.stream = message.stream ? exports.StreamOutput.toJSON(message.stream) : undefined);
481
+ message.segments !== undefined &&
482
+ (obj.segments = message.segments ? exports.SegmentedFileOutput.toJSON(message.segments) : undefined);
393
483
  message.preset !== undefined &&
394
484
  (obj.preset =
395
- message.preset !== undefined
396
- ? encodingOptionsPresetToJSON(message.preset)
397
- : undefined);
485
+ message.preset !== undefined ? encodingOptionsPresetToJSON(message.preset) : undefined);
398
486
  message.advanced !== undefined &&
399
- (obj.advanced = message.advanced
400
- ? exports.EncodingOptions.toJSON(message.advanced)
401
- : undefined);
487
+ (obj.advanced = message.advanced ? exports.EncodingOptions.toJSON(message.advanced) : undefined);
402
488
  return obj;
403
489
  },
404
490
  fromPartial(object) {
405
491
  var _a, _b, _c, _d, _e, _f;
406
- const message = createBaseWebCompositeEgressRequest();
407
- message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : "";
408
- message.layout = (_b = object.layout) !== null && _b !== void 0 ? _b : "";
492
+ const message = createBaseRoomCompositeEgressRequest();
493
+ message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
494
+ message.layout = (_b = object.layout) !== null && _b !== void 0 ? _b : '';
409
495
  message.audioOnly = (_c = object.audioOnly) !== null && _c !== void 0 ? _c : false;
410
496
  message.videoOnly = (_d = object.videoOnly) !== null && _d !== void 0 ? _d : false;
411
- message.customBaseUrl = (_e = object.customBaseUrl) !== null && _e !== void 0 ? _e : "";
497
+ message.customBaseUrl = (_e = object.customBaseUrl) !== null && _e !== void 0 ? _e : '';
412
498
  message.file =
413
499
  object.file !== undefined && object.file !== null
414
500
  ? exports.EncodedFileOutput.fromPartial(object.file)
@@ -417,6 +503,10 @@ exports.WebCompositeEgressRequest = {
417
503
  object.stream !== undefined && object.stream !== null
418
504
  ? exports.StreamOutput.fromPartial(object.stream)
419
505
  : undefined;
506
+ message.segments =
507
+ object.segments !== undefined && object.segments !== null
508
+ ? exports.SegmentedFileOutput.fromPartial(object.segments)
509
+ : undefined;
420
510
  message.preset = (_f = object.preset) !== null && _f !== void 0 ? _f : undefined;
421
511
  message.advanced =
422
512
  object.advanced !== undefined && object.advanced !== null
@@ -427,24 +517,25 @@ exports.WebCompositeEgressRequest = {
427
517
  };
428
518
  function createBaseTrackCompositeEgressRequest() {
429
519
  return {
430
- roomName: "",
431
- audioTrackId: "",
432
- videoTrackId: "",
520
+ roomName: '',
521
+ audioTrackId: '',
522
+ videoTrackId: '',
433
523
  file: undefined,
434
524
  stream: undefined,
525
+ segments: undefined,
435
526
  preset: undefined,
436
527
  advanced: undefined,
437
528
  };
438
529
  }
439
530
  exports.TrackCompositeEgressRequest = {
440
531
  encode(message, writer = _m0.Writer.create()) {
441
- if (message.roomName !== "") {
532
+ if (message.roomName !== '') {
442
533
  writer.uint32(10).string(message.roomName);
443
534
  }
444
- if (message.audioTrackId !== "") {
535
+ if (message.audioTrackId !== '') {
445
536
  writer.uint32(18).string(message.audioTrackId);
446
537
  }
447
- if (message.videoTrackId !== "") {
538
+ if (message.videoTrackId !== '') {
448
539
  writer.uint32(26).string(message.videoTrackId);
449
540
  }
450
541
  if (message.file !== undefined) {
@@ -453,6 +544,9 @@ exports.TrackCompositeEgressRequest = {
453
544
  if (message.stream !== undefined) {
454
545
  exports.StreamOutput.encode(message.stream, writer.uint32(42).fork()).ldelim();
455
546
  }
547
+ if (message.segments !== undefined) {
548
+ exports.SegmentedFileOutput.encode(message.segments, writer.uint32(66).fork()).ldelim();
549
+ }
456
550
  if (message.preset !== undefined) {
457
551
  writer.uint32(48).int32(message.preset);
458
552
  }
@@ -483,6 +577,9 @@ exports.TrackCompositeEgressRequest = {
483
577
  case 5:
484
578
  message.stream = exports.StreamOutput.decode(reader, reader.uint32());
485
579
  break;
580
+ case 8:
581
+ message.segments = exports.SegmentedFileOutput.decode(reader, reader.uint32());
582
+ break;
486
583
  case 6:
487
584
  message.preset = reader.int32();
488
585
  break;
@@ -498,59 +595,40 @@ exports.TrackCompositeEgressRequest = {
498
595
  },
499
596
  fromJSON(object) {
500
597
  return {
501
- roomName: isSet(object.roomName) ? String(object.roomName) : "",
502
- audioTrackId: isSet(object.audioTrackId)
503
- ? String(object.audioTrackId)
504
- : "",
505
- videoTrackId: isSet(object.videoTrackId)
506
- ? String(object.videoTrackId)
507
- : "",
508
- file: isSet(object.file)
509
- ? exports.EncodedFileOutput.fromJSON(object.file)
510
- : undefined,
511
- stream: isSet(object.stream)
512
- ? exports.StreamOutput.fromJSON(object.stream)
513
- : undefined,
514
- preset: isSet(object.preset)
515
- ? encodingOptionsPresetFromJSON(object.preset)
516
- : undefined,
517
- advanced: isSet(object.advanced)
518
- ? exports.EncodingOptions.fromJSON(object.advanced)
519
- : undefined,
598
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
599
+ audioTrackId: isSet(object.audioTrackId) ? String(object.audioTrackId) : '',
600
+ videoTrackId: isSet(object.videoTrackId) ? String(object.videoTrackId) : '',
601
+ file: isSet(object.file) ? exports.EncodedFileOutput.fromJSON(object.file) : undefined,
602
+ stream: isSet(object.stream) ? exports.StreamOutput.fromJSON(object.stream) : undefined,
603
+ segments: isSet(object.segments) ? exports.SegmentedFileOutput.fromJSON(object.segments) : undefined,
604
+ preset: isSet(object.preset) ? encodingOptionsPresetFromJSON(object.preset) : undefined,
605
+ advanced: isSet(object.advanced) ? exports.EncodingOptions.fromJSON(object.advanced) : undefined,
520
606
  };
521
607
  },
522
608
  toJSON(message) {
523
609
  const obj = {};
524
610
  message.roomName !== undefined && (obj.roomName = message.roomName);
525
- message.audioTrackId !== undefined &&
526
- (obj.audioTrackId = message.audioTrackId);
527
- message.videoTrackId !== undefined &&
528
- (obj.videoTrackId = message.videoTrackId);
611
+ message.audioTrackId !== undefined && (obj.audioTrackId = message.audioTrackId);
612
+ message.videoTrackId !== undefined && (obj.videoTrackId = message.videoTrackId);
529
613
  message.file !== undefined &&
530
- (obj.file = message.file
531
- ? exports.EncodedFileOutput.toJSON(message.file)
532
- : undefined);
614
+ (obj.file = message.file ? exports.EncodedFileOutput.toJSON(message.file) : undefined);
533
615
  message.stream !== undefined &&
534
- (obj.stream = message.stream
535
- ? exports.StreamOutput.toJSON(message.stream)
536
- : undefined);
616
+ (obj.stream = message.stream ? exports.StreamOutput.toJSON(message.stream) : undefined);
617
+ message.segments !== undefined &&
618
+ (obj.segments = message.segments ? exports.SegmentedFileOutput.toJSON(message.segments) : undefined);
537
619
  message.preset !== undefined &&
538
620
  (obj.preset =
539
- message.preset !== undefined
540
- ? encodingOptionsPresetToJSON(message.preset)
541
- : undefined);
621
+ message.preset !== undefined ? encodingOptionsPresetToJSON(message.preset) : undefined);
542
622
  message.advanced !== undefined &&
543
- (obj.advanced = message.advanced
544
- ? exports.EncodingOptions.toJSON(message.advanced)
545
- : undefined);
623
+ (obj.advanced = message.advanced ? exports.EncodingOptions.toJSON(message.advanced) : undefined);
546
624
  return obj;
547
625
  },
548
626
  fromPartial(object) {
549
627
  var _a, _b, _c, _d;
550
628
  const message = createBaseTrackCompositeEgressRequest();
551
- message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : "";
552
- message.audioTrackId = (_b = object.audioTrackId) !== null && _b !== void 0 ? _b : "";
553
- message.videoTrackId = (_c = object.videoTrackId) !== null && _c !== void 0 ? _c : "";
629
+ message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
630
+ message.audioTrackId = (_b = object.audioTrackId) !== null && _b !== void 0 ? _b : '';
631
+ message.videoTrackId = (_c = object.videoTrackId) !== null && _c !== void 0 ? _c : '';
554
632
  message.file =
555
633
  object.file !== undefined && object.file !== null
556
634
  ? exports.EncodedFileOutput.fromPartial(object.file)
@@ -559,6 +637,10 @@ exports.TrackCompositeEgressRequest = {
559
637
  object.stream !== undefined && object.stream !== null
560
638
  ? exports.StreamOutput.fromPartial(object.stream)
561
639
  : undefined;
640
+ message.segments =
641
+ object.segments !== undefined && object.segments !== null
642
+ ? exports.SegmentedFileOutput.fromPartial(object.segments)
643
+ : undefined;
562
644
  message.preset = (_d = object.preset) !== null && _d !== void 0 ? _d : undefined;
563
645
  message.advanced =
564
646
  object.advanced !== undefined && object.advanced !== null
@@ -568,23 +650,18 @@ exports.TrackCompositeEgressRequest = {
568
650
  },
569
651
  };
570
652
  function createBaseTrackEgressRequest() {
571
- return {
572
- roomName: "",
573
- trackId: "",
574
- httpUrl: undefined,
575
- websocketUrl: undefined,
576
- };
653
+ return { roomName: '', trackId: '', file: undefined, websocketUrl: undefined };
577
654
  }
578
655
  exports.TrackEgressRequest = {
579
656
  encode(message, writer = _m0.Writer.create()) {
580
- if (message.roomName !== "") {
657
+ if (message.roomName !== '') {
581
658
  writer.uint32(10).string(message.roomName);
582
659
  }
583
- if (message.trackId !== "") {
660
+ if (message.trackId !== '') {
584
661
  writer.uint32(18).string(message.trackId);
585
662
  }
586
- if (message.httpUrl !== undefined) {
587
- writer.uint32(26).string(message.httpUrl);
663
+ if (message.file !== undefined) {
664
+ exports.DirectFileOutput.encode(message.file, writer.uint32(26).fork()).ldelim();
588
665
  }
589
666
  if (message.websocketUrl !== undefined) {
590
667
  writer.uint32(34).string(message.websocketUrl);
@@ -605,7 +682,7 @@ exports.TrackEgressRequest = {
605
682
  message.trackId = reader.string();
606
683
  break;
607
684
  case 3:
608
- message.httpUrl = reader.string();
685
+ message.file = exports.DirectFileOutput.decode(reader, reader.uint32());
609
686
  break;
610
687
  case 4:
611
688
  message.websocketUrl = reader.string();
@@ -619,48 +696,43 @@ exports.TrackEgressRequest = {
619
696
  },
620
697
  fromJSON(object) {
621
698
  return {
622
- roomName: isSet(object.roomName) ? String(object.roomName) : "",
623
- trackId: isSet(object.trackId) ? String(object.trackId) : "",
624
- httpUrl: isSet(object.httpUrl) ? String(object.httpUrl) : undefined,
625
- websocketUrl: isSet(object.websocketUrl)
626
- ? String(object.websocketUrl)
627
- : undefined,
699
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
700
+ trackId: isSet(object.trackId) ? String(object.trackId) : '',
701
+ file: isSet(object.file) ? exports.DirectFileOutput.fromJSON(object.file) : undefined,
702
+ websocketUrl: isSet(object.websocketUrl) ? String(object.websocketUrl) : undefined,
628
703
  };
629
704
  },
630
705
  toJSON(message) {
631
706
  const obj = {};
632
707
  message.roomName !== undefined && (obj.roomName = message.roomName);
633
708
  message.trackId !== undefined && (obj.trackId = message.trackId);
634
- message.httpUrl !== undefined && (obj.httpUrl = message.httpUrl);
635
- message.websocketUrl !== undefined &&
636
- (obj.websocketUrl = message.websocketUrl);
709
+ message.file !== undefined &&
710
+ (obj.file = message.file ? exports.DirectFileOutput.toJSON(message.file) : undefined);
711
+ message.websocketUrl !== undefined && (obj.websocketUrl = message.websocketUrl);
637
712
  return obj;
638
713
  },
639
714
  fromPartial(object) {
640
- var _a, _b, _c, _d;
715
+ var _a, _b, _c;
641
716
  const message = createBaseTrackEgressRequest();
642
- message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : "";
643
- message.trackId = (_b = object.trackId) !== null && _b !== void 0 ? _b : "";
644
- message.httpUrl = (_c = object.httpUrl) !== null && _c !== void 0 ? _c : undefined;
645
- message.websocketUrl = (_d = object.websocketUrl) !== null && _d !== void 0 ? _d : undefined;
717
+ message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
718
+ message.trackId = (_b = object.trackId) !== null && _b !== void 0 ? _b : '';
719
+ message.file =
720
+ object.file !== undefined && object.file !== null
721
+ ? exports.DirectFileOutput.fromPartial(object.file)
722
+ : undefined;
723
+ message.websocketUrl = (_c = object.websocketUrl) !== null && _c !== void 0 ? _c : undefined;
646
724
  return message;
647
725
  },
648
726
  };
649
727
  function createBaseEncodedFileOutput() {
650
- return {
651
- fileType: 0,
652
- filepath: "",
653
- s3: undefined,
654
- gcp: undefined,
655
- azure: undefined,
656
- };
728
+ return { fileType: 0, filepath: '', s3: undefined, gcp: undefined, azure: undefined };
657
729
  }
658
730
  exports.EncodedFileOutput = {
659
731
  encode(message, writer = _m0.Writer.create()) {
660
732
  if (message.fileType !== 0) {
661
733
  writer.uint32(8).int32(message.fileType);
662
734
  }
663
- if (message.filepath !== "") {
735
+ if (message.filepath !== '') {
664
736
  writer.uint32(18).string(message.filepath);
665
737
  }
666
738
  if (message.s3 !== undefined) {
@@ -705,41 +777,228 @@ exports.EncodedFileOutput = {
705
777
  },
706
778
  fromJSON(object) {
707
779
  return {
708
- fileType: isSet(object.fileType)
709
- ? encodedFileTypeFromJSON(object.fileType)
710
- : 0,
711
- filepath: isSet(object.filepath) ? String(object.filepath) : "",
780
+ fileType: isSet(object.fileType) ? encodedFileTypeFromJSON(object.fileType) : 0,
781
+ filepath: isSet(object.filepath) ? String(object.filepath) : '',
712
782
  s3: isSet(object.s3) ? exports.S3Upload.fromJSON(object.s3) : undefined,
713
783
  gcp: isSet(object.gcp) ? exports.GCPUpload.fromJSON(object.gcp) : undefined,
714
- azure: isSet(object.azure)
715
- ? exports.AzureBlobUpload.fromJSON(object.azure)
716
- : undefined,
784
+ azure: isSet(object.azure) ? exports.AzureBlobUpload.fromJSON(object.azure) : undefined,
717
785
  };
718
786
  },
719
787
  toJSON(message) {
720
788
  const obj = {};
721
- message.fileType !== undefined &&
722
- (obj.fileType = encodedFileTypeToJSON(message.fileType));
789
+ message.fileType !== undefined && (obj.fileType = encodedFileTypeToJSON(message.fileType));
723
790
  message.filepath !== undefined && (obj.filepath = message.filepath);
724
- message.s3 !== undefined &&
725
- (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
791
+ message.s3 !== undefined && (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
726
792
  message.gcp !== undefined &&
727
793
  (obj.gcp = message.gcp ? exports.GCPUpload.toJSON(message.gcp) : undefined);
728
794
  message.azure !== undefined &&
729
- (obj.azure = message.azure
730
- ? exports.AzureBlobUpload.toJSON(message.azure)
731
- : undefined);
795
+ (obj.azure = message.azure ? exports.AzureBlobUpload.toJSON(message.azure) : undefined);
732
796
  return obj;
733
797
  },
734
798
  fromPartial(object) {
735
799
  var _a, _b;
736
800
  const message = createBaseEncodedFileOutput();
737
801
  message.fileType = (_a = object.fileType) !== null && _a !== void 0 ? _a : 0;
738
- message.filepath = (_b = object.filepath) !== null && _b !== void 0 ? _b : "";
802
+ message.filepath = (_b = object.filepath) !== null && _b !== void 0 ? _b : '';
739
803
  message.s3 =
740
- object.s3 !== undefined && object.s3 !== null
741
- ? exports.S3Upload.fromPartial(object.s3)
804
+ object.s3 !== undefined && object.s3 !== null ? exports.S3Upload.fromPartial(object.s3) : undefined;
805
+ message.gcp =
806
+ object.gcp !== undefined && object.gcp !== null
807
+ ? exports.GCPUpload.fromPartial(object.gcp)
808
+ : undefined;
809
+ message.azure =
810
+ object.azure !== undefined && object.azure !== null
811
+ ? exports.AzureBlobUpload.fromPartial(object.azure)
742
812
  : undefined;
813
+ return message;
814
+ },
815
+ };
816
+ function createBaseSegmentedFileOutput() {
817
+ return {
818
+ protocol: 0,
819
+ filenamePrefix: '',
820
+ playlistName: '',
821
+ segmentDuration: 0,
822
+ s3: undefined,
823
+ gcp: undefined,
824
+ azure: undefined,
825
+ };
826
+ }
827
+ exports.SegmentedFileOutput = {
828
+ encode(message, writer = _m0.Writer.create()) {
829
+ if (message.protocol !== 0) {
830
+ writer.uint32(8).int32(message.protocol);
831
+ }
832
+ if (message.filenamePrefix !== '') {
833
+ writer.uint32(18).string(message.filenamePrefix);
834
+ }
835
+ if (message.playlistName !== '') {
836
+ writer.uint32(26).string(message.playlistName);
837
+ }
838
+ if (message.segmentDuration !== 0) {
839
+ writer.uint32(32).uint32(message.segmentDuration);
840
+ }
841
+ if (message.s3 !== undefined) {
842
+ exports.S3Upload.encode(message.s3, writer.uint32(42).fork()).ldelim();
843
+ }
844
+ if (message.gcp !== undefined) {
845
+ exports.GCPUpload.encode(message.gcp, writer.uint32(50).fork()).ldelim();
846
+ }
847
+ if (message.azure !== undefined) {
848
+ exports.AzureBlobUpload.encode(message.azure, writer.uint32(58).fork()).ldelim();
849
+ }
850
+ return writer;
851
+ },
852
+ decode(input, length) {
853
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
854
+ let end = length === undefined ? reader.len : reader.pos + length;
855
+ const message = createBaseSegmentedFileOutput();
856
+ while (reader.pos < end) {
857
+ const tag = reader.uint32();
858
+ switch (tag >>> 3) {
859
+ case 1:
860
+ message.protocol = reader.int32();
861
+ break;
862
+ case 2:
863
+ message.filenamePrefix = reader.string();
864
+ break;
865
+ case 3:
866
+ message.playlistName = reader.string();
867
+ break;
868
+ case 4:
869
+ message.segmentDuration = reader.uint32();
870
+ break;
871
+ case 5:
872
+ message.s3 = exports.S3Upload.decode(reader, reader.uint32());
873
+ break;
874
+ case 6:
875
+ message.gcp = exports.GCPUpload.decode(reader, reader.uint32());
876
+ break;
877
+ case 7:
878
+ message.azure = exports.AzureBlobUpload.decode(reader, reader.uint32());
879
+ break;
880
+ default:
881
+ reader.skipType(tag & 7);
882
+ break;
883
+ }
884
+ }
885
+ return message;
886
+ },
887
+ fromJSON(object) {
888
+ return {
889
+ protocol: isSet(object.protocol) ? segmentedFileProtocolFromJSON(object.protocol) : 0,
890
+ filenamePrefix: isSet(object.filenamePrefix) ? String(object.filenamePrefix) : '',
891
+ playlistName: isSet(object.playlistName) ? String(object.playlistName) : '',
892
+ segmentDuration: isSet(object.segmentDuration) ? Number(object.segmentDuration) : 0,
893
+ s3: isSet(object.s3) ? exports.S3Upload.fromJSON(object.s3) : undefined,
894
+ gcp: isSet(object.gcp) ? exports.GCPUpload.fromJSON(object.gcp) : undefined,
895
+ azure: isSet(object.azure) ? exports.AzureBlobUpload.fromJSON(object.azure) : undefined,
896
+ };
897
+ },
898
+ toJSON(message) {
899
+ const obj = {};
900
+ message.protocol !== undefined &&
901
+ (obj.protocol = segmentedFileProtocolToJSON(message.protocol));
902
+ message.filenamePrefix !== undefined && (obj.filenamePrefix = message.filenamePrefix);
903
+ message.playlistName !== undefined && (obj.playlistName = message.playlistName);
904
+ message.segmentDuration !== undefined &&
905
+ (obj.segmentDuration = Math.round(message.segmentDuration));
906
+ message.s3 !== undefined && (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
907
+ message.gcp !== undefined &&
908
+ (obj.gcp = message.gcp ? exports.GCPUpload.toJSON(message.gcp) : undefined);
909
+ message.azure !== undefined &&
910
+ (obj.azure = message.azure ? exports.AzureBlobUpload.toJSON(message.azure) : undefined);
911
+ return obj;
912
+ },
913
+ fromPartial(object) {
914
+ var _a, _b, _c, _d;
915
+ const message = createBaseSegmentedFileOutput();
916
+ message.protocol = (_a = object.protocol) !== null && _a !== void 0 ? _a : 0;
917
+ message.filenamePrefix = (_b = object.filenamePrefix) !== null && _b !== void 0 ? _b : '';
918
+ message.playlistName = (_c = object.playlistName) !== null && _c !== void 0 ? _c : '';
919
+ message.segmentDuration = (_d = object.segmentDuration) !== null && _d !== void 0 ? _d : 0;
920
+ message.s3 =
921
+ object.s3 !== undefined && object.s3 !== null ? exports.S3Upload.fromPartial(object.s3) : undefined;
922
+ message.gcp =
923
+ object.gcp !== undefined && object.gcp !== null
924
+ ? exports.GCPUpload.fromPartial(object.gcp)
925
+ : undefined;
926
+ message.azure =
927
+ object.azure !== undefined && object.azure !== null
928
+ ? exports.AzureBlobUpload.fromPartial(object.azure)
929
+ : undefined;
930
+ return message;
931
+ },
932
+ };
933
+ function createBaseDirectFileOutput() {
934
+ return { filepath: '', s3: undefined, gcp: undefined, azure: undefined };
935
+ }
936
+ exports.DirectFileOutput = {
937
+ encode(message, writer = _m0.Writer.create()) {
938
+ if (message.filepath !== '') {
939
+ writer.uint32(10).string(message.filepath);
940
+ }
941
+ if (message.s3 !== undefined) {
942
+ exports.S3Upload.encode(message.s3, writer.uint32(18).fork()).ldelim();
943
+ }
944
+ if (message.gcp !== undefined) {
945
+ exports.GCPUpload.encode(message.gcp, writer.uint32(26).fork()).ldelim();
946
+ }
947
+ if (message.azure !== undefined) {
948
+ exports.AzureBlobUpload.encode(message.azure, writer.uint32(34).fork()).ldelim();
949
+ }
950
+ return writer;
951
+ },
952
+ decode(input, length) {
953
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
954
+ let end = length === undefined ? reader.len : reader.pos + length;
955
+ const message = createBaseDirectFileOutput();
956
+ while (reader.pos < end) {
957
+ const tag = reader.uint32();
958
+ switch (tag >>> 3) {
959
+ case 1:
960
+ message.filepath = reader.string();
961
+ break;
962
+ case 2:
963
+ message.s3 = exports.S3Upload.decode(reader, reader.uint32());
964
+ break;
965
+ case 3:
966
+ message.gcp = exports.GCPUpload.decode(reader, reader.uint32());
967
+ break;
968
+ case 4:
969
+ message.azure = exports.AzureBlobUpload.decode(reader, reader.uint32());
970
+ break;
971
+ default:
972
+ reader.skipType(tag & 7);
973
+ break;
974
+ }
975
+ }
976
+ return message;
977
+ },
978
+ fromJSON(object) {
979
+ return {
980
+ filepath: isSet(object.filepath) ? String(object.filepath) : '',
981
+ s3: isSet(object.s3) ? exports.S3Upload.fromJSON(object.s3) : undefined,
982
+ gcp: isSet(object.gcp) ? exports.GCPUpload.fromJSON(object.gcp) : undefined,
983
+ azure: isSet(object.azure) ? exports.AzureBlobUpload.fromJSON(object.azure) : undefined,
984
+ };
985
+ },
986
+ toJSON(message) {
987
+ const obj = {};
988
+ message.filepath !== undefined && (obj.filepath = message.filepath);
989
+ message.s3 !== undefined && (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
990
+ message.gcp !== undefined &&
991
+ (obj.gcp = message.gcp ? exports.GCPUpload.toJSON(message.gcp) : undefined);
992
+ message.azure !== undefined &&
993
+ (obj.azure = message.azure ? exports.AzureBlobUpload.toJSON(message.azure) : undefined);
994
+ return obj;
995
+ },
996
+ fromPartial(object) {
997
+ var _a;
998
+ const message = createBaseDirectFileOutput();
999
+ message.filepath = (_a = object.filepath) !== null && _a !== void 0 ? _a : '';
1000
+ message.s3 =
1001
+ object.s3 !== undefined && object.s3 !== null ? exports.S3Upload.fromPartial(object.s3) : undefined;
743
1002
  message.gcp =
744
1003
  object.gcp !== undefined && object.gcp !== null
745
1004
  ? exports.GCPUpload.fromPartial(object.gcp)
@@ -752,23 +1011,23 @@ exports.EncodedFileOutput = {
752
1011
  },
753
1012
  };
754
1013
  function createBaseS3Upload() {
755
- return { accessKey: "", secret: "", region: "", endpoint: "", bucket: "" };
1014
+ return { accessKey: '', secret: '', region: '', endpoint: '', bucket: '' };
756
1015
  }
757
1016
  exports.S3Upload = {
758
1017
  encode(message, writer = _m0.Writer.create()) {
759
- if (message.accessKey !== "") {
1018
+ if (message.accessKey !== '') {
760
1019
  writer.uint32(10).string(message.accessKey);
761
1020
  }
762
- if (message.secret !== "") {
1021
+ if (message.secret !== '') {
763
1022
  writer.uint32(18).string(message.secret);
764
1023
  }
765
- if (message.region !== "") {
1024
+ if (message.region !== '') {
766
1025
  writer.uint32(26).string(message.region);
767
1026
  }
768
- if (message.endpoint !== "") {
1027
+ if (message.endpoint !== '') {
769
1028
  writer.uint32(34).string(message.endpoint);
770
1029
  }
771
- if (message.bucket !== "") {
1030
+ if (message.bucket !== '') {
772
1031
  writer.uint32(42).string(message.bucket);
773
1032
  }
774
1033
  return writer;
@@ -804,11 +1063,11 @@ exports.S3Upload = {
804
1063
  },
805
1064
  fromJSON(object) {
806
1065
  return {
807
- accessKey: isSet(object.accessKey) ? String(object.accessKey) : "",
808
- secret: isSet(object.secret) ? String(object.secret) : "",
809
- region: isSet(object.region) ? String(object.region) : "",
810
- endpoint: isSet(object.endpoint) ? String(object.endpoint) : "",
811
- bucket: isSet(object.bucket) ? String(object.bucket) : "",
1066
+ accessKey: isSet(object.accessKey) ? String(object.accessKey) : '',
1067
+ secret: isSet(object.secret) ? String(object.secret) : '',
1068
+ region: isSet(object.region) ? String(object.region) : '',
1069
+ endpoint: isSet(object.endpoint) ? String(object.endpoint) : '',
1070
+ bucket: isSet(object.bucket) ? String(object.bucket) : '',
812
1071
  };
813
1072
  },
814
1073
  toJSON(message) {
@@ -823,23 +1082,23 @@ exports.S3Upload = {
823
1082
  fromPartial(object) {
824
1083
  var _a, _b, _c, _d, _e;
825
1084
  const message = createBaseS3Upload();
826
- message.accessKey = (_a = object.accessKey) !== null && _a !== void 0 ? _a : "";
827
- message.secret = (_b = object.secret) !== null && _b !== void 0 ? _b : "";
828
- message.region = (_c = object.region) !== null && _c !== void 0 ? _c : "";
829
- message.endpoint = (_d = object.endpoint) !== null && _d !== void 0 ? _d : "";
830
- message.bucket = (_e = object.bucket) !== null && _e !== void 0 ? _e : "";
1085
+ message.accessKey = (_a = object.accessKey) !== null && _a !== void 0 ? _a : '';
1086
+ message.secret = (_b = object.secret) !== null && _b !== void 0 ? _b : '';
1087
+ message.region = (_c = object.region) !== null && _c !== void 0 ? _c : '';
1088
+ message.endpoint = (_d = object.endpoint) !== null && _d !== void 0 ? _d : '';
1089
+ message.bucket = (_e = object.bucket) !== null && _e !== void 0 ? _e : '';
831
1090
  return message;
832
1091
  },
833
1092
  };
834
1093
  function createBaseGCPUpload() {
835
- return { credentials: new Uint8Array(), bucket: "" };
1094
+ return { credentials: new Uint8Array(), bucket: '' };
836
1095
  }
837
1096
  exports.GCPUpload = {
838
1097
  encode(message, writer = _m0.Writer.create()) {
839
1098
  if (message.credentials.length !== 0) {
840
1099
  writer.uint32(10).bytes(message.credentials);
841
1100
  }
842
- if (message.bucket !== "") {
1101
+ if (message.bucket !== '') {
843
1102
  writer.uint32(18).string(message.bucket);
844
1103
  }
845
1104
  return writer;
@@ -869,15 +1128,13 @@ exports.GCPUpload = {
869
1128
  credentials: isSet(object.credentials)
870
1129
  ? bytesFromBase64(object.credentials)
871
1130
  : new Uint8Array(),
872
- bucket: isSet(object.bucket) ? String(object.bucket) : "",
1131
+ bucket: isSet(object.bucket) ? String(object.bucket) : '',
873
1132
  };
874
1133
  },
875
1134
  toJSON(message) {
876
1135
  const obj = {};
877
1136
  message.credentials !== undefined &&
878
- (obj.credentials = base64FromBytes(message.credentials !== undefined
879
- ? message.credentials
880
- : new Uint8Array()));
1137
+ (obj.credentials = base64FromBytes(message.credentials !== undefined ? message.credentials : new Uint8Array()));
881
1138
  message.bucket !== undefined && (obj.bucket = message.bucket);
882
1139
  return obj;
883
1140
  },
@@ -885,22 +1142,22 @@ exports.GCPUpload = {
885
1142
  var _a, _b;
886
1143
  const message = createBaseGCPUpload();
887
1144
  message.credentials = (_a = object.credentials) !== null && _a !== void 0 ? _a : new Uint8Array();
888
- message.bucket = (_b = object.bucket) !== null && _b !== void 0 ? _b : "";
1145
+ message.bucket = (_b = object.bucket) !== null && _b !== void 0 ? _b : '';
889
1146
  return message;
890
1147
  },
891
1148
  };
892
1149
  function createBaseAzureBlobUpload() {
893
- return { accountName: "", accountKey: "", containerName: "" };
1150
+ return { accountName: '', accountKey: '', containerName: '' };
894
1151
  }
895
1152
  exports.AzureBlobUpload = {
896
1153
  encode(message, writer = _m0.Writer.create()) {
897
- if (message.accountName !== "") {
1154
+ if (message.accountName !== '') {
898
1155
  writer.uint32(10).string(message.accountName);
899
1156
  }
900
- if (message.accountKey !== "") {
1157
+ if (message.accountKey !== '') {
901
1158
  writer.uint32(18).string(message.accountKey);
902
1159
  }
903
- if (message.containerName !== "") {
1160
+ if (message.containerName !== '') {
904
1161
  writer.uint32(26).string(message.containerName);
905
1162
  }
906
1163
  return writer;
@@ -930,28 +1187,24 @@ exports.AzureBlobUpload = {
930
1187
  },
931
1188
  fromJSON(object) {
932
1189
  return {
933
- accountName: isSet(object.accountName) ? String(object.accountName) : "",
934
- accountKey: isSet(object.accountKey) ? String(object.accountKey) : "",
935
- containerName: isSet(object.containerName)
936
- ? String(object.containerName)
937
- : "",
1190
+ accountName: isSet(object.accountName) ? String(object.accountName) : '',
1191
+ accountKey: isSet(object.accountKey) ? String(object.accountKey) : '',
1192
+ containerName: isSet(object.containerName) ? String(object.containerName) : '',
938
1193
  };
939
1194
  },
940
1195
  toJSON(message) {
941
1196
  const obj = {};
942
- message.accountName !== undefined &&
943
- (obj.accountName = message.accountName);
1197
+ message.accountName !== undefined && (obj.accountName = message.accountName);
944
1198
  message.accountKey !== undefined && (obj.accountKey = message.accountKey);
945
- message.containerName !== undefined &&
946
- (obj.containerName = message.containerName);
1199
+ message.containerName !== undefined && (obj.containerName = message.containerName);
947
1200
  return obj;
948
1201
  },
949
1202
  fromPartial(object) {
950
1203
  var _a, _b, _c;
951
1204
  const message = createBaseAzureBlobUpload();
952
- message.accountName = (_a = object.accountName) !== null && _a !== void 0 ? _a : "";
953
- message.accountKey = (_b = object.accountKey) !== null && _b !== void 0 ? _b : "";
954
- message.containerName = (_c = object.containerName) !== null && _c !== void 0 ? _c : "";
1205
+ message.accountName = (_a = object.accountName) !== null && _a !== void 0 ? _a : '';
1206
+ message.accountKey = (_b = object.accountKey) !== null && _b !== void 0 ? _b : '';
1207
+ message.containerName = (_c = object.containerName) !== null && _c !== void 0 ? _c : '';
955
1208
  return message;
956
1209
  },
957
1210
  };
@@ -990,18 +1243,13 @@ exports.StreamOutput = {
990
1243
  },
991
1244
  fromJSON(object) {
992
1245
  return {
993
- protocol: isSet(object.protocol)
994
- ? streamProtocolFromJSON(object.protocol)
995
- : 0,
996
- urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls)
997
- ? object.urls.map((e) => String(e))
998
- : [],
1246
+ protocol: isSet(object.protocol) ? streamProtocolFromJSON(object.protocol) : 0,
1247
+ urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls) ? object.urls.map((e) => String(e)) : [],
999
1248
  };
1000
1249
  },
1001
1250
  toJSON(message) {
1002
1251
  const obj = {};
1003
- message.protocol !== undefined &&
1004
- (obj.protocol = streamProtocolToJSON(message.protocol));
1252
+ message.protocol !== undefined && (obj.protocol = streamProtocolToJSON(message.protocol));
1005
1253
  if (message.urls) {
1006
1254
  obj.urls = message.urls.map((e) => e);
1007
1255
  }
@@ -1109,21 +1357,11 @@ exports.EncodingOptions = {
1109
1357
  height: isSet(object.height) ? Number(object.height) : 0,
1110
1358
  depth: isSet(object.depth) ? Number(object.depth) : 0,
1111
1359
  framerate: isSet(object.framerate) ? Number(object.framerate) : 0,
1112
- audioCodec: isSet(object.audioCodec)
1113
- ? audioCodecFromJSON(object.audioCodec)
1114
- : 0,
1115
- audioBitrate: isSet(object.audioBitrate)
1116
- ? Number(object.audioBitrate)
1117
- : 0,
1118
- audioFrequency: isSet(object.audioFrequency)
1119
- ? Number(object.audioFrequency)
1120
- : 0,
1121
- videoCodec: isSet(object.videoCodec)
1122
- ? videoCodecFromJSON(object.videoCodec)
1123
- : 0,
1124
- videoBitrate: isSet(object.videoBitrate)
1125
- ? Number(object.videoBitrate)
1126
- : 0,
1360
+ audioCodec: isSet(object.audioCodec) ? audioCodecFromJSON(object.audioCodec) : 0,
1361
+ audioBitrate: isSet(object.audioBitrate) ? Number(object.audioBitrate) : 0,
1362
+ audioFrequency: isSet(object.audioFrequency) ? Number(object.audioFrequency) : 0,
1363
+ videoCodec: isSet(object.videoCodec) ? videoCodecFromJSON(object.videoCodec) : 0,
1364
+ videoBitrate: isSet(object.videoBitrate) ? Number(object.videoBitrate) : 0,
1127
1365
  };
1128
1366
  },
1129
1367
  toJSON(message) {
@@ -1131,18 +1369,13 @@ exports.EncodingOptions = {
1131
1369
  message.width !== undefined && (obj.width = Math.round(message.width));
1132
1370
  message.height !== undefined && (obj.height = Math.round(message.height));
1133
1371
  message.depth !== undefined && (obj.depth = Math.round(message.depth));
1134
- message.framerate !== undefined &&
1135
- (obj.framerate = Math.round(message.framerate));
1136
- message.audioCodec !== undefined &&
1137
- (obj.audioCodec = audioCodecToJSON(message.audioCodec));
1138
- message.audioBitrate !== undefined &&
1139
- (obj.audioBitrate = Math.round(message.audioBitrate));
1372
+ message.framerate !== undefined && (obj.framerate = Math.round(message.framerate));
1373
+ message.audioCodec !== undefined && (obj.audioCodec = audioCodecToJSON(message.audioCodec));
1374
+ message.audioBitrate !== undefined && (obj.audioBitrate = Math.round(message.audioBitrate));
1140
1375
  message.audioFrequency !== undefined &&
1141
1376
  (obj.audioFrequency = Math.round(message.audioFrequency));
1142
- message.videoCodec !== undefined &&
1143
- (obj.videoCodec = videoCodecToJSON(message.videoCodec));
1144
- message.videoBitrate !== undefined &&
1145
- (obj.videoBitrate = Math.round(message.videoBitrate));
1377
+ message.videoCodec !== undefined && (obj.videoCodec = videoCodecToJSON(message.videoCodec));
1378
+ message.videoBitrate !== undefined && (obj.videoBitrate = Math.round(message.videoBitrate));
1146
1379
  return obj;
1147
1380
  },
1148
1381
  fromPartial(object) {
@@ -1161,14 +1394,14 @@ exports.EncodingOptions = {
1161
1394
  },
1162
1395
  };
1163
1396
  function createBaseUpdateLayoutRequest() {
1164
- return { egressId: "", layout: "" };
1397
+ return { egressId: '', layout: '' };
1165
1398
  }
1166
1399
  exports.UpdateLayoutRequest = {
1167
1400
  encode(message, writer = _m0.Writer.create()) {
1168
- if (message.egressId !== "") {
1401
+ if (message.egressId !== '') {
1169
1402
  writer.uint32(10).string(message.egressId);
1170
1403
  }
1171
- if (message.layout !== "") {
1404
+ if (message.layout !== '') {
1172
1405
  writer.uint32(18).string(message.layout);
1173
1406
  }
1174
1407
  return writer;
@@ -1195,8 +1428,8 @@ exports.UpdateLayoutRequest = {
1195
1428
  },
1196
1429
  fromJSON(object) {
1197
1430
  return {
1198
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1199
- layout: isSet(object.layout) ? String(object.layout) : "",
1431
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1432
+ layout: isSet(object.layout) ? String(object.layout) : '',
1200
1433
  };
1201
1434
  },
1202
1435
  toJSON(message) {
@@ -1208,17 +1441,17 @@ exports.UpdateLayoutRequest = {
1208
1441
  fromPartial(object) {
1209
1442
  var _a, _b;
1210
1443
  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 : "";
1444
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1445
+ message.layout = (_b = object.layout) !== null && _b !== void 0 ? _b : '';
1213
1446
  return message;
1214
1447
  },
1215
1448
  };
1216
1449
  function createBaseUpdateStreamRequest() {
1217
- return { egressId: "", addOutputUrls: [], removeOutputUrls: [] };
1450
+ return { egressId: '', addOutputUrls: [], removeOutputUrls: [] };
1218
1451
  }
1219
1452
  exports.UpdateStreamRequest = {
1220
1453
  encode(message, writer = _m0.Writer.create()) {
1221
- if (message.egressId !== "") {
1454
+ if (message.egressId !== '') {
1222
1455
  writer.uint32(10).string(message.egressId);
1223
1456
  }
1224
1457
  for (const v of message.addOutputUrls) {
@@ -1254,7 +1487,7 @@ exports.UpdateStreamRequest = {
1254
1487
  },
1255
1488
  fromJSON(object) {
1256
1489
  return {
1257
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1490
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1258
1491
  addOutputUrls: Array.isArray(object === null || object === void 0 ? void 0 : object.addOutputUrls)
1259
1492
  ? object.addOutputUrls.map((e) => String(e))
1260
1493
  : [],
@@ -1283,18 +1516,18 @@ exports.UpdateStreamRequest = {
1283
1516
  fromPartial(object) {
1284
1517
  var _a, _b, _c;
1285
1518
  const message = createBaseUpdateStreamRequest();
1286
- message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : "";
1519
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1287
1520
  message.addOutputUrls = ((_b = object.addOutputUrls) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
1288
1521
  message.removeOutputUrls = ((_c = object.removeOutputUrls) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
1289
1522
  return message;
1290
1523
  },
1291
1524
  };
1292
1525
  function createBaseListEgressRequest() {
1293
- return { roomName: "" };
1526
+ return { roomName: '' };
1294
1527
  }
1295
1528
  exports.ListEgressRequest = {
1296
1529
  encode(message, writer = _m0.Writer.create()) {
1297
- if (message.roomName !== "") {
1530
+ if (message.roomName !== '') {
1298
1531
  writer.uint32(10).string(message.roomName);
1299
1532
  }
1300
1533
  return writer;
@@ -1318,7 +1551,7 @@ exports.ListEgressRequest = {
1318
1551
  },
1319
1552
  fromJSON(object) {
1320
1553
  return {
1321
- roomName: isSet(object.roomName) ? String(object.roomName) : "",
1554
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
1322
1555
  };
1323
1556
  },
1324
1557
  toJSON(message) {
@@ -1329,7 +1562,7 @@ exports.ListEgressRequest = {
1329
1562
  fromPartial(object) {
1330
1563
  var _a;
1331
1564
  const message = createBaseListEgressRequest();
1332
- message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : "";
1565
+ message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
1333
1566
  return message;
1334
1567
  },
1335
1568
  };
@@ -1370,7 +1603,7 @@ exports.ListEgressResponse = {
1370
1603
  toJSON(message) {
1371
1604
  const obj = {};
1372
1605
  if (message.items) {
1373
- obj.items = message.items.map((e) => e ? exports.EgressInfo.toJSON(e) : undefined);
1606
+ obj.items = message.items.map((e) => (e ? exports.EgressInfo.toJSON(e) : undefined));
1374
1607
  }
1375
1608
  else {
1376
1609
  obj.items = [];
@@ -1385,11 +1618,11 @@ exports.ListEgressResponse = {
1385
1618
  },
1386
1619
  };
1387
1620
  function createBaseStopEgressRequest() {
1388
- return { egressId: "" };
1621
+ return { egressId: '' };
1389
1622
  }
1390
1623
  exports.StopEgressRequest = {
1391
1624
  encode(message, writer = _m0.Writer.create()) {
1392
- if (message.egressId !== "") {
1625
+ if (message.egressId !== '') {
1393
1626
  writer.uint32(10).string(message.egressId);
1394
1627
  }
1395
1628
  return writer;
@@ -1413,7 +1646,7 @@ exports.StopEgressRequest = {
1413
1646
  },
1414
1647
  fromJSON(object) {
1415
1648
  return {
1416
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1649
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1417
1650
  };
1418
1651
  },
1419
1652
  toJSON(message) {
@@ -1424,36 +1657,52 @@ exports.StopEgressRequest = {
1424
1657
  fromPartial(object) {
1425
1658
  var _a;
1426
1659
  const message = createBaseStopEgressRequest();
1427
- message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : "";
1660
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1428
1661
  return message;
1429
1662
  },
1430
1663
  };
1431
1664
  function createBaseEgressInfo() {
1432
1665
  return {
1433
- egressId: "",
1434
- roomId: "",
1666
+ egressId: '',
1667
+ roomId: '',
1668
+ roomName: '',
1435
1669
  status: 0,
1436
- webComposite: undefined,
1670
+ startedAt: 0,
1671
+ endedAt: 0,
1672
+ error: '',
1673
+ roomComposite: undefined,
1437
1674
  trackComposite: undefined,
1438
1675
  track: undefined,
1439
1676
  stream: undefined,
1440
1677
  file: undefined,
1441
- error: "",
1678
+ segments: undefined,
1442
1679
  };
1443
1680
  }
1444
1681
  exports.EgressInfo = {
1445
1682
  encode(message, writer = _m0.Writer.create()) {
1446
- if (message.egressId !== "") {
1683
+ if (message.egressId !== '') {
1447
1684
  writer.uint32(10).string(message.egressId);
1448
1685
  }
1449
- if (message.roomId !== "") {
1686
+ if (message.roomId !== '') {
1450
1687
  writer.uint32(18).string(message.roomId);
1451
1688
  }
1689
+ if (message.roomName !== '') {
1690
+ writer.uint32(106).string(message.roomName);
1691
+ }
1452
1692
  if (message.status !== 0) {
1453
1693
  writer.uint32(24).int32(message.status);
1454
1694
  }
1455
- if (message.webComposite !== undefined) {
1456
- exports.WebCompositeEgressRequest.encode(message.webComposite, writer.uint32(34).fork()).ldelim();
1695
+ if (message.startedAt !== 0) {
1696
+ writer.uint32(80).int64(message.startedAt);
1697
+ }
1698
+ if (message.endedAt !== 0) {
1699
+ writer.uint32(88).int64(message.endedAt);
1700
+ }
1701
+ if (message.error !== '') {
1702
+ writer.uint32(74).string(message.error);
1703
+ }
1704
+ if (message.roomComposite !== undefined) {
1705
+ exports.RoomCompositeEgressRequest.encode(message.roomComposite, writer.uint32(34).fork()).ldelim();
1457
1706
  }
1458
1707
  if (message.trackComposite !== undefined) {
1459
1708
  exports.TrackCompositeEgressRequest.encode(message.trackComposite, writer.uint32(42).fork()).ldelim();
@@ -1467,8 +1716,8 @@ exports.EgressInfo = {
1467
1716
  if (message.file !== undefined) {
1468
1717
  exports.FileInfo.encode(message.file, writer.uint32(66).fork()).ldelim();
1469
1718
  }
1470
- if (message.error !== "") {
1471
- writer.uint32(74).string(message.error);
1719
+ if (message.segments !== undefined) {
1720
+ exports.SegmentsInfo.encode(message.segments, writer.uint32(98).fork()).ldelim();
1472
1721
  }
1473
1722
  return writer;
1474
1723
  },
@@ -1485,11 +1734,23 @@ exports.EgressInfo = {
1485
1734
  case 2:
1486
1735
  message.roomId = reader.string();
1487
1736
  break;
1737
+ case 13:
1738
+ message.roomName = reader.string();
1739
+ break;
1488
1740
  case 3:
1489
1741
  message.status = reader.int32();
1490
1742
  break;
1743
+ case 10:
1744
+ message.startedAt = longToNumber(reader.int64());
1745
+ break;
1746
+ case 11:
1747
+ message.endedAt = longToNumber(reader.int64());
1748
+ break;
1749
+ case 9:
1750
+ message.error = reader.string();
1751
+ break;
1491
1752
  case 4:
1492
- message.webComposite = exports.WebCompositeEgressRequest.decode(reader, reader.uint32());
1753
+ message.roomComposite = exports.RoomCompositeEgressRequest.decode(reader, reader.uint32());
1493
1754
  break;
1494
1755
  case 5:
1495
1756
  message.trackComposite = exports.TrackCompositeEgressRequest.decode(reader, reader.uint32());
@@ -1503,8 +1764,8 @@ exports.EgressInfo = {
1503
1764
  case 8:
1504
1765
  message.file = exports.FileInfo.decode(reader, reader.uint32());
1505
1766
  break;
1506
- case 9:
1507
- message.error = reader.string();
1767
+ case 12:
1768
+ message.segments = exports.SegmentsInfo.decode(reader, reader.uint32());
1508
1769
  break;
1509
1770
  default:
1510
1771
  reader.skipType(tag & 7);
@@ -1515,61 +1776,65 @@ exports.EgressInfo = {
1515
1776
  },
1516
1777
  fromJSON(object) {
1517
1778
  return {
1518
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1519
- roomId: isSet(object.roomId) ? String(object.roomId) : "",
1779
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1780
+ roomId: isSet(object.roomId) ? String(object.roomId) : '',
1781
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
1520
1782
  status: isSet(object.status) ? egressStatusFromJSON(object.status) : 0,
1521
- webComposite: isSet(object.webComposite)
1522
- ? exports.WebCompositeEgressRequest.fromJSON(object.webComposite)
1783
+ startedAt: isSet(object.startedAt) ? Number(object.startedAt) : 0,
1784
+ endedAt: isSet(object.endedAt) ? Number(object.endedAt) : 0,
1785
+ error: isSet(object.error) ? String(object.error) : '',
1786
+ roomComposite: isSet(object.roomComposite)
1787
+ ? exports.RoomCompositeEgressRequest.fromJSON(object.roomComposite)
1523
1788
  : undefined,
1524
1789
  trackComposite: isSet(object.trackComposite)
1525
1790
  ? exports.TrackCompositeEgressRequest.fromJSON(object.trackComposite)
1526
1791
  : undefined,
1527
- track: isSet(object.track)
1528
- ? exports.TrackEgressRequest.fromJSON(object.track)
1529
- : undefined,
1530
- stream: isSet(object.stream)
1531
- ? exports.StreamInfoList.fromJSON(object.stream)
1532
- : undefined,
1792
+ track: isSet(object.track) ? exports.TrackEgressRequest.fromJSON(object.track) : undefined,
1793
+ stream: isSet(object.stream) ? exports.StreamInfoList.fromJSON(object.stream) : undefined,
1533
1794
  file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
1534
- error: isSet(object.error) ? String(object.error) : "",
1795
+ segments: isSet(object.segments) ? exports.SegmentsInfo.fromJSON(object.segments) : undefined,
1535
1796
  };
1536
1797
  },
1537
1798
  toJSON(message) {
1538
1799
  const obj = {};
1539
1800
  message.egressId !== undefined && (obj.egressId = message.egressId);
1540
1801
  message.roomId !== undefined && (obj.roomId = message.roomId);
1541
- message.status !== undefined &&
1542
- (obj.status = egressStatusToJSON(message.status));
1543
- message.webComposite !== undefined &&
1544
- (obj.webComposite = message.webComposite
1545
- ? exports.WebCompositeEgressRequest.toJSON(message.webComposite)
1802
+ message.roomName !== undefined && (obj.roomName = message.roomName);
1803
+ message.status !== undefined && (obj.status = egressStatusToJSON(message.status));
1804
+ message.startedAt !== undefined && (obj.startedAt = Math.round(message.startedAt));
1805
+ message.endedAt !== undefined && (obj.endedAt = Math.round(message.endedAt));
1806
+ message.error !== undefined && (obj.error = message.error);
1807
+ message.roomComposite !== undefined &&
1808
+ (obj.roomComposite = message.roomComposite
1809
+ ? exports.RoomCompositeEgressRequest.toJSON(message.roomComposite)
1546
1810
  : undefined);
1547
1811
  message.trackComposite !== undefined &&
1548
1812
  (obj.trackComposite = message.trackComposite
1549
1813
  ? exports.TrackCompositeEgressRequest.toJSON(message.trackComposite)
1550
1814
  : undefined);
1551
1815
  message.track !== undefined &&
1552
- (obj.track = message.track
1553
- ? exports.TrackEgressRequest.toJSON(message.track)
1554
- : undefined);
1816
+ (obj.track = message.track ? exports.TrackEgressRequest.toJSON(message.track) : undefined);
1555
1817
  message.stream !== undefined &&
1556
- (obj.stream = message.stream
1557
- ? exports.StreamInfoList.toJSON(message.stream)
1558
- : undefined);
1818
+ (obj.stream = message.stream ? exports.StreamInfoList.toJSON(message.stream) : undefined);
1559
1819
  message.file !== undefined &&
1560
1820
  (obj.file = message.file ? exports.FileInfo.toJSON(message.file) : undefined);
1561
- message.error !== undefined && (obj.error = message.error);
1821
+ message.segments !== undefined &&
1822
+ (obj.segments = message.segments ? exports.SegmentsInfo.toJSON(message.segments) : undefined);
1562
1823
  return obj;
1563
1824
  },
1564
1825
  fromPartial(object) {
1565
- var _a, _b, _c, _d;
1826
+ var _a, _b, _c, _d, _e, _f, _g;
1566
1827
  const message = createBaseEgressInfo();
1567
- message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : "";
1568
- message.roomId = (_b = object.roomId) !== null && _b !== void 0 ? _b : "";
1569
- message.status = (_c = object.status) !== null && _c !== void 0 ? _c : 0;
1570
- message.webComposite =
1571
- object.webComposite !== undefined && object.webComposite !== null
1572
- ? exports.WebCompositeEgressRequest.fromPartial(object.webComposite)
1828
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1829
+ message.roomId = (_b = object.roomId) !== null && _b !== void 0 ? _b : '';
1830
+ message.roomName = (_c = object.roomName) !== null && _c !== void 0 ? _c : '';
1831
+ message.status = (_d = object.status) !== null && _d !== void 0 ? _d : 0;
1832
+ message.startedAt = (_e = object.startedAt) !== null && _e !== void 0 ? _e : 0;
1833
+ message.endedAt = (_f = object.endedAt) !== null && _f !== void 0 ? _f : 0;
1834
+ message.error = (_g = object.error) !== null && _g !== void 0 ? _g : '';
1835
+ message.roomComposite =
1836
+ object.roomComposite !== undefined && object.roomComposite !== null
1837
+ ? exports.RoomCompositeEgressRequest.fromPartial(object.roomComposite)
1573
1838
  : undefined;
1574
1839
  message.trackComposite =
1575
1840
  object.trackComposite !== undefined && object.trackComposite !== null
@@ -1587,7 +1852,10 @@ exports.EgressInfo = {
1587
1852
  object.file !== undefined && object.file !== null
1588
1853
  ? exports.FileInfo.fromPartial(object.file)
1589
1854
  : undefined;
1590
- message.error = (_d = object.error) !== null && _d !== void 0 ? _d : "";
1855
+ message.segments =
1856
+ object.segments !== undefined && object.segments !== null
1857
+ ? exports.SegmentsInfo.fromPartial(object.segments)
1858
+ : undefined;
1591
1859
  return message;
1592
1860
  },
1593
1861
  };
@@ -1620,15 +1888,13 @@ exports.StreamInfoList = {
1620
1888
  },
1621
1889
  fromJSON(object) {
1622
1890
  return {
1623
- info: Array.isArray(object === null || object === void 0 ? void 0 : object.info)
1624
- ? object.info.map((e) => exports.StreamInfo.fromJSON(e))
1625
- : [],
1891
+ info: Array.isArray(object === null || object === void 0 ? void 0 : object.info) ? object.info.map((e) => exports.StreamInfo.fromJSON(e)) : [],
1626
1892
  };
1627
1893
  },
1628
1894
  toJSON(message) {
1629
1895
  const obj = {};
1630
1896
  if (message.info) {
1631
- obj.info = message.info.map((e) => e ? exports.StreamInfo.toJSON(e) : undefined);
1897
+ obj.info = message.info.map((e) => (e ? exports.StreamInfo.toJSON(e) : undefined));
1632
1898
  }
1633
1899
  else {
1634
1900
  obj.info = [];
@@ -1643,11 +1909,11 @@ exports.StreamInfoList = {
1643
1909
  },
1644
1910
  };
1645
1911
  function createBaseStreamInfo() {
1646
- return { url: "", startedAt: 0, endedAt: 0 };
1912
+ return { url: '', startedAt: 0, endedAt: 0, duration: 0, status: 0 };
1647
1913
  }
1648
1914
  exports.StreamInfo = {
1649
1915
  encode(message, writer = _m0.Writer.create()) {
1650
- if (message.url !== "") {
1916
+ if (message.url !== '') {
1651
1917
  writer.uint32(10).string(message.url);
1652
1918
  }
1653
1919
  if (message.startedAt !== 0) {
@@ -1656,6 +1922,12 @@ exports.StreamInfo = {
1656
1922
  if (message.endedAt !== 0) {
1657
1923
  writer.uint32(24).int64(message.endedAt);
1658
1924
  }
1925
+ if (message.duration !== 0) {
1926
+ writer.uint32(32).int64(message.duration);
1927
+ }
1928
+ if (message.status !== 0) {
1929
+ writer.uint32(40).int32(message.status);
1930
+ }
1659
1931
  return writer;
1660
1932
  },
1661
1933
  decode(input, length) {
@@ -1674,6 +1946,12 @@ exports.StreamInfo = {
1674
1946
  case 3:
1675
1947
  message.endedAt = longToNumber(reader.int64());
1676
1948
  break;
1949
+ case 4:
1950
+ message.duration = longToNumber(reader.int64());
1951
+ break;
1952
+ case 5:
1953
+ message.status = reader.int32();
1954
+ break;
1677
1955
  default:
1678
1956
  reader.skipType(tag & 7);
1679
1957
  break;
@@ -1683,47 +1961,48 @@ exports.StreamInfo = {
1683
1961
  },
1684
1962
  fromJSON(object) {
1685
1963
  return {
1686
- url: isSet(object.url) ? String(object.url) : "",
1964
+ url: isSet(object.url) ? String(object.url) : '',
1687
1965
  startedAt: isSet(object.startedAt) ? Number(object.startedAt) : 0,
1688
1966
  endedAt: isSet(object.endedAt) ? Number(object.endedAt) : 0,
1967
+ duration: isSet(object.duration) ? Number(object.duration) : 0,
1968
+ status: isSet(object.status) ? streamInfo_StatusFromJSON(object.status) : 0,
1689
1969
  };
1690
1970
  },
1691
1971
  toJSON(message) {
1692
1972
  const obj = {};
1693
1973
  message.url !== undefined && (obj.url = message.url);
1694
- message.startedAt !== undefined &&
1695
- (obj.startedAt = Math.round(message.startedAt));
1696
- message.endedAt !== undefined &&
1697
- (obj.endedAt = Math.round(message.endedAt));
1974
+ message.startedAt !== undefined && (obj.startedAt = Math.round(message.startedAt));
1975
+ message.endedAt !== undefined && (obj.endedAt = Math.round(message.endedAt));
1976
+ message.duration !== undefined && (obj.duration = Math.round(message.duration));
1977
+ message.status !== undefined && (obj.status = streamInfo_StatusToJSON(message.status));
1698
1978
  return obj;
1699
1979
  },
1700
1980
  fromPartial(object) {
1701
- var _a, _b, _c;
1981
+ var _a, _b, _c, _d, _e;
1702
1982
  const message = createBaseStreamInfo();
1703
- message.url = (_a = object.url) !== null && _a !== void 0 ? _a : "";
1983
+ message.url = (_a = object.url) !== null && _a !== void 0 ? _a : '';
1704
1984
  message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : 0;
1705
1985
  message.endedAt = (_c = object.endedAt) !== null && _c !== void 0 ? _c : 0;
1986
+ message.duration = (_d = object.duration) !== null && _d !== void 0 ? _d : 0;
1987
+ message.status = (_e = object.status) !== null && _e !== void 0 ? _e : 0;
1706
1988
  return message;
1707
1989
  },
1708
1990
  };
1709
1991
  function createBaseFileInfo() {
1710
- return { filename: "", startedAt: 0, endedAt: 0, size: 0, location: "" };
1992
+ return { filename: '', duration: 0, size: 0, location: '' };
1711
1993
  }
1712
1994
  exports.FileInfo = {
1713
1995
  encode(message, writer = _m0.Writer.create()) {
1714
- if (message.filename !== "") {
1996
+ if (message.filename !== '') {
1715
1997
  writer.uint32(10).string(message.filename);
1716
1998
  }
1717
- if (message.startedAt !== 0) {
1718
- writer.uint32(16).int64(message.startedAt);
1719
- }
1720
- if (message.endedAt !== 0) {
1721
- writer.uint32(24).int64(message.endedAt);
1999
+ if (message.duration !== 0) {
2000
+ writer.uint32(48).int64(message.duration);
1722
2001
  }
1723
2002
  if (message.size !== 0) {
1724
2003
  writer.uint32(32).int64(message.size);
1725
2004
  }
1726
- if (message.location !== "") {
2005
+ if (message.location !== '') {
1727
2006
  writer.uint32(42).string(message.location);
1728
2007
  }
1729
2008
  return writer;
@@ -1738,11 +2017,8 @@ exports.FileInfo = {
1738
2017
  case 1:
1739
2018
  message.filename = reader.string();
1740
2019
  break;
1741
- case 2:
1742
- message.startedAt = longToNumber(reader.int64());
1743
- break;
1744
- case 3:
1745
- message.endedAt = longToNumber(reader.int64());
2020
+ case 6:
2021
+ message.duration = longToNumber(reader.int64());
1746
2022
  break;
1747
2023
  case 4:
1748
2024
  message.size = longToNumber(reader.int64());
@@ -1759,48 +2035,122 @@ exports.FileInfo = {
1759
2035
  },
1760
2036
  fromJSON(object) {
1761
2037
  return {
1762
- filename: isSet(object.filename) ? String(object.filename) : "",
1763
- startedAt: isSet(object.startedAt) ? Number(object.startedAt) : 0,
1764
- endedAt: isSet(object.endedAt) ? Number(object.endedAt) : 0,
2038
+ filename: isSet(object.filename) ? String(object.filename) : '',
2039
+ duration: isSet(object.duration) ? Number(object.duration) : 0,
1765
2040
  size: isSet(object.size) ? Number(object.size) : 0,
1766
- location: isSet(object.location) ? String(object.location) : "",
2041
+ location: isSet(object.location) ? String(object.location) : '',
1767
2042
  };
1768
2043
  },
1769
2044
  toJSON(message) {
1770
2045
  const obj = {};
1771
2046
  message.filename !== undefined && (obj.filename = message.filename);
1772
- message.startedAt !== undefined &&
1773
- (obj.startedAt = Math.round(message.startedAt));
1774
- message.endedAt !== undefined &&
1775
- (obj.endedAt = Math.round(message.endedAt));
2047
+ message.duration !== undefined && (obj.duration = Math.round(message.duration));
1776
2048
  message.size !== undefined && (obj.size = Math.round(message.size));
1777
2049
  message.location !== undefined && (obj.location = message.location);
1778
2050
  return obj;
1779
2051
  },
1780
2052
  fromPartial(object) {
1781
- var _a, _b, _c, _d, _e;
2053
+ var _a, _b, _c, _d;
1782
2054
  const message = createBaseFileInfo();
1783
- message.filename = (_a = object.filename) !== null && _a !== void 0 ? _a : "";
1784
- message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : 0;
1785
- message.endedAt = (_c = object.endedAt) !== null && _c !== void 0 ? _c : 0;
1786
- message.size = (_d = object.size) !== null && _d !== void 0 ? _d : 0;
1787
- message.location = (_e = object.location) !== null && _e !== void 0 ? _e : "";
2055
+ message.filename = (_a = object.filename) !== null && _a !== void 0 ? _a : '';
2056
+ message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
2057
+ message.size = (_c = object.size) !== null && _c !== void 0 ? _c : 0;
2058
+ message.location = (_d = object.location) !== null && _d !== void 0 ? _d : '';
2059
+ return message;
2060
+ },
2061
+ };
2062
+ function createBaseSegmentsInfo() {
2063
+ return { playlistName: '', duration: 0, size: 0, playlistLocation: '', segmentCount: 0 };
2064
+ }
2065
+ exports.SegmentsInfo = {
2066
+ encode(message, writer = _m0.Writer.create()) {
2067
+ if (message.playlistName !== '') {
2068
+ writer.uint32(10).string(message.playlistName);
2069
+ }
2070
+ if (message.duration !== 0) {
2071
+ writer.uint32(16).int64(message.duration);
2072
+ }
2073
+ if (message.size !== 0) {
2074
+ writer.uint32(24).int64(message.size);
2075
+ }
2076
+ if (message.playlistLocation !== '') {
2077
+ writer.uint32(34).string(message.playlistLocation);
2078
+ }
2079
+ if (message.segmentCount !== 0) {
2080
+ writer.uint32(40).int64(message.segmentCount);
2081
+ }
2082
+ return writer;
2083
+ },
2084
+ decode(input, length) {
2085
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2086
+ let end = length === undefined ? reader.len : reader.pos + length;
2087
+ const message = createBaseSegmentsInfo();
2088
+ while (reader.pos < end) {
2089
+ const tag = reader.uint32();
2090
+ switch (tag >>> 3) {
2091
+ case 1:
2092
+ message.playlistName = reader.string();
2093
+ break;
2094
+ case 2:
2095
+ message.duration = longToNumber(reader.int64());
2096
+ break;
2097
+ case 3:
2098
+ message.size = longToNumber(reader.int64());
2099
+ break;
2100
+ case 4:
2101
+ message.playlistLocation = reader.string();
2102
+ break;
2103
+ case 5:
2104
+ message.segmentCount = longToNumber(reader.int64());
2105
+ break;
2106
+ default:
2107
+ reader.skipType(tag & 7);
2108
+ break;
2109
+ }
2110
+ }
2111
+ return message;
2112
+ },
2113
+ fromJSON(object) {
2114
+ return {
2115
+ playlistName: isSet(object.playlistName) ? String(object.playlistName) : '',
2116
+ duration: isSet(object.duration) ? Number(object.duration) : 0,
2117
+ size: isSet(object.size) ? Number(object.size) : 0,
2118
+ playlistLocation: isSet(object.playlistLocation) ? String(object.playlistLocation) : '',
2119
+ segmentCount: isSet(object.segmentCount) ? Number(object.segmentCount) : 0,
2120
+ };
2121
+ },
2122
+ toJSON(message) {
2123
+ const obj = {};
2124
+ message.playlistName !== undefined && (obj.playlistName = message.playlistName);
2125
+ message.duration !== undefined && (obj.duration = Math.round(message.duration));
2126
+ message.size !== undefined && (obj.size = Math.round(message.size));
2127
+ message.playlistLocation !== undefined && (obj.playlistLocation = message.playlistLocation);
2128
+ message.segmentCount !== undefined && (obj.segmentCount = Math.round(message.segmentCount));
2129
+ return obj;
2130
+ },
2131
+ fromPartial(object) {
2132
+ var _a, _b, _c, _d, _e;
2133
+ const message = createBaseSegmentsInfo();
2134
+ message.playlistName = (_a = object.playlistName) !== null && _a !== void 0 ? _a : '';
2135
+ message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
2136
+ message.size = (_c = object.size) !== null && _c !== void 0 ? _c : 0;
2137
+ message.playlistLocation = (_d = object.playlistLocation) !== null && _d !== void 0 ? _d : '';
2138
+ message.segmentCount = (_e = object.segmentCount) !== null && _e !== void 0 ? _e : 0;
1788
2139
  return message;
1789
2140
  },
1790
2141
  };
1791
2142
  var globalThis = (() => {
1792
- if (typeof globalThis !== "undefined")
2143
+ if (typeof globalThis !== 'undefined')
1793
2144
  return globalThis;
1794
- if (typeof self !== "undefined")
2145
+ if (typeof self !== 'undefined')
1795
2146
  return self;
1796
- if (typeof window !== "undefined")
2147
+ if (typeof window !== 'undefined')
1797
2148
  return window;
1798
- if (typeof global !== "undefined")
2149
+ if (typeof global !== 'undefined')
1799
2150
  return global;
1800
- throw "Unable to locate global object";
2151
+ throw 'Unable to locate global object';
1801
2152
  })();
1802
- const atob = globalThis.atob ||
1803
- ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
2153
+ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, 'base64').toString('binary'));
1804
2154
  function bytesFromBase64(b64) {
1805
2155
  const bin = atob(b64);
1806
2156
  const arr = new Uint8Array(bin.length);
@@ -1809,18 +2159,17 @@ function bytesFromBase64(b64) {
1809
2159
  }
1810
2160
  return arr;
1811
2161
  }
1812
- const btoa = globalThis.btoa ||
1813
- ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
2162
+ const btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, 'binary').toString('base64'));
1814
2163
  function base64FromBytes(arr) {
1815
2164
  const bin = [];
1816
2165
  for (const byte of arr) {
1817
2166
  bin.push(String.fromCharCode(byte));
1818
2167
  }
1819
- return btoa(bin.join(""));
2168
+ return btoa(bin.join(''));
1820
2169
  }
1821
2170
  function longToNumber(long) {
1822
2171
  if (long.gt(Number.MAX_SAFE_INTEGER)) {
1823
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
2172
+ throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
1824
2173
  }
1825
2174
  return long.toNumber();
1826
2175
  }