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.
- package/.eslintrc.js +1 -1
- package/.github/workflows/test.yaml +3 -0
- package/.prettierignore +7 -0
- package/README.md +8 -8
- package/dist/AccessToken.js +1 -1
- package/dist/AccessToken.js.map +1 -1
- package/dist/EgressClient.d.ts +42 -27
- package/dist/EgressClient.js +107 -41
- package/dist/EgressClient.js.map +1 -1
- package/dist/RecordingServiceClient.js +5 -1
- package/dist/RecordingServiceClient.js.map +1 -1
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/TwirpRPC.js.map +1 -1
- package/dist/WebhookReceiver.test.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts +1 -1
- package/dist/proto/google/protobuf/empty.js +1 -1
- package/dist/proto/google/protobuf/empty.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +1 -1
- package/dist/proto/google/protobuf/timestamp.js +8 -9
- package/dist/proto/google/protobuf/timestamp.js.map +1 -1
- package/dist/proto/livekit_egress.d.ts +476 -141
- package/dist/proto/livekit_egress.js +386 -401
- package/dist/proto/livekit_egress.js.map +1 -1
- package/dist/proto/livekit_models.d.ts +17 -1
- package/dist/proto/livekit_models.js +310 -379
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_recording.d.ts +2 -2
- package/dist/proto/livekit_recording.js +94 -130
- package/dist/proto/livekit_recording.js.map +1 -1
- package/dist/proto/livekit_room.d.ts +12 -2
- package/dist/proto/livekit_room.js +81 -109
- package/dist/proto/livekit_room.js.map +1 -1
- package/dist/proto/livekit_webhook.d.ts +148 -44
- package/dist/proto/livekit_webhook.js +20 -28
- package/dist/proto/livekit_webhook.js.map +1 -1
- package/package.json +9 -4
|
@@ -26,7 +26,7 @@ exports.RtmpResult = exports.FileResult = exports.RecordingInfo = exports.EndRec
|
|
|
26
26
|
/* eslint-disable */
|
|
27
27
|
const long_1 = __importDefault(require("long"));
|
|
28
28
|
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
29
|
-
exports.protobufPackage =
|
|
29
|
+
exports.protobufPackage = 'livekit';
|
|
30
30
|
var RecordingPreset;
|
|
31
31
|
(function (RecordingPreset) {
|
|
32
32
|
/** NONE - All presets use 44100 Hz, 128k bitrate for audio and a color depth of 24 */
|
|
@@ -44,22 +44,22 @@ var RecordingPreset;
|
|
|
44
44
|
function recordingPresetFromJSON(object) {
|
|
45
45
|
switch (object) {
|
|
46
46
|
case 0:
|
|
47
|
-
case
|
|
47
|
+
case 'NONE':
|
|
48
48
|
return RecordingPreset.NONE;
|
|
49
49
|
case 1:
|
|
50
|
-
case
|
|
50
|
+
case 'HD_30':
|
|
51
51
|
return RecordingPreset.HD_30;
|
|
52
52
|
case 2:
|
|
53
|
-
case
|
|
53
|
+
case 'HD_60':
|
|
54
54
|
return RecordingPreset.HD_60;
|
|
55
55
|
case 3:
|
|
56
|
-
case
|
|
56
|
+
case 'FULL_HD_30':
|
|
57
57
|
return RecordingPreset.FULL_HD_30;
|
|
58
58
|
case 4:
|
|
59
|
-
case
|
|
59
|
+
case 'FULL_HD_60':
|
|
60
60
|
return RecordingPreset.FULL_HD_60;
|
|
61
61
|
case -1:
|
|
62
|
-
case
|
|
62
|
+
case 'UNRECOGNIZED':
|
|
63
63
|
default:
|
|
64
64
|
return RecordingPreset.UNRECOGNIZED;
|
|
65
65
|
}
|
|
@@ -68,17 +68,17 @@ exports.recordingPresetFromJSON = recordingPresetFromJSON;
|
|
|
68
68
|
function recordingPresetToJSON(object) {
|
|
69
69
|
switch (object) {
|
|
70
70
|
case RecordingPreset.NONE:
|
|
71
|
-
return
|
|
71
|
+
return 'NONE';
|
|
72
72
|
case RecordingPreset.HD_30:
|
|
73
|
-
return
|
|
73
|
+
return 'HD_30';
|
|
74
74
|
case RecordingPreset.HD_60:
|
|
75
|
-
return
|
|
75
|
+
return 'HD_60';
|
|
76
76
|
case RecordingPreset.FULL_HD_30:
|
|
77
|
-
return
|
|
77
|
+
return 'FULL_HD_30';
|
|
78
78
|
case RecordingPreset.FULL_HD_60:
|
|
79
|
-
return
|
|
79
|
+
return 'FULL_HD_60';
|
|
80
80
|
default:
|
|
81
|
-
return
|
|
81
|
+
return 'UNKNOWN';
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
exports.recordingPresetToJSON = recordingPresetToJSON;
|
|
@@ -142,30 +142,22 @@ exports.StartRecordingRequest = {
|
|
|
142
142
|
fromJSON(object) {
|
|
143
143
|
return {
|
|
144
144
|
url: isSet(object.url) ? String(object.url) : undefined,
|
|
145
|
-
template: isSet(object.template)
|
|
146
|
-
? exports.RecordingTemplate.fromJSON(object.template)
|
|
147
|
-
: undefined,
|
|
145
|
+
template: isSet(object.template) ? exports.RecordingTemplate.fromJSON(object.template) : undefined,
|
|
148
146
|
rtmp: isSet(object.rtmp) ? exports.RtmpOutput.fromJSON(object.rtmp) : undefined,
|
|
149
147
|
filepath: isSet(object.filepath) ? String(object.filepath) : undefined,
|
|
150
|
-
options: isSet(object.options)
|
|
151
|
-
? exports.RecordingOptions.fromJSON(object.options)
|
|
152
|
-
: undefined,
|
|
148
|
+
options: isSet(object.options) ? exports.RecordingOptions.fromJSON(object.options) : undefined,
|
|
153
149
|
};
|
|
154
150
|
},
|
|
155
151
|
toJSON(message) {
|
|
156
152
|
const obj = {};
|
|
157
153
|
message.url !== undefined && (obj.url = message.url);
|
|
158
154
|
message.template !== undefined &&
|
|
159
|
-
(obj.template = message.template
|
|
160
|
-
? exports.RecordingTemplate.toJSON(message.template)
|
|
161
|
-
: undefined);
|
|
155
|
+
(obj.template = message.template ? exports.RecordingTemplate.toJSON(message.template) : undefined);
|
|
162
156
|
message.rtmp !== undefined &&
|
|
163
157
|
(obj.rtmp = message.rtmp ? exports.RtmpOutput.toJSON(message.rtmp) : undefined);
|
|
164
158
|
message.filepath !== undefined && (obj.filepath = message.filepath);
|
|
165
159
|
message.options !== undefined &&
|
|
166
|
-
(obj.options = message.options
|
|
167
|
-
? exports.RecordingOptions.toJSON(message.options)
|
|
168
|
-
: undefined);
|
|
160
|
+
(obj.options = message.options ? exports.RecordingOptions.toJSON(message.options) : undefined);
|
|
169
161
|
return obj;
|
|
170
162
|
},
|
|
171
163
|
fromPartial(object) {
|
|
@@ -189,17 +181,17 @@ exports.StartRecordingRequest = {
|
|
|
189
181
|
},
|
|
190
182
|
};
|
|
191
183
|
function createBaseRecordingTemplate() {
|
|
192
|
-
return { layout:
|
|
184
|
+
return { layout: '', roomName: '', baseUrl: '' };
|
|
193
185
|
}
|
|
194
186
|
exports.RecordingTemplate = {
|
|
195
187
|
encode(message, writer = _m0.Writer.create()) {
|
|
196
|
-
if (message.layout !==
|
|
188
|
+
if (message.layout !== '') {
|
|
197
189
|
writer.uint32(10).string(message.layout);
|
|
198
190
|
}
|
|
199
|
-
if (message.roomName !==
|
|
191
|
+
if (message.roomName !== '') {
|
|
200
192
|
writer.uint32(18).string(message.roomName);
|
|
201
193
|
}
|
|
202
|
-
if (message.baseUrl !==
|
|
194
|
+
if (message.baseUrl !== '') {
|
|
203
195
|
writer.uint32(26).string(message.baseUrl);
|
|
204
196
|
}
|
|
205
197
|
return writer;
|
|
@@ -229,9 +221,9 @@ exports.RecordingTemplate = {
|
|
|
229
221
|
},
|
|
230
222
|
fromJSON(object) {
|
|
231
223
|
return {
|
|
232
|
-
layout: isSet(object.layout) ? String(object.layout) :
|
|
233
|
-
roomName: isSet(object.roomName) ? String(object.roomName) :
|
|
234
|
-
baseUrl: isSet(object.baseUrl) ? String(object.baseUrl) :
|
|
224
|
+
layout: isSet(object.layout) ? String(object.layout) : '',
|
|
225
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
226
|
+
baseUrl: isSet(object.baseUrl) ? String(object.baseUrl) : '',
|
|
235
227
|
};
|
|
236
228
|
},
|
|
237
229
|
toJSON(message) {
|
|
@@ -244,9 +236,9 @@ exports.RecordingTemplate = {
|
|
|
244
236
|
fromPartial(object) {
|
|
245
237
|
var _a, _b, _c;
|
|
246
238
|
const message = createBaseRecordingTemplate();
|
|
247
|
-
message.layout = (_a = object.layout) !== null && _a !== void 0 ? _a :
|
|
248
|
-
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b :
|
|
249
|
-
message.baseUrl = (_c = object.baseUrl) !== null && _c !== void 0 ? _c :
|
|
239
|
+
message.layout = (_a = object.layout) !== null && _a !== void 0 ? _a : '';
|
|
240
|
+
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b : '';
|
|
241
|
+
message.baseUrl = (_c = object.baseUrl) !== null && _c !== void 0 ? _c : '';
|
|
250
242
|
return message;
|
|
251
243
|
},
|
|
252
244
|
};
|
|
@@ -279,9 +271,7 @@ exports.RtmpOutput = {
|
|
|
279
271
|
},
|
|
280
272
|
fromJSON(object) {
|
|
281
273
|
return {
|
|
282
|
-
urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls)
|
|
283
|
-
? object.urls.map((e) => String(e))
|
|
284
|
-
: [],
|
|
274
|
+
urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls) ? object.urls.map((e) => String(e)) : [],
|
|
285
275
|
};
|
|
286
276
|
},
|
|
287
277
|
toJSON(message) {
|
|
@@ -311,7 +301,7 @@ function createBaseRecordingOptions() {
|
|
|
311
301
|
audioBitrate: 0,
|
|
312
302
|
audioFrequency: 0,
|
|
313
303
|
videoBitrate: 0,
|
|
314
|
-
profile:
|
|
304
|
+
profile: '',
|
|
315
305
|
};
|
|
316
306
|
}
|
|
317
307
|
exports.RecordingOptions = {
|
|
@@ -340,7 +330,7 @@ exports.RecordingOptions = {
|
|
|
340
330
|
if (message.videoBitrate !== 0) {
|
|
341
331
|
writer.uint32(64).int32(message.videoBitrate);
|
|
342
332
|
}
|
|
343
|
-
if (message.profile !==
|
|
333
|
+
if (message.profile !== '') {
|
|
344
334
|
writer.uint32(74).string(message.profile);
|
|
345
335
|
}
|
|
346
336
|
return writer;
|
|
@@ -393,33 +383,23 @@ exports.RecordingOptions = {
|
|
|
393
383
|
height: isSet(object.height) ? Number(object.height) : 0,
|
|
394
384
|
depth: isSet(object.depth) ? Number(object.depth) : 0,
|
|
395
385
|
framerate: isSet(object.framerate) ? Number(object.framerate) : 0,
|
|
396
|
-
audioBitrate: isSet(object.audioBitrate)
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
? Number(object.audioFrequency)
|
|
401
|
-
: 0,
|
|
402
|
-
videoBitrate: isSet(object.videoBitrate)
|
|
403
|
-
? Number(object.videoBitrate)
|
|
404
|
-
: 0,
|
|
405
|
-
profile: isSet(object.profile) ? String(object.profile) : "",
|
|
386
|
+
audioBitrate: isSet(object.audioBitrate) ? Number(object.audioBitrate) : 0,
|
|
387
|
+
audioFrequency: isSet(object.audioFrequency) ? Number(object.audioFrequency) : 0,
|
|
388
|
+
videoBitrate: isSet(object.videoBitrate) ? Number(object.videoBitrate) : 0,
|
|
389
|
+
profile: isSet(object.profile) ? String(object.profile) : '',
|
|
406
390
|
};
|
|
407
391
|
},
|
|
408
392
|
toJSON(message) {
|
|
409
393
|
const obj = {};
|
|
410
|
-
message.preset !== undefined &&
|
|
411
|
-
(obj.preset = recordingPresetToJSON(message.preset));
|
|
394
|
+
message.preset !== undefined && (obj.preset = recordingPresetToJSON(message.preset));
|
|
412
395
|
message.width !== undefined && (obj.width = Math.round(message.width));
|
|
413
396
|
message.height !== undefined && (obj.height = Math.round(message.height));
|
|
414
397
|
message.depth !== undefined && (obj.depth = Math.round(message.depth));
|
|
415
|
-
message.framerate !== undefined &&
|
|
416
|
-
|
|
417
|
-
message.audioBitrate !== undefined &&
|
|
418
|
-
(obj.audioBitrate = Math.round(message.audioBitrate));
|
|
398
|
+
message.framerate !== undefined && (obj.framerate = Math.round(message.framerate));
|
|
399
|
+
message.audioBitrate !== undefined && (obj.audioBitrate = Math.round(message.audioBitrate));
|
|
419
400
|
message.audioFrequency !== undefined &&
|
|
420
401
|
(obj.audioFrequency = Math.round(message.audioFrequency));
|
|
421
|
-
message.videoBitrate !== undefined &&
|
|
422
|
-
(obj.videoBitrate = Math.round(message.videoBitrate));
|
|
402
|
+
message.videoBitrate !== undefined && (obj.videoBitrate = Math.round(message.videoBitrate));
|
|
423
403
|
message.profile !== undefined && (obj.profile = message.profile);
|
|
424
404
|
return obj;
|
|
425
405
|
},
|
|
@@ -434,16 +414,16 @@ exports.RecordingOptions = {
|
|
|
434
414
|
message.audioBitrate = (_f = object.audioBitrate) !== null && _f !== void 0 ? _f : 0;
|
|
435
415
|
message.audioFrequency = (_g = object.audioFrequency) !== null && _g !== void 0 ? _g : 0;
|
|
436
416
|
message.videoBitrate = (_h = object.videoBitrate) !== null && _h !== void 0 ? _h : 0;
|
|
437
|
-
message.profile = (_j = object.profile) !== null && _j !== void 0 ? _j :
|
|
417
|
+
message.profile = (_j = object.profile) !== null && _j !== void 0 ? _j : '';
|
|
438
418
|
return message;
|
|
439
419
|
},
|
|
440
420
|
};
|
|
441
421
|
function createBaseStartRecordingResponse() {
|
|
442
|
-
return { recordingId:
|
|
422
|
+
return { recordingId: '' };
|
|
443
423
|
}
|
|
444
424
|
exports.StartRecordingResponse = {
|
|
445
425
|
encode(message, writer = _m0.Writer.create()) {
|
|
446
|
-
if (message.recordingId !==
|
|
426
|
+
if (message.recordingId !== '') {
|
|
447
427
|
writer.uint32(10).string(message.recordingId);
|
|
448
428
|
}
|
|
449
429
|
return writer;
|
|
@@ -467,31 +447,30 @@ exports.StartRecordingResponse = {
|
|
|
467
447
|
},
|
|
468
448
|
fromJSON(object) {
|
|
469
449
|
return {
|
|
470
|
-
recordingId: isSet(object.recordingId) ? String(object.recordingId) :
|
|
450
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
471
451
|
};
|
|
472
452
|
},
|
|
473
453
|
toJSON(message) {
|
|
474
454
|
const obj = {};
|
|
475
|
-
message.recordingId !== undefined &&
|
|
476
|
-
(obj.recordingId = message.recordingId);
|
|
455
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
477
456
|
return obj;
|
|
478
457
|
},
|
|
479
458
|
fromPartial(object) {
|
|
480
459
|
var _a;
|
|
481
460
|
const message = createBaseStartRecordingResponse();
|
|
482
|
-
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a :
|
|
461
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
483
462
|
return message;
|
|
484
463
|
},
|
|
485
464
|
};
|
|
486
465
|
function createBaseAddOutputRequest() {
|
|
487
|
-
return { recordingId:
|
|
466
|
+
return { recordingId: '', rtmpUrl: '' };
|
|
488
467
|
}
|
|
489
468
|
exports.AddOutputRequest = {
|
|
490
469
|
encode(message, writer = _m0.Writer.create()) {
|
|
491
|
-
if (message.recordingId !==
|
|
470
|
+
if (message.recordingId !== '') {
|
|
492
471
|
writer.uint32(10).string(message.recordingId);
|
|
493
472
|
}
|
|
494
|
-
if (message.rtmpUrl !==
|
|
473
|
+
if (message.rtmpUrl !== '') {
|
|
495
474
|
writer.uint32(18).string(message.rtmpUrl);
|
|
496
475
|
}
|
|
497
476
|
return writer;
|
|
@@ -518,34 +497,33 @@ exports.AddOutputRequest = {
|
|
|
518
497
|
},
|
|
519
498
|
fromJSON(object) {
|
|
520
499
|
return {
|
|
521
|
-
recordingId: isSet(object.recordingId) ? String(object.recordingId) :
|
|
522
|
-
rtmpUrl: isSet(object.rtmpUrl) ? String(object.rtmpUrl) :
|
|
500
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
501
|
+
rtmpUrl: isSet(object.rtmpUrl) ? String(object.rtmpUrl) : '',
|
|
523
502
|
};
|
|
524
503
|
},
|
|
525
504
|
toJSON(message) {
|
|
526
505
|
const obj = {};
|
|
527
|
-
message.recordingId !== undefined &&
|
|
528
|
-
(obj.recordingId = message.recordingId);
|
|
506
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
529
507
|
message.rtmpUrl !== undefined && (obj.rtmpUrl = message.rtmpUrl);
|
|
530
508
|
return obj;
|
|
531
509
|
},
|
|
532
510
|
fromPartial(object) {
|
|
533
511
|
var _a, _b;
|
|
534
512
|
const message = createBaseAddOutputRequest();
|
|
535
|
-
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a :
|
|
536
|
-
message.rtmpUrl = (_b = object.rtmpUrl) !== null && _b !== void 0 ? _b :
|
|
513
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
514
|
+
message.rtmpUrl = (_b = object.rtmpUrl) !== null && _b !== void 0 ? _b : '';
|
|
537
515
|
return message;
|
|
538
516
|
},
|
|
539
517
|
};
|
|
540
518
|
function createBaseRemoveOutputRequest() {
|
|
541
|
-
return { recordingId:
|
|
519
|
+
return { recordingId: '', rtmpUrl: '' };
|
|
542
520
|
}
|
|
543
521
|
exports.RemoveOutputRequest = {
|
|
544
522
|
encode(message, writer = _m0.Writer.create()) {
|
|
545
|
-
if (message.recordingId !==
|
|
523
|
+
if (message.recordingId !== '') {
|
|
546
524
|
writer.uint32(10).string(message.recordingId);
|
|
547
525
|
}
|
|
548
|
-
if (message.rtmpUrl !==
|
|
526
|
+
if (message.rtmpUrl !== '') {
|
|
549
527
|
writer.uint32(18).string(message.rtmpUrl);
|
|
550
528
|
}
|
|
551
529
|
return writer;
|
|
@@ -572,31 +550,30 @@ exports.RemoveOutputRequest = {
|
|
|
572
550
|
},
|
|
573
551
|
fromJSON(object) {
|
|
574
552
|
return {
|
|
575
|
-
recordingId: isSet(object.recordingId) ? String(object.recordingId) :
|
|
576
|
-
rtmpUrl: isSet(object.rtmpUrl) ? String(object.rtmpUrl) :
|
|
553
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
554
|
+
rtmpUrl: isSet(object.rtmpUrl) ? String(object.rtmpUrl) : '',
|
|
577
555
|
};
|
|
578
556
|
},
|
|
579
557
|
toJSON(message) {
|
|
580
558
|
const obj = {};
|
|
581
|
-
message.recordingId !== undefined &&
|
|
582
|
-
(obj.recordingId = message.recordingId);
|
|
559
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
583
560
|
message.rtmpUrl !== undefined && (obj.rtmpUrl = message.rtmpUrl);
|
|
584
561
|
return obj;
|
|
585
562
|
},
|
|
586
563
|
fromPartial(object) {
|
|
587
564
|
var _a, _b;
|
|
588
565
|
const message = createBaseRemoveOutputRequest();
|
|
589
|
-
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a :
|
|
590
|
-
message.rtmpUrl = (_b = object.rtmpUrl) !== null && _b !== void 0 ? _b :
|
|
566
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
567
|
+
message.rtmpUrl = (_b = object.rtmpUrl) !== null && _b !== void 0 ? _b : '';
|
|
591
568
|
return message;
|
|
592
569
|
},
|
|
593
570
|
};
|
|
594
571
|
function createBaseEndRecordingRequest() {
|
|
595
|
-
return { recordingId:
|
|
572
|
+
return { recordingId: '' };
|
|
596
573
|
}
|
|
597
574
|
exports.EndRecordingRequest = {
|
|
598
575
|
encode(message, writer = _m0.Writer.create()) {
|
|
599
|
-
if (message.recordingId !==
|
|
576
|
+
if (message.recordingId !== '') {
|
|
600
577
|
writer.uint32(10).string(message.recordingId);
|
|
601
578
|
}
|
|
602
579
|
return writer;
|
|
@@ -620,44 +597,36 @@ exports.EndRecordingRequest = {
|
|
|
620
597
|
},
|
|
621
598
|
fromJSON(object) {
|
|
622
599
|
return {
|
|
623
|
-
recordingId: isSet(object.recordingId) ? String(object.recordingId) :
|
|
600
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
624
601
|
};
|
|
625
602
|
},
|
|
626
603
|
toJSON(message) {
|
|
627
604
|
const obj = {};
|
|
628
|
-
message.recordingId !== undefined &&
|
|
629
|
-
(obj.recordingId = message.recordingId);
|
|
605
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
630
606
|
return obj;
|
|
631
607
|
},
|
|
632
608
|
fromPartial(object) {
|
|
633
609
|
var _a;
|
|
634
610
|
const message = createBaseEndRecordingRequest();
|
|
635
|
-
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a :
|
|
611
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
636
612
|
return message;
|
|
637
613
|
},
|
|
638
614
|
};
|
|
639
615
|
function createBaseRecordingInfo() {
|
|
640
|
-
return {
|
|
641
|
-
id: "",
|
|
642
|
-
roomName: "",
|
|
643
|
-
active: false,
|
|
644
|
-
error: "",
|
|
645
|
-
file: undefined,
|
|
646
|
-
rtmp: [],
|
|
647
|
-
};
|
|
616
|
+
return { id: '', roomName: '', active: false, error: '', file: undefined, rtmp: [] };
|
|
648
617
|
}
|
|
649
618
|
exports.RecordingInfo = {
|
|
650
619
|
encode(message, writer = _m0.Writer.create()) {
|
|
651
|
-
if (message.id !==
|
|
620
|
+
if (message.id !== '') {
|
|
652
621
|
writer.uint32(10).string(message.id);
|
|
653
622
|
}
|
|
654
|
-
if (message.roomName !==
|
|
623
|
+
if (message.roomName !== '') {
|
|
655
624
|
writer.uint32(18).string(message.roomName);
|
|
656
625
|
}
|
|
657
626
|
if (message.active === true) {
|
|
658
627
|
writer.uint32(24).bool(message.active);
|
|
659
628
|
}
|
|
660
|
-
if (message.error !==
|
|
629
|
+
if (message.error !== '') {
|
|
661
630
|
writer.uint32(34).string(message.error);
|
|
662
631
|
}
|
|
663
632
|
if (message.file !== undefined) {
|
|
@@ -702,14 +671,12 @@ exports.RecordingInfo = {
|
|
|
702
671
|
},
|
|
703
672
|
fromJSON(object) {
|
|
704
673
|
return {
|
|
705
|
-
id: isSet(object.id) ? String(object.id) :
|
|
706
|
-
roomName: isSet(object.roomName) ? String(object.roomName) :
|
|
674
|
+
id: isSet(object.id) ? String(object.id) : '',
|
|
675
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
707
676
|
active: isSet(object.active) ? Boolean(object.active) : false,
|
|
708
|
-
error: isSet(object.error) ? String(object.error) :
|
|
677
|
+
error: isSet(object.error) ? String(object.error) : '',
|
|
709
678
|
file: isSet(object.file) ? exports.FileResult.fromJSON(object.file) : undefined,
|
|
710
|
-
rtmp: Array.isArray(object === null || object === void 0 ? void 0 : object.rtmp)
|
|
711
|
-
? object.rtmp.map((e) => exports.RtmpResult.fromJSON(e))
|
|
712
|
-
: [],
|
|
679
|
+
rtmp: Array.isArray(object === null || object === void 0 ? void 0 : object.rtmp) ? object.rtmp.map((e) => exports.RtmpResult.fromJSON(e)) : [],
|
|
713
680
|
};
|
|
714
681
|
},
|
|
715
682
|
toJSON(message) {
|
|
@@ -721,7 +688,7 @@ exports.RecordingInfo = {
|
|
|
721
688
|
message.file !== undefined &&
|
|
722
689
|
(obj.file = message.file ? exports.FileResult.toJSON(message.file) : undefined);
|
|
723
690
|
if (message.rtmp) {
|
|
724
|
-
obj.rtmp = message.rtmp.map((e) => e ? exports.RtmpResult.toJSON(e) : undefined);
|
|
691
|
+
obj.rtmp = message.rtmp.map((e) => (e ? exports.RtmpResult.toJSON(e) : undefined));
|
|
725
692
|
}
|
|
726
693
|
else {
|
|
727
694
|
obj.rtmp = [];
|
|
@@ -731,10 +698,10 @@ exports.RecordingInfo = {
|
|
|
731
698
|
fromPartial(object) {
|
|
732
699
|
var _a, _b, _c, _d, _e;
|
|
733
700
|
const message = createBaseRecordingInfo();
|
|
734
|
-
message.id = (_a = object.id) !== null && _a !== void 0 ? _a :
|
|
735
|
-
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b :
|
|
701
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : '';
|
|
702
|
+
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b : '';
|
|
736
703
|
message.active = (_c = object.active) !== null && _c !== void 0 ? _c : false;
|
|
737
|
-
message.error = (_d = object.error) !== null && _d !== void 0 ? _d :
|
|
704
|
+
message.error = (_d = object.error) !== null && _d !== void 0 ? _d : '';
|
|
738
705
|
message.file =
|
|
739
706
|
object.file !== undefined && object.file !== null
|
|
740
707
|
? exports.FileResult.fromPartial(object.file)
|
|
@@ -744,11 +711,11 @@ exports.RecordingInfo = {
|
|
|
744
711
|
},
|
|
745
712
|
};
|
|
746
713
|
function createBaseFileResult() {
|
|
747
|
-
return { downloadUrl:
|
|
714
|
+
return { downloadUrl: '', duration: 0 };
|
|
748
715
|
}
|
|
749
716
|
exports.FileResult = {
|
|
750
717
|
encode(message, writer = _m0.Writer.create()) {
|
|
751
|
-
if (message.downloadUrl !==
|
|
718
|
+
if (message.downloadUrl !== '') {
|
|
752
719
|
writer.uint32(10).string(message.downloadUrl);
|
|
753
720
|
}
|
|
754
721
|
if (message.duration !== 0) {
|
|
@@ -778,32 +745,30 @@ exports.FileResult = {
|
|
|
778
745
|
},
|
|
779
746
|
fromJSON(object) {
|
|
780
747
|
return {
|
|
781
|
-
downloadUrl: isSet(object.downloadUrl) ? String(object.downloadUrl) :
|
|
748
|
+
downloadUrl: isSet(object.downloadUrl) ? String(object.downloadUrl) : '',
|
|
782
749
|
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
783
750
|
};
|
|
784
751
|
},
|
|
785
752
|
toJSON(message) {
|
|
786
753
|
const obj = {};
|
|
787
|
-
message.downloadUrl !== undefined &&
|
|
788
|
-
|
|
789
|
-
message.duration !== undefined &&
|
|
790
|
-
(obj.duration = Math.round(message.duration));
|
|
754
|
+
message.downloadUrl !== undefined && (obj.downloadUrl = message.downloadUrl);
|
|
755
|
+
message.duration !== undefined && (obj.duration = Math.round(message.duration));
|
|
791
756
|
return obj;
|
|
792
757
|
},
|
|
793
758
|
fromPartial(object) {
|
|
794
759
|
var _a, _b;
|
|
795
760
|
const message = createBaseFileResult();
|
|
796
|
-
message.downloadUrl = (_a = object.downloadUrl) !== null && _a !== void 0 ? _a :
|
|
761
|
+
message.downloadUrl = (_a = object.downloadUrl) !== null && _a !== void 0 ? _a : '';
|
|
797
762
|
message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
|
|
798
763
|
return message;
|
|
799
764
|
},
|
|
800
765
|
};
|
|
801
766
|
function createBaseRtmpResult() {
|
|
802
|
-
return { streamUrl:
|
|
767
|
+
return { streamUrl: '', duration: 0 };
|
|
803
768
|
}
|
|
804
769
|
exports.RtmpResult = {
|
|
805
770
|
encode(message, writer = _m0.Writer.create()) {
|
|
806
|
-
if (message.streamUrl !==
|
|
771
|
+
if (message.streamUrl !== '') {
|
|
807
772
|
writer.uint32(10).string(message.streamUrl);
|
|
808
773
|
}
|
|
809
774
|
if (message.duration !== 0) {
|
|
@@ -833,39 +798,38 @@ exports.RtmpResult = {
|
|
|
833
798
|
},
|
|
834
799
|
fromJSON(object) {
|
|
835
800
|
return {
|
|
836
|
-
streamUrl: isSet(object.streamUrl) ? String(object.streamUrl) :
|
|
801
|
+
streamUrl: isSet(object.streamUrl) ? String(object.streamUrl) : '',
|
|
837
802
|
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
838
803
|
};
|
|
839
804
|
},
|
|
840
805
|
toJSON(message) {
|
|
841
806
|
const obj = {};
|
|
842
807
|
message.streamUrl !== undefined && (obj.streamUrl = message.streamUrl);
|
|
843
|
-
message.duration !== undefined &&
|
|
844
|
-
(obj.duration = Math.round(message.duration));
|
|
808
|
+
message.duration !== undefined && (obj.duration = Math.round(message.duration));
|
|
845
809
|
return obj;
|
|
846
810
|
},
|
|
847
811
|
fromPartial(object) {
|
|
848
812
|
var _a, _b;
|
|
849
813
|
const message = createBaseRtmpResult();
|
|
850
|
-
message.streamUrl = (_a = object.streamUrl) !== null && _a !== void 0 ? _a :
|
|
814
|
+
message.streamUrl = (_a = object.streamUrl) !== null && _a !== void 0 ? _a : '';
|
|
851
815
|
message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
|
|
852
816
|
return message;
|
|
853
817
|
},
|
|
854
818
|
};
|
|
855
819
|
var globalThis = (() => {
|
|
856
|
-
if (typeof globalThis !==
|
|
820
|
+
if (typeof globalThis !== 'undefined')
|
|
857
821
|
return globalThis;
|
|
858
|
-
if (typeof self !==
|
|
822
|
+
if (typeof self !== 'undefined')
|
|
859
823
|
return self;
|
|
860
|
-
if (typeof window !==
|
|
824
|
+
if (typeof window !== 'undefined')
|
|
861
825
|
return window;
|
|
862
|
-
if (typeof global !==
|
|
826
|
+
if (typeof global !== 'undefined')
|
|
863
827
|
return global;
|
|
864
|
-
throw
|
|
828
|
+
throw 'Unable to locate global object';
|
|
865
829
|
})();
|
|
866
830
|
function longToNumber(long) {
|
|
867
831
|
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
868
|
-
throw new globalThis.Error(
|
|
832
|
+
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
|
|
869
833
|
}
|
|
870
834
|
return long.toNumber();
|
|
871
835
|
}
|