livekit-server-sdk 0.5.10 → 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.
Files changed (37) 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 +107 -41
  9. package/dist/EgressClient.js.map +1 -1
  10. package/dist/RecordingServiceClient.js +5 -1
  11. package/dist/RecordingServiceClient.js.map +1 -1
  12. package/dist/RoomServiceClient.js.map +1 -1
  13. package/dist/TwirpRPC.js.map +1 -1
  14. package/dist/WebhookReceiver.test.js.map +1 -1
  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 +476 -141
  23. package/dist/proto/livekit_egress.js +386 -401
  24. package/dist/proto/livekit_egress.js.map +1 -1
  25. package/dist/proto/livekit_models.d.ts +17 -1
  26. package/dist/proto/livekit_models.js +310 -379
  27. package/dist/proto/livekit_models.js.map +1 -1
  28. package/dist/proto/livekit_recording.d.ts +2 -2
  29. package/dist/proto/livekit_recording.js +94 -130
  30. package/dist/proto/livekit_recording.js.map +1 -1
  31. package/dist/proto/livekit_room.d.ts +12 -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 +148 -44
  35. package/dist/proto/livekit_webhook.js +20 -28
  36. package/dist/proto/livekit_webhook.js.map +1 -1
  37. package/package.json +9 -4
@@ -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.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
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,10 +90,12 @@ 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;
@@ -97,16 +109,16 @@ var AudioCodec;
97
109
  function audioCodecFromJSON(object) {
98
110
  switch (object) {
99
111
  case 0:
100
- case "DEFAULT_AC":
112
+ case 'DEFAULT_AC':
101
113
  return AudioCodec.DEFAULT_AC;
102
114
  case 1:
103
- case "OPUS":
115
+ case 'OPUS':
104
116
  return AudioCodec.OPUS;
105
117
  case 2:
106
- case "AAC":
118
+ case 'AAC':
107
119
  return AudioCodec.AAC;
108
120
  case -1:
109
- case "UNRECOGNIZED":
121
+ case 'UNRECOGNIZED':
110
122
  default:
111
123
  return AudioCodec.UNRECOGNIZED;
112
124
  }
@@ -115,13 +127,13 @@ exports.audioCodecFromJSON = audioCodecFromJSON;
115
127
  function audioCodecToJSON(object) {
116
128
  switch (object) {
117
129
  case AudioCodec.DEFAULT_AC:
118
- return "DEFAULT_AC";
130
+ return 'DEFAULT_AC';
119
131
  case AudioCodec.OPUS:
120
- return "OPUS";
132
+ return 'OPUS';
121
133
  case AudioCodec.AAC:
122
- return "AAC";
134
+ return 'AAC';
123
135
  default:
124
- return "UNKNOWN";
136
+ return 'UNKNOWN';
125
137
  }
126
138
  }
127
139
  exports.audioCodecToJSON = audioCodecToJSON;
@@ -130,30 +142,25 @@ var VideoCodec;
130
142
  VideoCodec[VideoCodec["DEFAULT_VC"] = 0] = "DEFAULT_VC";
131
143
  VideoCodec[VideoCodec["H264_BASELINE"] = 1] = "H264_BASELINE";
132
144
  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
145
  VideoCodec[VideoCodec["H264_HIGH"] = 3] = "H264_HIGH";
139
146
  VideoCodec[VideoCodec["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
140
147
  })(VideoCodec = exports.VideoCodec || (exports.VideoCodec = {}));
141
148
  function videoCodecFromJSON(object) {
142
149
  switch (object) {
143
150
  case 0:
144
- case "DEFAULT_VC":
151
+ case 'DEFAULT_VC':
145
152
  return VideoCodec.DEFAULT_VC;
146
153
  case 1:
147
- case "H264_BASELINE":
154
+ case 'H264_BASELINE':
148
155
  return VideoCodec.H264_BASELINE;
149
156
  case 2:
150
- case "H264_MAIN":
157
+ case 'H264_MAIN':
151
158
  return VideoCodec.H264_MAIN;
152
159
  case 3:
153
- case "H264_HIGH":
160
+ case 'H264_HIGH':
154
161
  return VideoCodec.H264_HIGH;
155
162
  case -1:
156
- case "UNRECOGNIZED":
163
+ case 'UNRECOGNIZED':
157
164
  default:
158
165
  return VideoCodec.UNRECOGNIZED;
159
166
  }
@@ -162,15 +169,15 @@ exports.videoCodecFromJSON = videoCodecFromJSON;
162
169
  function videoCodecToJSON(object) {
163
170
  switch (object) {
164
171
  case VideoCodec.DEFAULT_VC:
165
- return "DEFAULT_VC";
172
+ return 'DEFAULT_VC';
166
173
  case VideoCodec.H264_BASELINE:
167
- return "H264_BASELINE";
174
+ return 'H264_BASELINE';
168
175
  case VideoCodec.H264_MAIN:
169
- return "H264_MAIN";
176
+ return 'H264_MAIN';
170
177
  case VideoCodec.H264_HIGH:
171
- return "H264_HIGH";
178
+ return 'H264_HIGH';
172
179
  default:
173
- return "UNKNOWN";
180
+ return 'UNKNOWN';
174
181
  }
175
182
  }
176
183
  exports.videoCodecToJSON = videoCodecToJSON;
@@ -189,19 +196,19 @@ var EncodingOptionsPreset;
189
196
  function encodingOptionsPresetFromJSON(object) {
190
197
  switch (object) {
191
198
  case 0:
192
- case "H264_720P_30":
199
+ case 'H264_720P_30':
193
200
  return EncodingOptionsPreset.H264_720P_30;
194
201
  case 1:
195
- case "H264_720P_60":
202
+ case 'H264_720P_60':
196
203
  return EncodingOptionsPreset.H264_720P_60;
197
204
  case 2:
198
- case "H264_1080P_30":
205
+ case 'H264_1080P_30':
199
206
  return EncodingOptionsPreset.H264_1080P_30;
200
207
  case 3:
201
- case "H264_1080P_60":
208
+ case 'H264_1080P_60':
202
209
  return EncodingOptionsPreset.H264_1080P_60;
203
210
  case -1:
204
- case "UNRECOGNIZED":
211
+ case 'UNRECOGNIZED':
205
212
  default:
206
213
  return EncodingOptionsPreset.UNRECOGNIZED;
207
214
  }
@@ -210,15 +217,15 @@ exports.encodingOptionsPresetFromJSON = encodingOptionsPresetFromJSON;
210
217
  function encodingOptionsPresetToJSON(object) {
211
218
  switch (object) {
212
219
  case EncodingOptionsPreset.H264_720P_30:
213
- return "H264_720P_30";
220
+ return 'H264_720P_30';
214
221
  case EncodingOptionsPreset.H264_720P_60:
215
- return "H264_720P_60";
222
+ return 'H264_720P_60';
216
223
  case EncodingOptionsPreset.H264_1080P_30:
217
- return "H264_1080P_30";
224
+ return 'H264_1080P_30';
218
225
  case EncodingOptionsPreset.H264_1080P_60:
219
- return "H264_1080P_60";
226
+ return 'H264_1080P_60';
220
227
  default:
221
- return "UNKNOWN";
228
+ return 'UNKNOWN';
222
229
  }
223
230
  }
224
231
  exports.encodingOptionsPresetToJSON = encodingOptionsPresetToJSON;
@@ -233,19 +240,19 @@ var EgressStatus;
233
240
  function egressStatusFromJSON(object) {
234
241
  switch (object) {
235
242
  case 0:
236
- case "EGRESS_STARTING":
243
+ case 'EGRESS_STARTING':
237
244
  return EgressStatus.EGRESS_STARTING;
238
245
  case 1:
239
- case "EGRESS_ACTIVE":
246
+ case 'EGRESS_ACTIVE':
240
247
  return EgressStatus.EGRESS_ACTIVE;
241
248
  case 2:
242
- case "EGRESS_ENDING":
249
+ case 'EGRESS_ENDING':
243
250
  return EgressStatus.EGRESS_ENDING;
244
251
  case 3:
245
- case "EGRESS_COMPLETE":
252
+ case 'EGRESS_COMPLETE':
246
253
  return EgressStatus.EGRESS_COMPLETE;
247
254
  case -1:
248
- case "UNRECOGNIZED":
255
+ case 'UNRECOGNIZED':
249
256
  default:
250
257
  return EgressStatus.UNRECOGNIZED;
251
258
  }
@@ -254,37 +261,37 @@ exports.egressStatusFromJSON = egressStatusFromJSON;
254
261
  function egressStatusToJSON(object) {
255
262
  switch (object) {
256
263
  case EgressStatus.EGRESS_STARTING:
257
- return "EGRESS_STARTING";
264
+ return 'EGRESS_STARTING';
258
265
  case EgressStatus.EGRESS_ACTIVE:
259
- return "EGRESS_ACTIVE";
266
+ return 'EGRESS_ACTIVE';
260
267
  case EgressStatus.EGRESS_ENDING:
261
- return "EGRESS_ENDING";
268
+ return 'EGRESS_ENDING';
262
269
  case EgressStatus.EGRESS_COMPLETE:
263
- return "EGRESS_COMPLETE";
270
+ return 'EGRESS_COMPLETE';
264
271
  default:
265
- return "UNKNOWN";
272
+ return 'UNKNOWN';
266
273
  }
267
274
  }
268
275
  exports.egressStatusToJSON = egressStatusToJSON;
269
- function createBaseWebCompositeEgressRequest() {
276
+ function createBaseRoomCompositeEgressRequest() {
270
277
  return {
271
- roomName: "",
272
- layout: "",
278
+ roomName: '',
279
+ layout: '',
273
280
  audioOnly: false,
274
281
  videoOnly: false,
275
- customBaseUrl: "",
282
+ customBaseUrl: '',
276
283
  file: undefined,
277
284
  stream: undefined,
278
285
  preset: undefined,
279
286
  advanced: undefined,
280
287
  };
281
288
  }
282
- exports.WebCompositeEgressRequest = {
289
+ exports.RoomCompositeEgressRequest = {
283
290
  encode(message, writer = _m0.Writer.create()) {
284
- if (message.roomName !== "") {
291
+ if (message.roomName !== '') {
285
292
  writer.uint32(10).string(message.roomName);
286
293
  }
287
- if (message.layout !== "") {
294
+ if (message.layout !== '') {
288
295
  writer.uint32(18).string(message.layout);
289
296
  }
290
297
  if (message.audioOnly === true) {
@@ -293,7 +300,7 @@ exports.WebCompositeEgressRequest = {
293
300
  if (message.videoOnly === true) {
294
301
  writer.uint32(32).bool(message.videoOnly);
295
302
  }
296
- if (message.customBaseUrl !== "") {
303
+ if (message.customBaseUrl !== '') {
297
304
  writer.uint32(42).string(message.customBaseUrl);
298
305
  }
299
306
  if (message.file !== undefined) {
@@ -313,7 +320,7 @@ exports.WebCompositeEgressRequest = {
313
320
  decode(input, length) {
314
321
  const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
315
322
  let end = length === undefined ? reader.len : reader.pos + length;
316
- const message = createBaseWebCompositeEgressRequest();
323
+ const message = createBaseRoomCompositeEgressRequest();
317
324
  while (reader.pos < end) {
318
325
  const tag = reader.uint32();
319
326
  switch (tag >>> 3) {
@@ -353,25 +360,15 @@ exports.WebCompositeEgressRequest = {
353
360
  },
354
361
  fromJSON(object) {
355
362
  return {
356
- roomName: isSet(object.roomName) ? String(object.roomName) : "",
357
- layout: isSet(object.layout) ? String(object.layout) : "",
363
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
364
+ layout: isSet(object.layout) ? String(object.layout) : '',
358
365
  audioOnly: isSet(object.audioOnly) ? Boolean(object.audioOnly) : false,
359
366
  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,
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,
375
372
  };
376
373
  },
377
374
  toJSON(message) {
@@ -380,35 +377,26 @@ exports.WebCompositeEgressRequest = {
380
377
  message.layout !== undefined && (obj.layout = message.layout);
381
378
  message.audioOnly !== undefined && (obj.audioOnly = message.audioOnly);
382
379
  message.videoOnly !== undefined && (obj.videoOnly = message.videoOnly);
383
- message.customBaseUrl !== undefined &&
384
- (obj.customBaseUrl = message.customBaseUrl);
380
+ message.customBaseUrl !== undefined && (obj.customBaseUrl = message.customBaseUrl);
385
381
  message.file !== undefined &&
386
- (obj.file = message.file
387
- ? exports.EncodedFileOutput.toJSON(message.file)
388
- : undefined);
382
+ (obj.file = message.file ? exports.EncodedFileOutput.toJSON(message.file) : undefined);
389
383
  message.stream !== undefined &&
390
- (obj.stream = message.stream
391
- ? exports.StreamOutput.toJSON(message.stream)
392
- : undefined);
384
+ (obj.stream = message.stream ? exports.StreamOutput.toJSON(message.stream) : undefined);
393
385
  message.preset !== undefined &&
394
386
  (obj.preset =
395
- message.preset !== undefined
396
- ? encodingOptionsPresetToJSON(message.preset)
397
- : undefined);
387
+ message.preset !== undefined ? encodingOptionsPresetToJSON(message.preset) : undefined);
398
388
  message.advanced !== undefined &&
399
- (obj.advanced = message.advanced
400
- ? exports.EncodingOptions.toJSON(message.advanced)
401
- : undefined);
389
+ (obj.advanced = message.advanced ? exports.EncodingOptions.toJSON(message.advanced) : undefined);
402
390
  return obj;
403
391
  },
404
392
  fromPartial(object) {
405
393
  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 : "";
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 : '';
409
397
  message.audioOnly = (_c = object.audioOnly) !== null && _c !== void 0 ? _c : false;
410
398
  message.videoOnly = (_d = object.videoOnly) !== null && _d !== void 0 ? _d : false;
411
- message.customBaseUrl = (_e = object.customBaseUrl) !== null && _e !== void 0 ? _e : "";
399
+ message.customBaseUrl = (_e = object.customBaseUrl) !== null && _e !== void 0 ? _e : '';
412
400
  message.file =
413
401
  object.file !== undefined && object.file !== null
414
402
  ? exports.EncodedFileOutput.fromPartial(object.file)
@@ -427,9 +415,9 @@ exports.WebCompositeEgressRequest = {
427
415
  };
428
416
  function createBaseTrackCompositeEgressRequest() {
429
417
  return {
430
- roomName: "",
431
- audioTrackId: "",
432
- videoTrackId: "",
418
+ roomName: '',
419
+ audioTrackId: '',
420
+ videoTrackId: '',
433
421
  file: undefined,
434
422
  stream: undefined,
435
423
  preset: undefined,
@@ -438,13 +426,13 @@ function createBaseTrackCompositeEgressRequest() {
438
426
  }
439
427
  exports.TrackCompositeEgressRequest = {
440
428
  encode(message, writer = _m0.Writer.create()) {
441
- if (message.roomName !== "") {
429
+ if (message.roomName !== '') {
442
430
  writer.uint32(10).string(message.roomName);
443
431
  }
444
- if (message.audioTrackId !== "") {
432
+ if (message.audioTrackId !== '') {
445
433
  writer.uint32(18).string(message.audioTrackId);
446
434
  }
447
- if (message.videoTrackId !== "") {
435
+ if (message.videoTrackId !== '') {
448
436
  writer.uint32(26).string(message.videoTrackId);
449
437
  }
450
438
  if (message.file !== undefined) {
@@ -498,59 +486,37 @@ exports.TrackCompositeEgressRequest = {
498
486
  },
499
487
  fromJSON(object) {
500
488
  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,
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,
520
496
  };
521
497
  },
522
498
  toJSON(message) {
523
499
  const obj = {};
524
500
  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);
501
+ message.audioTrackId !== undefined && (obj.audioTrackId = message.audioTrackId);
502
+ message.videoTrackId !== undefined && (obj.videoTrackId = message.videoTrackId);
529
503
  message.file !== undefined &&
530
- (obj.file = message.file
531
- ? exports.EncodedFileOutput.toJSON(message.file)
532
- : undefined);
504
+ (obj.file = message.file ? exports.EncodedFileOutput.toJSON(message.file) : undefined);
533
505
  message.stream !== undefined &&
534
- (obj.stream = message.stream
535
- ? exports.StreamOutput.toJSON(message.stream)
536
- : undefined);
506
+ (obj.stream = message.stream ? exports.StreamOutput.toJSON(message.stream) : undefined);
537
507
  message.preset !== undefined &&
538
508
  (obj.preset =
539
- message.preset !== undefined
540
- ? encodingOptionsPresetToJSON(message.preset)
541
- : undefined);
509
+ message.preset !== undefined ? encodingOptionsPresetToJSON(message.preset) : undefined);
542
510
  message.advanced !== undefined &&
543
- (obj.advanced = message.advanced
544
- ? exports.EncodingOptions.toJSON(message.advanced)
545
- : undefined);
511
+ (obj.advanced = message.advanced ? exports.EncodingOptions.toJSON(message.advanced) : undefined);
546
512
  return obj;
547
513
  },
548
514
  fromPartial(object) {
549
515
  var _a, _b, _c, _d;
550
516
  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 : "";
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 : '';
554
520
  message.file =
555
521
  object.file !== undefined && object.file !== null
556
522
  ? exports.EncodedFileOutput.fromPartial(object.file)
@@ -568,23 +534,18 @@ exports.TrackCompositeEgressRequest = {
568
534
  },
569
535
  };
570
536
  function createBaseTrackEgressRequest() {
571
- return {
572
- roomName: "",
573
- trackId: "",
574
- httpUrl: undefined,
575
- websocketUrl: undefined,
576
- };
537
+ return { roomName: '', trackId: '', file: undefined, websocketUrl: undefined };
577
538
  }
578
539
  exports.TrackEgressRequest = {
579
540
  encode(message, writer = _m0.Writer.create()) {
580
- if (message.roomName !== "") {
541
+ if (message.roomName !== '') {
581
542
  writer.uint32(10).string(message.roomName);
582
543
  }
583
- if (message.trackId !== "") {
544
+ if (message.trackId !== '') {
584
545
  writer.uint32(18).string(message.trackId);
585
546
  }
586
- if (message.httpUrl !== undefined) {
587
- writer.uint32(26).string(message.httpUrl);
547
+ if (message.file !== undefined) {
548
+ exports.DirectFileOutput.encode(message.file, writer.uint32(26).fork()).ldelim();
588
549
  }
589
550
  if (message.websocketUrl !== undefined) {
590
551
  writer.uint32(34).string(message.websocketUrl);
@@ -605,7 +566,7 @@ exports.TrackEgressRequest = {
605
566
  message.trackId = reader.string();
606
567
  break;
607
568
  case 3:
608
- message.httpUrl = reader.string();
569
+ message.file = exports.DirectFileOutput.decode(reader, reader.uint32());
609
570
  break;
610
571
  case 4:
611
572
  message.websocketUrl = reader.string();
@@ -619,48 +580,43 @@ exports.TrackEgressRequest = {
619
580
  },
620
581
  fromJSON(object) {
621
582
  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,
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,
628
587
  };
629
588
  },
630
589
  toJSON(message) {
631
590
  const obj = {};
632
591
  message.roomName !== undefined && (obj.roomName = message.roomName);
633
592
  message.trackId !== undefined && (obj.trackId = message.trackId);
634
- message.httpUrl !== undefined && (obj.httpUrl = message.httpUrl);
635
- message.websocketUrl !== undefined &&
636
- (obj.websocketUrl = message.websocketUrl);
593
+ message.file !== undefined &&
594
+ (obj.file = message.file ? exports.DirectFileOutput.toJSON(message.file) : undefined);
595
+ message.websocketUrl !== undefined && (obj.websocketUrl = message.websocketUrl);
637
596
  return obj;
638
597
  },
639
598
  fromPartial(object) {
640
- var _a, _b, _c, _d;
599
+ var _a, _b, _c;
641
600
  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;
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;
646
608
  return message;
647
609
  },
648
610
  };
649
611
  function createBaseEncodedFileOutput() {
650
- return {
651
- fileType: 0,
652
- filepath: "",
653
- s3: undefined,
654
- gcp: undefined,
655
- azure: undefined,
656
- };
612
+ return { fileType: 0, filepath: '', s3: undefined, gcp: undefined, azure: undefined };
657
613
  }
658
614
  exports.EncodedFileOutput = {
659
615
  encode(message, writer = _m0.Writer.create()) {
660
616
  if (message.fileType !== 0) {
661
617
  writer.uint32(8).int32(message.fileType);
662
618
  }
663
- if (message.filepath !== "") {
619
+ if (message.filepath !== '') {
664
620
  writer.uint32(18).string(message.filepath);
665
621
  }
666
622
  if (message.s3 !== undefined) {
@@ -705,41 +661,111 @@ exports.EncodedFileOutput = {
705
661
  },
706
662
  fromJSON(object) {
707
663
  return {
708
- fileType: isSet(object.fileType)
709
- ? encodedFileTypeFromJSON(object.fileType)
710
- : 0,
711
- filepath: isSet(object.filepath) ? String(object.filepath) : "",
664
+ fileType: isSet(object.fileType) ? encodedFileTypeFromJSON(object.fileType) : 0,
665
+ filepath: isSet(object.filepath) ? String(object.filepath) : '',
712
666
  s3: isSet(object.s3) ? exports.S3Upload.fromJSON(object.s3) : undefined,
713
667
  gcp: isSet(object.gcp) ? exports.GCPUpload.fromJSON(object.gcp) : undefined,
714
- azure: isSet(object.azure)
715
- ? exports.AzureBlobUpload.fromJSON(object.azure)
716
- : undefined,
668
+ azure: isSet(object.azure) ? exports.AzureBlobUpload.fromJSON(object.azure) : undefined,
717
669
  };
718
670
  },
719
671
  toJSON(message) {
720
672
  const obj = {};
721
- message.fileType !== undefined &&
722
- (obj.fileType = encodedFileTypeToJSON(message.fileType));
673
+ message.fileType !== undefined && (obj.fileType = encodedFileTypeToJSON(message.fileType));
723
674
  message.filepath !== undefined && (obj.filepath = message.filepath);
724
- message.s3 !== undefined &&
725
- (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
675
+ message.s3 !== undefined && (obj.s3 = message.s3 ? exports.S3Upload.toJSON(message.s3) : undefined);
726
676
  message.gcp !== undefined &&
727
677
  (obj.gcp = message.gcp ? exports.GCPUpload.toJSON(message.gcp) : undefined);
728
678
  message.azure !== undefined &&
729
- (obj.azure = message.azure
730
- ? exports.AzureBlobUpload.toJSON(message.azure)
731
- : undefined);
679
+ (obj.azure = message.azure ? exports.AzureBlobUpload.toJSON(message.azure) : undefined);
732
680
  return obj;
733
681
  },
734
682
  fromPartial(object) {
735
683
  var _a, _b;
736
684
  const message = createBaseEncodedFileOutput();
737
685
  message.fileType = (_a = object.fileType) !== null && _a !== void 0 ? _a : 0;
738
- message.filepath = (_b = object.filepath) !== null && _b !== void 0 ? _b : "";
686
+ message.filepath = (_b = object.filepath) !== null && _b !== void 0 ? _b : '';
739
687
  message.s3 =
740
- object.s3 !== undefined && object.s3 !== null
741
- ? exports.S3Upload.fromPartial(object.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)
742
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;
743
769
  message.gcp =
744
770
  object.gcp !== undefined && object.gcp !== null
745
771
  ? exports.GCPUpload.fromPartial(object.gcp)
@@ -752,23 +778,23 @@ exports.EncodedFileOutput = {
752
778
  },
753
779
  };
754
780
  function createBaseS3Upload() {
755
- return { accessKey: "", secret: "", region: "", endpoint: "", bucket: "" };
781
+ return { accessKey: '', secret: '', region: '', endpoint: '', bucket: '' };
756
782
  }
757
783
  exports.S3Upload = {
758
784
  encode(message, writer = _m0.Writer.create()) {
759
- if (message.accessKey !== "") {
785
+ if (message.accessKey !== '') {
760
786
  writer.uint32(10).string(message.accessKey);
761
787
  }
762
- if (message.secret !== "") {
788
+ if (message.secret !== '') {
763
789
  writer.uint32(18).string(message.secret);
764
790
  }
765
- if (message.region !== "") {
791
+ if (message.region !== '') {
766
792
  writer.uint32(26).string(message.region);
767
793
  }
768
- if (message.endpoint !== "") {
794
+ if (message.endpoint !== '') {
769
795
  writer.uint32(34).string(message.endpoint);
770
796
  }
771
- if (message.bucket !== "") {
797
+ if (message.bucket !== '') {
772
798
  writer.uint32(42).string(message.bucket);
773
799
  }
774
800
  return writer;
@@ -804,11 +830,11 @@ exports.S3Upload = {
804
830
  },
805
831
  fromJSON(object) {
806
832
  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) : "",
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) : '',
812
838
  };
813
839
  },
814
840
  toJSON(message) {
@@ -823,23 +849,23 @@ exports.S3Upload = {
823
849
  fromPartial(object) {
824
850
  var _a, _b, _c, _d, _e;
825
851
  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 : "";
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 : '';
831
857
  return message;
832
858
  },
833
859
  };
834
860
  function createBaseGCPUpload() {
835
- return { credentials: new Uint8Array(), bucket: "" };
861
+ return { credentials: new Uint8Array(), bucket: '' };
836
862
  }
837
863
  exports.GCPUpload = {
838
864
  encode(message, writer = _m0.Writer.create()) {
839
865
  if (message.credentials.length !== 0) {
840
866
  writer.uint32(10).bytes(message.credentials);
841
867
  }
842
- if (message.bucket !== "") {
868
+ if (message.bucket !== '') {
843
869
  writer.uint32(18).string(message.bucket);
844
870
  }
845
871
  return writer;
@@ -869,15 +895,13 @@ exports.GCPUpload = {
869
895
  credentials: isSet(object.credentials)
870
896
  ? bytesFromBase64(object.credentials)
871
897
  : new Uint8Array(),
872
- bucket: isSet(object.bucket) ? String(object.bucket) : "",
898
+ bucket: isSet(object.bucket) ? String(object.bucket) : '',
873
899
  };
874
900
  },
875
901
  toJSON(message) {
876
902
  const obj = {};
877
903
  message.credentials !== undefined &&
878
- (obj.credentials = base64FromBytes(message.credentials !== undefined
879
- ? message.credentials
880
- : new Uint8Array()));
904
+ (obj.credentials = base64FromBytes(message.credentials !== undefined ? message.credentials : new Uint8Array()));
881
905
  message.bucket !== undefined && (obj.bucket = message.bucket);
882
906
  return obj;
883
907
  },
@@ -885,22 +909,22 @@ exports.GCPUpload = {
885
909
  var _a, _b;
886
910
  const message = createBaseGCPUpload();
887
911
  message.credentials = (_a = object.credentials) !== null && _a !== void 0 ? _a : new Uint8Array();
888
- message.bucket = (_b = object.bucket) !== null && _b !== void 0 ? _b : "";
912
+ message.bucket = (_b = object.bucket) !== null && _b !== void 0 ? _b : '';
889
913
  return message;
890
914
  },
891
915
  };
892
916
  function createBaseAzureBlobUpload() {
893
- return { accountName: "", accountKey: "", containerName: "" };
917
+ return { accountName: '', accountKey: '', containerName: '' };
894
918
  }
895
919
  exports.AzureBlobUpload = {
896
920
  encode(message, writer = _m0.Writer.create()) {
897
- if (message.accountName !== "") {
921
+ if (message.accountName !== '') {
898
922
  writer.uint32(10).string(message.accountName);
899
923
  }
900
- if (message.accountKey !== "") {
924
+ if (message.accountKey !== '') {
901
925
  writer.uint32(18).string(message.accountKey);
902
926
  }
903
- if (message.containerName !== "") {
927
+ if (message.containerName !== '') {
904
928
  writer.uint32(26).string(message.containerName);
905
929
  }
906
930
  return writer;
@@ -930,28 +954,24 @@ exports.AzureBlobUpload = {
930
954
  },
931
955
  fromJSON(object) {
932
956
  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
- : "",
957
+ accountName: isSet(object.accountName) ? String(object.accountName) : '',
958
+ accountKey: isSet(object.accountKey) ? String(object.accountKey) : '',
959
+ containerName: isSet(object.containerName) ? String(object.containerName) : '',
938
960
  };
939
961
  },
940
962
  toJSON(message) {
941
963
  const obj = {};
942
- message.accountName !== undefined &&
943
- (obj.accountName = message.accountName);
964
+ message.accountName !== undefined && (obj.accountName = message.accountName);
944
965
  message.accountKey !== undefined && (obj.accountKey = message.accountKey);
945
- message.containerName !== undefined &&
946
- (obj.containerName = message.containerName);
966
+ message.containerName !== undefined && (obj.containerName = message.containerName);
947
967
  return obj;
948
968
  },
949
969
  fromPartial(object) {
950
970
  var _a, _b, _c;
951
971
  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 : "";
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 : '';
955
975
  return message;
956
976
  },
957
977
  };
@@ -990,18 +1010,13 @@ exports.StreamOutput = {
990
1010
  },
991
1011
  fromJSON(object) {
992
1012
  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
- : [],
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)) : [],
999
1015
  };
1000
1016
  },
1001
1017
  toJSON(message) {
1002
1018
  const obj = {};
1003
- message.protocol !== undefined &&
1004
- (obj.protocol = streamProtocolToJSON(message.protocol));
1019
+ message.protocol !== undefined && (obj.protocol = streamProtocolToJSON(message.protocol));
1005
1020
  if (message.urls) {
1006
1021
  obj.urls = message.urls.map((e) => e);
1007
1022
  }
@@ -1109,21 +1124,11 @@ exports.EncodingOptions = {
1109
1124
  height: isSet(object.height) ? Number(object.height) : 0,
1110
1125
  depth: isSet(object.depth) ? Number(object.depth) : 0,
1111
1126
  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,
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,
1127
1132
  };
1128
1133
  },
1129
1134
  toJSON(message) {
@@ -1131,18 +1136,13 @@ exports.EncodingOptions = {
1131
1136
  message.width !== undefined && (obj.width = Math.round(message.width));
1132
1137
  message.height !== undefined && (obj.height = Math.round(message.height));
1133
1138
  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));
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));
1140
1142
  message.audioFrequency !== undefined &&
1141
1143
  (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));
1144
+ message.videoCodec !== undefined && (obj.videoCodec = videoCodecToJSON(message.videoCodec));
1145
+ message.videoBitrate !== undefined && (obj.videoBitrate = Math.round(message.videoBitrate));
1146
1146
  return obj;
1147
1147
  },
1148
1148
  fromPartial(object) {
@@ -1161,14 +1161,14 @@ exports.EncodingOptions = {
1161
1161
  },
1162
1162
  };
1163
1163
  function createBaseUpdateLayoutRequest() {
1164
- return { egressId: "", layout: "" };
1164
+ return { egressId: '', layout: '' };
1165
1165
  }
1166
1166
  exports.UpdateLayoutRequest = {
1167
1167
  encode(message, writer = _m0.Writer.create()) {
1168
- if (message.egressId !== "") {
1168
+ if (message.egressId !== '') {
1169
1169
  writer.uint32(10).string(message.egressId);
1170
1170
  }
1171
- if (message.layout !== "") {
1171
+ if (message.layout !== '') {
1172
1172
  writer.uint32(18).string(message.layout);
1173
1173
  }
1174
1174
  return writer;
@@ -1195,8 +1195,8 @@ exports.UpdateLayoutRequest = {
1195
1195
  },
1196
1196
  fromJSON(object) {
1197
1197
  return {
1198
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1199
- layout: isSet(object.layout) ? String(object.layout) : "",
1198
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1199
+ layout: isSet(object.layout) ? String(object.layout) : '',
1200
1200
  };
1201
1201
  },
1202
1202
  toJSON(message) {
@@ -1208,17 +1208,17 @@ exports.UpdateLayoutRequest = {
1208
1208
  fromPartial(object) {
1209
1209
  var _a, _b;
1210
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 : "";
1211
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1212
+ message.layout = (_b = object.layout) !== null && _b !== void 0 ? _b : '';
1213
1213
  return message;
1214
1214
  },
1215
1215
  };
1216
1216
  function createBaseUpdateStreamRequest() {
1217
- return { egressId: "", addOutputUrls: [], removeOutputUrls: [] };
1217
+ return { egressId: '', addOutputUrls: [], removeOutputUrls: [] };
1218
1218
  }
1219
1219
  exports.UpdateStreamRequest = {
1220
1220
  encode(message, writer = _m0.Writer.create()) {
1221
- if (message.egressId !== "") {
1221
+ if (message.egressId !== '') {
1222
1222
  writer.uint32(10).string(message.egressId);
1223
1223
  }
1224
1224
  for (const v of message.addOutputUrls) {
@@ -1254,7 +1254,7 @@ exports.UpdateStreamRequest = {
1254
1254
  },
1255
1255
  fromJSON(object) {
1256
1256
  return {
1257
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1257
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1258
1258
  addOutputUrls: Array.isArray(object === null || object === void 0 ? void 0 : object.addOutputUrls)
1259
1259
  ? object.addOutputUrls.map((e) => String(e))
1260
1260
  : [],
@@ -1283,18 +1283,18 @@ exports.UpdateStreamRequest = {
1283
1283
  fromPartial(object) {
1284
1284
  var _a, _b, _c;
1285
1285
  const message = createBaseUpdateStreamRequest();
1286
- message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : "";
1286
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1287
1287
  message.addOutputUrls = ((_b = object.addOutputUrls) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
1288
1288
  message.removeOutputUrls = ((_c = object.removeOutputUrls) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
1289
1289
  return message;
1290
1290
  },
1291
1291
  };
1292
1292
  function createBaseListEgressRequest() {
1293
- return { roomName: "" };
1293
+ return { roomName: '' };
1294
1294
  }
1295
1295
  exports.ListEgressRequest = {
1296
1296
  encode(message, writer = _m0.Writer.create()) {
1297
- if (message.roomName !== "") {
1297
+ if (message.roomName !== '') {
1298
1298
  writer.uint32(10).string(message.roomName);
1299
1299
  }
1300
1300
  return writer;
@@ -1318,7 +1318,7 @@ exports.ListEgressRequest = {
1318
1318
  },
1319
1319
  fromJSON(object) {
1320
1320
  return {
1321
- roomName: isSet(object.roomName) ? String(object.roomName) : "",
1321
+ roomName: isSet(object.roomName) ? String(object.roomName) : '',
1322
1322
  };
1323
1323
  },
1324
1324
  toJSON(message) {
@@ -1329,7 +1329,7 @@ exports.ListEgressRequest = {
1329
1329
  fromPartial(object) {
1330
1330
  var _a;
1331
1331
  const message = createBaseListEgressRequest();
1332
- message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : "";
1332
+ message.roomName = (_a = object.roomName) !== null && _a !== void 0 ? _a : '';
1333
1333
  return message;
1334
1334
  },
1335
1335
  };
@@ -1370,7 +1370,7 @@ exports.ListEgressResponse = {
1370
1370
  toJSON(message) {
1371
1371
  const obj = {};
1372
1372
  if (message.items) {
1373
- obj.items = message.items.map((e) => e ? exports.EgressInfo.toJSON(e) : undefined);
1373
+ obj.items = message.items.map((e) => (e ? exports.EgressInfo.toJSON(e) : undefined));
1374
1374
  }
1375
1375
  else {
1376
1376
  obj.items = [];
@@ -1385,11 +1385,11 @@ exports.ListEgressResponse = {
1385
1385
  },
1386
1386
  };
1387
1387
  function createBaseStopEgressRequest() {
1388
- return { egressId: "" };
1388
+ return { egressId: '' };
1389
1389
  }
1390
1390
  exports.StopEgressRequest = {
1391
1391
  encode(message, writer = _m0.Writer.create()) {
1392
- if (message.egressId !== "") {
1392
+ if (message.egressId !== '') {
1393
1393
  writer.uint32(10).string(message.egressId);
1394
1394
  }
1395
1395
  return writer;
@@ -1413,7 +1413,7 @@ exports.StopEgressRequest = {
1413
1413
  },
1414
1414
  fromJSON(object) {
1415
1415
  return {
1416
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1416
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1417
1417
  };
1418
1418
  },
1419
1419
  toJSON(message) {
@@ -1424,36 +1424,47 @@ exports.StopEgressRequest = {
1424
1424
  fromPartial(object) {
1425
1425
  var _a;
1426
1426
  const message = createBaseStopEgressRequest();
1427
- message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : "";
1427
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1428
1428
  return message;
1429
1429
  },
1430
1430
  };
1431
1431
  function createBaseEgressInfo() {
1432
1432
  return {
1433
- egressId: "",
1434
- roomId: "",
1433
+ egressId: '',
1434
+ roomId: '',
1435
1435
  status: 0,
1436
- webComposite: undefined,
1436
+ startedAt: 0,
1437
+ endedAt: 0,
1438
+ error: '',
1439
+ roomComposite: undefined,
1437
1440
  trackComposite: undefined,
1438
1441
  track: undefined,
1439
1442
  stream: undefined,
1440
1443
  file: undefined,
1441
- error: "",
1442
1444
  };
1443
1445
  }
1444
1446
  exports.EgressInfo = {
1445
1447
  encode(message, writer = _m0.Writer.create()) {
1446
- if (message.egressId !== "") {
1448
+ if (message.egressId !== '') {
1447
1449
  writer.uint32(10).string(message.egressId);
1448
1450
  }
1449
- if (message.roomId !== "") {
1451
+ if (message.roomId !== '') {
1450
1452
  writer.uint32(18).string(message.roomId);
1451
1453
  }
1452
1454
  if (message.status !== 0) {
1453
1455
  writer.uint32(24).int32(message.status);
1454
1456
  }
1455
- if (message.webComposite !== undefined) {
1456
- exports.WebCompositeEgressRequest.encode(message.webComposite, writer.uint32(34).fork()).ldelim();
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();
1457
1468
  }
1458
1469
  if (message.trackComposite !== undefined) {
1459
1470
  exports.TrackCompositeEgressRequest.encode(message.trackComposite, writer.uint32(42).fork()).ldelim();
@@ -1467,9 +1478,6 @@ exports.EgressInfo = {
1467
1478
  if (message.file !== undefined) {
1468
1479
  exports.FileInfo.encode(message.file, writer.uint32(66).fork()).ldelim();
1469
1480
  }
1470
- if (message.error !== "") {
1471
- writer.uint32(74).string(message.error);
1472
- }
1473
1481
  return writer;
1474
1482
  },
1475
1483
  decode(input, length) {
@@ -1488,8 +1496,17 @@ exports.EgressInfo = {
1488
1496
  case 3:
1489
1497
  message.status = reader.int32();
1490
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;
1491
1508
  case 4:
1492
- message.webComposite = exports.WebCompositeEgressRequest.decode(reader, reader.uint32());
1509
+ message.roomComposite = exports.RoomCompositeEgressRequest.decode(reader, reader.uint32());
1493
1510
  break;
1494
1511
  case 5:
1495
1512
  message.trackComposite = exports.TrackCompositeEgressRequest.decode(reader, reader.uint32());
@@ -1503,9 +1520,6 @@ exports.EgressInfo = {
1503
1520
  case 8:
1504
1521
  message.file = exports.FileInfo.decode(reader, reader.uint32());
1505
1522
  break;
1506
- case 9:
1507
- message.error = reader.string();
1508
- break;
1509
1523
  default:
1510
1524
  reader.skipType(tag & 7);
1511
1525
  break;
@@ -1515,61 +1529,59 @@ exports.EgressInfo = {
1515
1529
  },
1516
1530
  fromJSON(object) {
1517
1531
  return {
1518
- egressId: isSet(object.egressId) ? String(object.egressId) : "",
1519
- roomId: isSet(object.roomId) ? String(object.roomId) : "",
1532
+ egressId: isSet(object.egressId) ? String(object.egressId) : '',
1533
+ roomId: isSet(object.roomId) ? String(object.roomId) : '',
1520
1534
  status: isSet(object.status) ? egressStatusFromJSON(object.status) : 0,
1521
- webComposite: isSet(object.webComposite)
1522
- ? exports.WebCompositeEgressRequest.fromJSON(object.webComposite)
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)
1523
1540
  : undefined,
1524
1541
  trackComposite: isSet(object.trackComposite)
1525
1542
  ? exports.TrackCompositeEgressRequest.fromJSON(object.trackComposite)
1526
1543
  : 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,
1544
+ track: isSet(object.track) ? exports.TrackEgressRequest.fromJSON(object.track) : undefined,
1545
+ stream: isSet(object.stream) ? exports.StreamInfoList.fromJSON(object.stream) : undefined,
1533
1546
  file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
1534
- error: isSet(object.error) ? String(object.error) : "",
1535
1547
  };
1536
1548
  },
1537
1549
  toJSON(message) {
1538
1550
  const obj = {};
1539
1551
  message.egressId !== undefined && (obj.egressId = message.egressId);
1540
1552
  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)
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)
1546
1560
  : undefined);
1547
1561
  message.trackComposite !== undefined &&
1548
1562
  (obj.trackComposite = message.trackComposite
1549
1563
  ? exports.TrackCompositeEgressRequest.toJSON(message.trackComposite)
1550
1564
  : undefined);
1551
1565
  message.track !== undefined &&
1552
- (obj.track = message.track
1553
- ? exports.TrackEgressRequest.toJSON(message.track)
1554
- : undefined);
1566
+ (obj.track = message.track ? exports.TrackEgressRequest.toJSON(message.track) : undefined);
1555
1567
  message.stream !== undefined &&
1556
- (obj.stream = message.stream
1557
- ? exports.StreamInfoList.toJSON(message.stream)
1558
- : undefined);
1568
+ (obj.stream = message.stream ? exports.StreamInfoList.toJSON(message.stream) : undefined);
1559
1569
  message.file !== undefined &&
1560
1570
  (obj.file = message.file ? exports.FileInfo.toJSON(message.file) : undefined);
1561
- message.error !== undefined && (obj.error = message.error);
1562
1571
  return obj;
1563
1572
  },
1564
1573
  fromPartial(object) {
1565
- var _a, _b, _c, _d;
1574
+ var _a, _b, _c, _d, _e, _f;
1566
1575
  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 : "";
1576
+ message.egressId = (_a = object.egressId) !== null && _a !== void 0 ? _a : '';
1577
+ message.roomId = (_b = object.roomId) !== null && _b !== void 0 ? _b : '';
1569
1578
  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)
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)
1573
1585
  : undefined;
1574
1586
  message.trackComposite =
1575
1587
  object.trackComposite !== undefined && object.trackComposite !== null
@@ -1587,7 +1599,6 @@ exports.EgressInfo = {
1587
1599
  object.file !== undefined && object.file !== null
1588
1600
  ? exports.FileInfo.fromPartial(object.file)
1589
1601
  : undefined;
1590
- message.error = (_d = object.error) !== null && _d !== void 0 ? _d : "";
1591
1602
  return message;
1592
1603
  },
1593
1604
  };
@@ -1620,15 +1631,13 @@ exports.StreamInfoList = {
1620
1631
  },
1621
1632
  fromJSON(object) {
1622
1633
  return {
1623
- info: Array.isArray(object === null || object === void 0 ? void 0 : object.info)
1624
- ? object.info.map((e) => exports.StreamInfo.fromJSON(e))
1625
- : [],
1634
+ info: Array.isArray(object === null || object === void 0 ? void 0 : object.info) ? object.info.map((e) => exports.StreamInfo.fromJSON(e)) : [],
1626
1635
  };
1627
1636
  },
1628
1637
  toJSON(message) {
1629
1638
  const obj = {};
1630
1639
  if (message.info) {
1631
- obj.info = message.info.map((e) => e ? exports.StreamInfo.toJSON(e) : undefined);
1640
+ obj.info = message.info.map((e) => (e ? exports.StreamInfo.toJSON(e) : undefined));
1632
1641
  }
1633
1642
  else {
1634
1643
  obj.info = [];
@@ -1643,18 +1652,15 @@ exports.StreamInfoList = {
1643
1652
  },
1644
1653
  };
1645
1654
  function createBaseStreamInfo() {
1646
- return { url: "", startedAt: 0, endedAt: 0 };
1655
+ return { url: '', duration: 0 };
1647
1656
  }
1648
1657
  exports.StreamInfo = {
1649
1658
  encode(message, writer = _m0.Writer.create()) {
1650
- if (message.url !== "") {
1659
+ if (message.url !== '') {
1651
1660
  writer.uint32(10).string(message.url);
1652
1661
  }
1653
- if (message.startedAt !== 0) {
1654
- writer.uint32(16).int64(message.startedAt);
1655
- }
1656
- if (message.endedAt !== 0) {
1657
- writer.uint32(24).int64(message.endedAt);
1662
+ if (message.duration !== 0) {
1663
+ writer.uint32(32).int64(message.duration);
1658
1664
  }
1659
1665
  return writer;
1660
1666
  },
@@ -1668,11 +1674,8 @@ exports.StreamInfo = {
1668
1674
  case 1:
1669
1675
  message.url = reader.string();
1670
1676
  break;
1671
- case 2:
1672
- message.startedAt = longToNumber(reader.int64());
1673
- break;
1674
- case 3:
1675
- message.endedAt = longToNumber(reader.int64());
1677
+ case 4:
1678
+ message.duration = longToNumber(reader.int64());
1676
1679
  break;
1677
1680
  default:
1678
1681
  reader.skipType(tag & 7);
@@ -1683,47 +1686,39 @@ exports.StreamInfo = {
1683
1686
  },
1684
1687
  fromJSON(object) {
1685
1688
  return {
1686
- url: isSet(object.url) ? String(object.url) : "",
1687
- startedAt: isSet(object.startedAt) ? Number(object.startedAt) : 0,
1688
- endedAt: isSet(object.endedAt) ? Number(object.endedAt) : 0,
1689
+ url: isSet(object.url) ? String(object.url) : '',
1690
+ duration: isSet(object.duration) ? Number(object.duration) : 0,
1689
1691
  };
1690
1692
  },
1691
1693
  toJSON(message) {
1692
1694
  const obj = {};
1693
1695
  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));
1696
+ message.duration !== undefined && (obj.duration = Math.round(message.duration));
1698
1697
  return obj;
1699
1698
  },
1700
1699
  fromPartial(object) {
1701
- var _a, _b, _c;
1700
+ var _a, _b;
1702
1701
  const message = createBaseStreamInfo();
1703
- message.url = (_a = object.url) !== null && _a !== void 0 ? _a : "";
1704
- message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : 0;
1705
- message.endedAt = (_c = object.endedAt) !== null && _c !== void 0 ? _c : 0;
1702
+ message.url = (_a = object.url) !== null && _a !== void 0 ? _a : '';
1703
+ message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
1706
1704
  return message;
1707
1705
  },
1708
1706
  };
1709
1707
  function createBaseFileInfo() {
1710
- return { filename: "", startedAt: 0, endedAt: 0, size: 0, location: "" };
1708
+ return { filename: '', duration: 0, size: 0, location: '' };
1711
1709
  }
1712
1710
  exports.FileInfo = {
1713
1711
  encode(message, writer = _m0.Writer.create()) {
1714
- if (message.filename !== "") {
1712
+ if (message.filename !== '') {
1715
1713
  writer.uint32(10).string(message.filename);
1716
1714
  }
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);
1715
+ if (message.duration !== 0) {
1716
+ writer.uint32(48).int64(message.duration);
1722
1717
  }
1723
1718
  if (message.size !== 0) {
1724
1719
  writer.uint32(32).int64(message.size);
1725
1720
  }
1726
- if (message.location !== "") {
1721
+ if (message.location !== '') {
1727
1722
  writer.uint32(42).string(message.location);
1728
1723
  }
1729
1724
  return writer;
@@ -1738,11 +1733,8 @@ exports.FileInfo = {
1738
1733
  case 1:
1739
1734
  message.filename = reader.string();
1740
1735
  break;
1741
- case 2:
1742
- message.startedAt = longToNumber(reader.int64());
1743
- break;
1744
- case 3:
1745
- message.endedAt = longToNumber(reader.int64());
1736
+ case 6:
1737
+ message.duration = longToNumber(reader.int64());
1746
1738
  break;
1747
1739
  case 4:
1748
1740
  message.size = longToNumber(reader.int64());
@@ -1759,48 +1751,42 @@ exports.FileInfo = {
1759
1751
  },
1760
1752
  fromJSON(object) {
1761
1753
  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,
1754
+ filename: isSet(object.filename) ? String(object.filename) : '',
1755
+ duration: isSet(object.duration) ? Number(object.duration) : 0,
1765
1756
  size: isSet(object.size) ? Number(object.size) : 0,
1766
- location: isSet(object.location) ? String(object.location) : "",
1757
+ location: isSet(object.location) ? String(object.location) : '',
1767
1758
  };
1768
1759
  },
1769
1760
  toJSON(message) {
1770
1761
  const obj = {};
1771
1762
  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));
1763
+ message.duration !== undefined && (obj.duration = Math.round(message.duration));
1776
1764
  message.size !== undefined && (obj.size = Math.round(message.size));
1777
1765
  message.location !== undefined && (obj.location = message.location);
1778
1766
  return obj;
1779
1767
  },
1780
1768
  fromPartial(object) {
1781
- var _a, _b, _c, _d, _e;
1769
+ var _a, _b, _c, _d;
1782
1770
  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 : "";
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 : '';
1788
1775
  return message;
1789
1776
  },
1790
1777
  };
1791
1778
  var globalThis = (() => {
1792
- if (typeof globalThis !== "undefined")
1779
+ if (typeof globalThis !== 'undefined')
1793
1780
  return globalThis;
1794
- if (typeof self !== "undefined")
1781
+ if (typeof self !== 'undefined')
1795
1782
  return self;
1796
- if (typeof window !== "undefined")
1783
+ if (typeof window !== 'undefined')
1797
1784
  return window;
1798
- if (typeof global !== "undefined")
1785
+ if (typeof global !== 'undefined')
1799
1786
  return global;
1800
- throw "Unable to locate global object";
1787
+ throw 'Unable to locate global object';
1801
1788
  })();
1802
- const atob = globalThis.atob ||
1803
- ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
1789
+ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, 'base64').toString('binary'));
1804
1790
  function bytesFromBase64(b64) {
1805
1791
  const bin = atob(b64);
1806
1792
  const arr = new Uint8Array(bin.length);
@@ -1809,18 +1795,17 @@ function bytesFromBase64(b64) {
1809
1795
  }
1810
1796
  return arr;
1811
1797
  }
1812
- const btoa = globalThis.btoa ||
1813
- ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
1798
+ const btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, 'binary').toString('base64'));
1814
1799
  function base64FromBytes(arr) {
1815
1800
  const bin = [];
1816
1801
  for (const byte of arr) {
1817
1802
  bin.push(String.fromCharCode(byte));
1818
1803
  }
1819
- return btoa(bin.join(""));
1804
+ return btoa(bin.join(''));
1820
1805
  }
1821
1806
  function longToNumber(long) {
1822
1807
  if (long.gt(Number.MAX_SAFE_INTEGER)) {
1823
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1808
+ throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
1824
1809
  }
1825
1810
  return long.toNumber();
1826
1811
  }