livekit-client 0.17.4 → 0.17.5
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/dist/proto/google/protobuf/timestamp.d.ts +12 -2
- package/dist/proto/google/protobuf/timestamp.js +40 -25
- package/dist/proto/google/protobuf/timestamp.js.map +1 -1
- package/dist/proto/livekit_models.d.ts +521 -17
- package/dist/proto/livekit_models.js +562 -988
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +3405 -30
- package/dist/proto/livekit_rtc.js +782 -1233
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/Room.js +8 -0
- package/dist/room/Room.js.map +1 -1
- package/dist/room/track/options.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/proto/google/protobuf/timestamp.ts +29 -19
- package/src/proto/livekit_models.ts +536 -879
- package/src/proto/livekit_rtc.ts +766 -1174
- package/src/room/Room.ts +8 -0
- package/src/room/track/options.ts +1 -1
- package/src/version.ts +1 -1
@@ -1,4 +1,23 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
23
|
};
|
@@ -6,7 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
25
|
exports.SimulateScenario = exports.DataChannelInfo = exports.SyncState = exports.SubscriptionPermissionUpdate = exports.SubscriptionPermission = exports.TrackPermission = exports.SubscribedQualityUpdate = exports.SubscribedQuality = exports.StreamStateUpdate = exports.StreamStateInfo = exports.ConnectionQualityUpdate = exports.ConnectionQualityInfo = exports.RoomUpdate = exports.SpeakersChanged = exports.ICEServer = exports.UpdateVideoLayers = exports.LeaveRequest = exports.UpdateTrackSettings = exports.UpdateSubscription = exports.ParticipantUpdate = exports.SessionDescription = exports.TrackUnpublishedResponse = exports.TrackPublishedResponse = exports.JoinResponse = exports.MuteTrackRequest = exports.TrickleRequest = exports.AddTrackRequest = exports.SignalResponse = exports.SignalRequest = exports.streamStateToJSON = exports.streamStateFromJSON = exports.StreamState = exports.signalTargetToJSON = exports.signalTargetFromJSON = exports.SignalTarget = exports.protobufPackage = void 0;
|
7
26
|
/* eslint-disable */
|
8
27
|
const long_1 = __importDefault(require("long"));
|
9
|
-
const
|
28
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
10
29
|
const livekit_models_1 = require("./livekit_models");
|
11
30
|
exports.protobufPackage = "livekit";
|
12
31
|
var SignalTarget;
|
@@ -73,9 +92,24 @@ function streamStateToJSON(object) {
|
|
73
92
|
}
|
74
93
|
}
|
75
94
|
exports.streamStateToJSON = streamStateToJSON;
|
76
|
-
|
95
|
+
function createBaseSignalRequest() {
|
96
|
+
return {
|
97
|
+
offer: undefined,
|
98
|
+
answer: undefined,
|
99
|
+
trickle: undefined,
|
100
|
+
addTrack: undefined,
|
101
|
+
mute: undefined,
|
102
|
+
subscription: undefined,
|
103
|
+
trackSetting: undefined,
|
104
|
+
leave: undefined,
|
105
|
+
updateLayers: undefined,
|
106
|
+
subscriptionPermission: undefined,
|
107
|
+
syncState: undefined,
|
108
|
+
simulate: undefined,
|
109
|
+
};
|
110
|
+
}
|
77
111
|
exports.SignalRequest = {
|
78
|
-
encode(message, writer =
|
112
|
+
encode(message, writer = _m0.Writer.create()) {
|
79
113
|
if (message.offer !== undefined) {
|
80
114
|
exports.SessionDescription.encode(message.offer, writer.uint32(10).fork()).ldelim();
|
81
115
|
}
|
@@ -115,9 +149,9 @@ exports.SignalRequest = {
|
|
115
149
|
return writer;
|
116
150
|
},
|
117
151
|
decode(input, length) {
|
118
|
-
const reader = input instanceof
|
152
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
119
153
|
let end = length === undefined ? reader.len : reader.pos + length;
|
120
|
-
const message =
|
154
|
+
const message = createBaseSignalRequest();
|
121
155
|
while (reader.pos < end) {
|
122
156
|
const tag = reader.uint32();
|
123
157
|
switch (tag >>> 3) {
|
@@ -165,81 +199,44 @@ exports.SignalRequest = {
|
|
165
199
|
return message;
|
166
200
|
},
|
167
201
|
fromJSON(object) {
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
message.trackSetting = exports.UpdateTrackSettings.fromJSON(object.trackSetting);
|
207
|
-
}
|
208
|
-
else {
|
209
|
-
message.trackSetting = undefined;
|
210
|
-
}
|
211
|
-
if (object.leave !== undefined && object.leave !== null) {
|
212
|
-
message.leave = exports.LeaveRequest.fromJSON(object.leave);
|
213
|
-
}
|
214
|
-
else {
|
215
|
-
message.leave = undefined;
|
216
|
-
}
|
217
|
-
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
218
|
-
message.updateLayers = exports.UpdateVideoLayers.fromJSON(object.updateLayers);
|
219
|
-
}
|
220
|
-
else {
|
221
|
-
message.updateLayers = undefined;
|
222
|
-
}
|
223
|
-
if (object.subscriptionPermission !== undefined &&
|
224
|
-
object.subscriptionPermission !== null) {
|
225
|
-
message.subscriptionPermission = exports.SubscriptionPermission.fromJSON(object.subscriptionPermission);
|
226
|
-
}
|
227
|
-
else {
|
228
|
-
message.subscriptionPermission = undefined;
|
229
|
-
}
|
230
|
-
if (object.syncState !== undefined && object.syncState !== null) {
|
231
|
-
message.syncState = exports.SyncState.fromJSON(object.syncState);
|
232
|
-
}
|
233
|
-
else {
|
234
|
-
message.syncState = undefined;
|
235
|
-
}
|
236
|
-
if (object.simulate !== undefined && object.simulate !== null) {
|
237
|
-
message.simulate = exports.SimulateScenario.fromJSON(object.simulate);
|
238
|
-
}
|
239
|
-
else {
|
240
|
-
message.simulate = undefined;
|
241
|
-
}
|
242
|
-
return message;
|
202
|
+
return {
|
203
|
+
offer: isSet(object.offer)
|
204
|
+
? exports.SessionDescription.fromJSON(object.offer)
|
205
|
+
: undefined,
|
206
|
+
answer: isSet(object.answer)
|
207
|
+
? exports.SessionDescription.fromJSON(object.answer)
|
208
|
+
: undefined,
|
209
|
+
trickle: isSet(object.trickle)
|
210
|
+
? exports.TrickleRequest.fromJSON(object.trickle)
|
211
|
+
: undefined,
|
212
|
+
addTrack: isSet(object.addTrack)
|
213
|
+
? exports.AddTrackRequest.fromJSON(object.addTrack)
|
214
|
+
: undefined,
|
215
|
+
mute: isSet(object.mute)
|
216
|
+
? exports.MuteTrackRequest.fromJSON(object.mute)
|
217
|
+
: undefined,
|
218
|
+
subscription: isSet(object.subscription)
|
219
|
+
? exports.UpdateSubscription.fromJSON(object.subscription)
|
220
|
+
: undefined,
|
221
|
+
trackSetting: isSet(object.trackSetting)
|
222
|
+
? exports.UpdateTrackSettings.fromJSON(object.trackSetting)
|
223
|
+
: undefined,
|
224
|
+
leave: isSet(object.leave)
|
225
|
+
? exports.LeaveRequest.fromJSON(object.leave)
|
226
|
+
: undefined,
|
227
|
+
updateLayers: isSet(object.updateLayers)
|
228
|
+
? exports.UpdateVideoLayers.fromJSON(object.updateLayers)
|
229
|
+
: undefined,
|
230
|
+
subscriptionPermission: isSet(object.subscriptionPermission)
|
231
|
+
? exports.SubscriptionPermission.fromJSON(object.subscriptionPermission)
|
232
|
+
: undefined,
|
233
|
+
syncState: isSet(object.syncState)
|
234
|
+
? exports.SyncState.fromJSON(object.syncState)
|
235
|
+
: undefined,
|
236
|
+
simulate: isSet(object.simulate)
|
237
|
+
? exports.SimulateScenario.fromJSON(object.simulate)
|
238
|
+
: undefined,
|
239
|
+
};
|
243
240
|
},
|
244
241
|
toJSON(message) {
|
245
242
|
const obj = {};
|
@@ -294,86 +291,81 @@ exports.SignalRequest = {
|
|
294
291
|
return obj;
|
295
292
|
},
|
296
293
|
fromPartial(object) {
|
297
|
-
const message =
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
message.updateLayers = exports.UpdateVideoLayers.fromPartial(object.updateLayers);
|
348
|
-
}
|
349
|
-
else {
|
350
|
-
message.updateLayers = undefined;
|
351
|
-
}
|
352
|
-
if (object.subscriptionPermission !== undefined &&
|
353
|
-
object.subscriptionPermission !== null) {
|
354
|
-
message.subscriptionPermission = exports.SubscriptionPermission.fromPartial(object.subscriptionPermission);
|
355
|
-
}
|
356
|
-
else {
|
357
|
-
message.subscriptionPermission = undefined;
|
358
|
-
}
|
359
|
-
if (object.syncState !== undefined && object.syncState !== null) {
|
360
|
-
message.syncState = exports.SyncState.fromPartial(object.syncState);
|
361
|
-
}
|
362
|
-
else {
|
363
|
-
message.syncState = undefined;
|
364
|
-
}
|
365
|
-
if (object.simulate !== undefined && object.simulate !== null) {
|
366
|
-
message.simulate = exports.SimulateScenario.fromPartial(object.simulate);
|
367
|
-
}
|
368
|
-
else {
|
369
|
-
message.simulate = undefined;
|
370
|
-
}
|
294
|
+
const message = createBaseSignalRequest();
|
295
|
+
message.offer =
|
296
|
+
object.offer !== undefined && object.offer !== null
|
297
|
+
? exports.SessionDescription.fromPartial(object.offer)
|
298
|
+
: undefined;
|
299
|
+
message.answer =
|
300
|
+
object.answer !== undefined && object.answer !== null
|
301
|
+
? exports.SessionDescription.fromPartial(object.answer)
|
302
|
+
: undefined;
|
303
|
+
message.trickle =
|
304
|
+
object.trickle !== undefined && object.trickle !== null
|
305
|
+
? exports.TrickleRequest.fromPartial(object.trickle)
|
306
|
+
: undefined;
|
307
|
+
message.addTrack =
|
308
|
+
object.addTrack !== undefined && object.addTrack !== null
|
309
|
+
? exports.AddTrackRequest.fromPartial(object.addTrack)
|
310
|
+
: undefined;
|
311
|
+
message.mute =
|
312
|
+
object.mute !== undefined && object.mute !== null
|
313
|
+
? exports.MuteTrackRequest.fromPartial(object.mute)
|
314
|
+
: undefined;
|
315
|
+
message.subscription =
|
316
|
+
object.subscription !== undefined && object.subscription !== null
|
317
|
+
? exports.UpdateSubscription.fromPartial(object.subscription)
|
318
|
+
: undefined;
|
319
|
+
message.trackSetting =
|
320
|
+
object.trackSetting !== undefined && object.trackSetting !== null
|
321
|
+
? exports.UpdateTrackSettings.fromPartial(object.trackSetting)
|
322
|
+
: undefined;
|
323
|
+
message.leave =
|
324
|
+
object.leave !== undefined && object.leave !== null
|
325
|
+
? exports.LeaveRequest.fromPartial(object.leave)
|
326
|
+
: undefined;
|
327
|
+
message.updateLayers =
|
328
|
+
object.updateLayers !== undefined && object.updateLayers !== null
|
329
|
+
? exports.UpdateVideoLayers.fromPartial(object.updateLayers)
|
330
|
+
: undefined;
|
331
|
+
message.subscriptionPermission =
|
332
|
+
object.subscriptionPermission !== undefined &&
|
333
|
+
object.subscriptionPermission !== null
|
334
|
+
? exports.SubscriptionPermission.fromPartial(object.subscriptionPermission)
|
335
|
+
: undefined;
|
336
|
+
message.syncState =
|
337
|
+
object.syncState !== undefined && object.syncState !== null
|
338
|
+
? exports.SyncState.fromPartial(object.syncState)
|
339
|
+
: undefined;
|
340
|
+
message.simulate =
|
341
|
+
object.simulate !== undefined && object.simulate !== null
|
342
|
+
? exports.SimulateScenario.fromPartial(object.simulate)
|
343
|
+
: undefined;
|
371
344
|
return message;
|
372
345
|
},
|
373
346
|
};
|
374
|
-
|
347
|
+
function createBaseSignalResponse() {
|
348
|
+
return {
|
349
|
+
join: undefined,
|
350
|
+
answer: undefined,
|
351
|
+
offer: undefined,
|
352
|
+
trickle: undefined,
|
353
|
+
update: undefined,
|
354
|
+
trackPublished: undefined,
|
355
|
+
leave: undefined,
|
356
|
+
mute: undefined,
|
357
|
+
speakersChanged: undefined,
|
358
|
+
roomUpdate: undefined,
|
359
|
+
connectionQuality: undefined,
|
360
|
+
streamStateUpdate: undefined,
|
361
|
+
subscribedQualityUpdate: undefined,
|
362
|
+
subscriptionPermissionUpdate: undefined,
|
363
|
+
refreshToken: undefined,
|
364
|
+
trackUnpublished: undefined,
|
365
|
+
};
|
366
|
+
}
|
375
367
|
exports.SignalResponse = {
|
376
|
-
encode(message, writer =
|
368
|
+
encode(message, writer = _m0.Writer.create()) {
|
377
369
|
if (message.join !== undefined) {
|
378
370
|
exports.JoinResponse.encode(message.join, writer.uint32(10).fork()).ldelim();
|
379
371
|
}
|
@@ -425,9 +417,9 @@ exports.SignalResponse = {
|
|
425
417
|
return writer;
|
426
418
|
},
|
427
419
|
decode(input, length) {
|
428
|
-
const reader = input instanceof
|
420
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
429
421
|
let end = length === undefined ? reader.len : reader.pos + length;
|
430
|
-
const message =
|
422
|
+
const message = createBaseSignalResponse();
|
431
423
|
while (reader.pos < end) {
|
432
424
|
const tag = reader.uint32();
|
433
425
|
switch (tag >>> 3) {
|
@@ -488,111 +480,54 @@ exports.SignalResponse = {
|
|
488
480
|
return message;
|
489
481
|
},
|
490
482
|
fromJSON(object) {
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
}
|
540
|
-
if (object.speakersChanged !== undefined &&
|
541
|
-
object.speakersChanged !== null) {
|
542
|
-
message.speakersChanged = exports.SpeakersChanged.fromJSON(object.speakersChanged);
|
543
|
-
}
|
544
|
-
else {
|
545
|
-
message.speakersChanged = undefined;
|
546
|
-
}
|
547
|
-
if (object.roomUpdate !== undefined && object.roomUpdate !== null) {
|
548
|
-
message.roomUpdate = exports.RoomUpdate.fromJSON(object.roomUpdate);
|
549
|
-
}
|
550
|
-
else {
|
551
|
-
message.roomUpdate = undefined;
|
552
|
-
}
|
553
|
-
if (object.connectionQuality !== undefined &&
|
554
|
-
object.connectionQuality !== null) {
|
555
|
-
message.connectionQuality = exports.ConnectionQualityUpdate.fromJSON(object.connectionQuality);
|
556
|
-
}
|
557
|
-
else {
|
558
|
-
message.connectionQuality = undefined;
|
559
|
-
}
|
560
|
-
if (object.streamStateUpdate !== undefined &&
|
561
|
-
object.streamStateUpdate !== null) {
|
562
|
-
message.streamStateUpdate = exports.StreamStateUpdate.fromJSON(object.streamStateUpdate);
|
563
|
-
}
|
564
|
-
else {
|
565
|
-
message.streamStateUpdate = undefined;
|
566
|
-
}
|
567
|
-
if (object.subscribedQualityUpdate !== undefined &&
|
568
|
-
object.subscribedQualityUpdate !== null) {
|
569
|
-
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate);
|
570
|
-
}
|
571
|
-
else {
|
572
|
-
message.subscribedQualityUpdate = undefined;
|
573
|
-
}
|
574
|
-
if (object.subscriptionPermissionUpdate !== undefined &&
|
575
|
-
object.subscriptionPermissionUpdate !== null) {
|
576
|
-
message.subscriptionPermissionUpdate =
|
577
|
-
exports.SubscriptionPermissionUpdate.fromJSON(object.subscriptionPermissionUpdate);
|
578
|
-
}
|
579
|
-
else {
|
580
|
-
message.subscriptionPermissionUpdate = undefined;
|
581
|
-
}
|
582
|
-
if (object.refreshToken !== undefined && object.refreshToken !== null) {
|
583
|
-
message.refreshToken = String(object.refreshToken);
|
584
|
-
}
|
585
|
-
else {
|
586
|
-
message.refreshToken = undefined;
|
587
|
-
}
|
588
|
-
if (object.trackUnpublished !== undefined &&
|
589
|
-
object.trackUnpublished !== null) {
|
590
|
-
message.trackUnpublished = exports.TrackUnpublishedResponse.fromJSON(object.trackUnpublished);
|
591
|
-
}
|
592
|
-
else {
|
593
|
-
message.trackUnpublished = undefined;
|
594
|
-
}
|
595
|
-
return message;
|
483
|
+
return {
|
484
|
+
join: isSet(object.join) ? exports.JoinResponse.fromJSON(object.join) : undefined,
|
485
|
+
answer: isSet(object.answer)
|
486
|
+
? exports.SessionDescription.fromJSON(object.answer)
|
487
|
+
: undefined,
|
488
|
+
offer: isSet(object.offer)
|
489
|
+
? exports.SessionDescription.fromJSON(object.offer)
|
490
|
+
: undefined,
|
491
|
+
trickle: isSet(object.trickle)
|
492
|
+
? exports.TrickleRequest.fromJSON(object.trickle)
|
493
|
+
: undefined,
|
494
|
+
update: isSet(object.update)
|
495
|
+
? exports.ParticipantUpdate.fromJSON(object.update)
|
496
|
+
: undefined,
|
497
|
+
trackPublished: isSet(object.trackPublished)
|
498
|
+
? exports.TrackPublishedResponse.fromJSON(object.trackPublished)
|
499
|
+
: undefined,
|
500
|
+
leave: isSet(object.leave)
|
501
|
+
? exports.LeaveRequest.fromJSON(object.leave)
|
502
|
+
: undefined,
|
503
|
+
mute: isSet(object.mute)
|
504
|
+
? exports.MuteTrackRequest.fromJSON(object.mute)
|
505
|
+
: undefined,
|
506
|
+
speakersChanged: isSet(object.speakersChanged)
|
507
|
+
? exports.SpeakersChanged.fromJSON(object.speakersChanged)
|
508
|
+
: undefined,
|
509
|
+
roomUpdate: isSet(object.roomUpdate)
|
510
|
+
? exports.RoomUpdate.fromJSON(object.roomUpdate)
|
511
|
+
: undefined,
|
512
|
+
connectionQuality: isSet(object.connectionQuality)
|
513
|
+
? exports.ConnectionQualityUpdate.fromJSON(object.connectionQuality)
|
514
|
+
: undefined,
|
515
|
+
streamStateUpdate: isSet(object.streamStateUpdate)
|
516
|
+
? exports.StreamStateUpdate.fromJSON(object.streamStateUpdate)
|
517
|
+
: undefined,
|
518
|
+
subscribedQualityUpdate: isSet(object.subscribedQualityUpdate)
|
519
|
+
? exports.SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate)
|
520
|
+
: undefined,
|
521
|
+
subscriptionPermissionUpdate: isSet(object.subscriptionPermissionUpdate)
|
522
|
+
? exports.SubscriptionPermissionUpdate.fromJSON(object.subscriptionPermissionUpdate)
|
523
|
+
: undefined,
|
524
|
+
refreshToken: isSet(object.refreshToken)
|
525
|
+
? String(object.refreshToken)
|
526
|
+
: undefined,
|
527
|
+
trackUnpublished: isSet(object.trackUnpublished)
|
528
|
+
? exports.TrackUnpublishedResponse.fromJSON(object.trackUnpublished)
|
529
|
+
: undefined,
|
530
|
+
};
|
596
531
|
},
|
597
532
|
toJSON(message) {
|
598
533
|
const obj = {};
|
@@ -660,120 +595,90 @@ exports.SignalResponse = {
|
|
660
595
|
},
|
661
596
|
fromPartial(object) {
|
662
597
|
var _a;
|
663
|
-
const message =
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
}
|
725
|
-
if (object.connectionQuality !== undefined &&
|
726
|
-
object.connectionQuality !== null) {
|
727
|
-
message.connectionQuality = exports.ConnectionQualityUpdate.fromPartial(object.connectionQuality);
|
728
|
-
}
|
729
|
-
else {
|
730
|
-
message.connectionQuality = undefined;
|
731
|
-
}
|
732
|
-
if (object.streamStateUpdate !== undefined &&
|
733
|
-
object.streamStateUpdate !== null) {
|
734
|
-
message.streamStateUpdate = exports.StreamStateUpdate.fromPartial(object.streamStateUpdate);
|
735
|
-
}
|
736
|
-
else {
|
737
|
-
message.streamStateUpdate = undefined;
|
738
|
-
}
|
739
|
-
if (object.subscribedQualityUpdate !== undefined &&
|
740
|
-
object.subscribedQualityUpdate !== null) {
|
741
|
-
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate);
|
742
|
-
}
|
743
|
-
else {
|
744
|
-
message.subscribedQualityUpdate = undefined;
|
745
|
-
}
|
746
|
-
if (object.subscriptionPermissionUpdate !== undefined &&
|
747
|
-
object.subscriptionPermissionUpdate !== null) {
|
748
|
-
message.subscriptionPermissionUpdate =
|
749
|
-
exports.SubscriptionPermissionUpdate.fromPartial(object.subscriptionPermissionUpdate);
|
750
|
-
}
|
751
|
-
else {
|
752
|
-
message.subscriptionPermissionUpdate = undefined;
|
753
|
-
}
|
598
|
+
const message = createBaseSignalResponse();
|
599
|
+
message.join =
|
600
|
+
object.join !== undefined && object.join !== null
|
601
|
+
? exports.JoinResponse.fromPartial(object.join)
|
602
|
+
: undefined;
|
603
|
+
message.answer =
|
604
|
+
object.answer !== undefined && object.answer !== null
|
605
|
+
? exports.SessionDescription.fromPartial(object.answer)
|
606
|
+
: undefined;
|
607
|
+
message.offer =
|
608
|
+
object.offer !== undefined && object.offer !== null
|
609
|
+
? exports.SessionDescription.fromPartial(object.offer)
|
610
|
+
: undefined;
|
611
|
+
message.trickle =
|
612
|
+
object.trickle !== undefined && object.trickle !== null
|
613
|
+
? exports.TrickleRequest.fromPartial(object.trickle)
|
614
|
+
: undefined;
|
615
|
+
message.update =
|
616
|
+
object.update !== undefined && object.update !== null
|
617
|
+
? exports.ParticipantUpdate.fromPartial(object.update)
|
618
|
+
: undefined;
|
619
|
+
message.trackPublished =
|
620
|
+
object.trackPublished !== undefined && object.trackPublished !== null
|
621
|
+
? exports.TrackPublishedResponse.fromPartial(object.trackPublished)
|
622
|
+
: undefined;
|
623
|
+
message.leave =
|
624
|
+
object.leave !== undefined && object.leave !== null
|
625
|
+
? exports.LeaveRequest.fromPartial(object.leave)
|
626
|
+
: undefined;
|
627
|
+
message.mute =
|
628
|
+
object.mute !== undefined && object.mute !== null
|
629
|
+
? exports.MuteTrackRequest.fromPartial(object.mute)
|
630
|
+
: undefined;
|
631
|
+
message.speakersChanged =
|
632
|
+
object.speakersChanged !== undefined && object.speakersChanged !== null
|
633
|
+
? exports.SpeakersChanged.fromPartial(object.speakersChanged)
|
634
|
+
: undefined;
|
635
|
+
message.roomUpdate =
|
636
|
+
object.roomUpdate !== undefined && object.roomUpdate !== null
|
637
|
+
? exports.RoomUpdate.fromPartial(object.roomUpdate)
|
638
|
+
: undefined;
|
639
|
+
message.connectionQuality =
|
640
|
+
object.connectionQuality !== undefined &&
|
641
|
+
object.connectionQuality !== null
|
642
|
+
? exports.ConnectionQualityUpdate.fromPartial(object.connectionQuality)
|
643
|
+
: undefined;
|
644
|
+
message.streamStateUpdate =
|
645
|
+
object.streamStateUpdate !== undefined &&
|
646
|
+
object.streamStateUpdate !== null
|
647
|
+
? exports.StreamStateUpdate.fromPartial(object.streamStateUpdate)
|
648
|
+
: undefined;
|
649
|
+
message.subscribedQualityUpdate =
|
650
|
+
object.subscribedQualityUpdate !== undefined &&
|
651
|
+
object.subscribedQualityUpdate !== null
|
652
|
+
? exports.SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate)
|
653
|
+
: undefined;
|
654
|
+
message.subscriptionPermissionUpdate =
|
655
|
+
object.subscriptionPermissionUpdate !== undefined &&
|
656
|
+
object.subscriptionPermissionUpdate !== null
|
657
|
+
? exports.SubscriptionPermissionUpdate.fromPartial(object.subscriptionPermissionUpdate)
|
658
|
+
: undefined;
|
754
659
|
message.refreshToken = (_a = object.refreshToken) !== null && _a !== void 0 ? _a : undefined;
|
755
|
-
|
756
|
-
object.trackUnpublished !== null
|
757
|
-
|
758
|
-
|
759
|
-
else {
|
760
|
-
message.trackUnpublished = undefined;
|
761
|
-
}
|
660
|
+
message.trackUnpublished =
|
661
|
+
object.trackUnpublished !== undefined && object.trackUnpublished !== null
|
662
|
+
? exports.TrackUnpublishedResponse.fromPartial(object.trackUnpublished)
|
663
|
+
: undefined;
|
762
664
|
return message;
|
763
665
|
},
|
764
666
|
};
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
667
|
+
function createBaseAddTrackRequest() {
|
668
|
+
return {
|
669
|
+
cid: "",
|
670
|
+
name: "",
|
671
|
+
type: 0,
|
672
|
+
width: 0,
|
673
|
+
height: 0,
|
674
|
+
muted: false,
|
675
|
+
disableDtx: false,
|
676
|
+
source: 0,
|
677
|
+
layers: [],
|
678
|
+
};
|
679
|
+
}
|
775
680
|
exports.AddTrackRequest = {
|
776
|
-
encode(message, writer =
|
681
|
+
encode(message, writer = _m0.Writer.create()) {
|
777
682
|
if (message.cid !== "") {
|
778
683
|
writer.uint32(10).string(message.cid);
|
779
684
|
}
|
@@ -804,10 +709,9 @@ exports.AddTrackRequest = {
|
|
804
709
|
return writer;
|
805
710
|
},
|
806
711
|
decode(input, length) {
|
807
|
-
const reader = input instanceof
|
712
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
808
713
|
let end = length === undefined ? reader.len : reader.pos + length;
|
809
|
-
const message =
|
810
|
-
message.layers = [];
|
714
|
+
const message = createBaseAddTrackRequest();
|
811
715
|
while (reader.pos < end) {
|
812
716
|
const tag = reader.uint32();
|
813
717
|
switch (tag >>> 3) {
|
@@ -846,70 +750,27 @@ exports.AddTrackRequest = {
|
|
846
750
|
return message;
|
847
751
|
},
|
848
752
|
fromJSON(object) {
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
}
|
863
|
-
if (object.type !== undefined && object.type !== null) {
|
864
|
-
message.type = livekit_models_1.trackTypeFromJSON(object.type);
|
865
|
-
}
|
866
|
-
else {
|
867
|
-
message.type = 0;
|
868
|
-
}
|
869
|
-
if (object.width !== undefined && object.width !== null) {
|
870
|
-
message.width = Number(object.width);
|
871
|
-
}
|
872
|
-
else {
|
873
|
-
message.width = 0;
|
874
|
-
}
|
875
|
-
if (object.height !== undefined && object.height !== null) {
|
876
|
-
message.height = Number(object.height);
|
877
|
-
}
|
878
|
-
else {
|
879
|
-
message.height = 0;
|
880
|
-
}
|
881
|
-
if (object.muted !== undefined && object.muted !== null) {
|
882
|
-
message.muted = Boolean(object.muted);
|
883
|
-
}
|
884
|
-
else {
|
885
|
-
message.muted = false;
|
886
|
-
}
|
887
|
-
if (object.disableDtx !== undefined && object.disableDtx !== null) {
|
888
|
-
message.disableDtx = Boolean(object.disableDtx);
|
889
|
-
}
|
890
|
-
else {
|
891
|
-
message.disableDtx = false;
|
892
|
-
}
|
893
|
-
if (object.source !== undefined && object.source !== null) {
|
894
|
-
message.source = livekit_models_1.trackSourceFromJSON(object.source);
|
895
|
-
}
|
896
|
-
else {
|
897
|
-
message.source = 0;
|
898
|
-
}
|
899
|
-
if (object.layers !== undefined && object.layers !== null) {
|
900
|
-
for (const e of object.layers) {
|
901
|
-
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
902
|
-
}
|
903
|
-
}
|
904
|
-
return message;
|
753
|
+
return {
|
754
|
+
cid: isSet(object.cid) ? String(object.cid) : "",
|
755
|
+
name: isSet(object.name) ? String(object.name) : "",
|
756
|
+
type: isSet(object.type) ? livekit_models_1.trackTypeFromJSON(object.type) : 0,
|
757
|
+
width: isSet(object.width) ? Number(object.width) : 0,
|
758
|
+
height: isSet(object.height) ? Number(object.height) : 0,
|
759
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
760
|
+
disableDtx: isSet(object.disableDtx) ? Boolean(object.disableDtx) : false,
|
761
|
+
source: isSet(object.source) ? livekit_models_1.trackSourceFromJSON(object.source) : 0,
|
762
|
+
layers: Array.isArray(object === null || object === void 0 ? void 0 : object.layers)
|
763
|
+
? object.layers.map((e) => livekit_models_1.VideoLayer.fromJSON(e))
|
764
|
+
: [],
|
765
|
+
};
|
905
766
|
},
|
906
767
|
toJSON(message) {
|
907
768
|
const obj = {};
|
908
769
|
message.cid !== undefined && (obj.cid = message.cid);
|
909
770
|
message.name !== undefined && (obj.name = message.name);
|
910
771
|
message.type !== undefined && (obj.type = livekit_models_1.trackTypeToJSON(message.type));
|
911
|
-
message.width !== undefined && (obj.width = message.width);
|
912
|
-
message.height !== undefined && (obj.height = message.height);
|
772
|
+
message.width !== undefined && (obj.width = Math.round(message.width));
|
773
|
+
message.height !== undefined && (obj.height = Math.round(message.height));
|
913
774
|
message.muted !== undefined && (obj.muted = message.muted);
|
914
775
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
915
776
|
message.source !== undefined &&
|
@@ -923,8 +784,8 @@ exports.AddTrackRequest = {
|
|
923
784
|
return obj;
|
924
785
|
},
|
925
786
|
fromPartial(object) {
|
926
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
927
|
-
const message =
|
787
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
788
|
+
const message = createBaseAddTrackRequest();
|
928
789
|
message.cid = (_a = object.cid) !== null && _a !== void 0 ? _a : "";
|
929
790
|
message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
|
930
791
|
message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
|
@@ -933,18 +794,15 @@ exports.AddTrackRequest = {
|
|
933
794
|
message.muted = (_f = object.muted) !== null && _f !== void 0 ? _f : false;
|
934
795
|
message.disableDtx = (_g = object.disableDtx) !== null && _g !== void 0 ? _g : false;
|
935
796
|
message.source = (_h = object.source) !== null && _h !== void 0 ? _h : 0;
|
936
|
-
message.layers = [];
|
937
|
-
if (object.layers !== undefined && object.layers !== null) {
|
938
|
-
for (const e of object.layers) {
|
939
|
-
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
940
|
-
}
|
941
|
-
}
|
797
|
+
message.layers = ((_j = object.layers) === null || _j === void 0 ? void 0 : _j.map((e) => livekit_models_1.VideoLayer.fromPartial(e))) || [];
|
942
798
|
return message;
|
943
799
|
},
|
944
800
|
};
|
945
|
-
|
801
|
+
function createBaseTrickleRequest() {
|
802
|
+
return { candidateInit: "", target: 0 };
|
803
|
+
}
|
946
804
|
exports.TrickleRequest = {
|
947
|
-
encode(message, writer =
|
805
|
+
encode(message, writer = _m0.Writer.create()) {
|
948
806
|
if (message.candidateInit !== "") {
|
949
807
|
writer.uint32(10).string(message.candidateInit);
|
950
808
|
}
|
@@ -954,9 +812,9 @@ exports.TrickleRequest = {
|
|
954
812
|
return writer;
|
955
813
|
},
|
956
814
|
decode(input, length) {
|
957
|
-
const reader = input instanceof
|
815
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
958
816
|
let end = length === undefined ? reader.len : reader.pos + length;
|
959
|
-
const message =
|
817
|
+
const message = createBaseTrickleRequest();
|
960
818
|
while (reader.pos < end) {
|
961
819
|
const tag = reader.uint32();
|
962
820
|
switch (tag >>> 3) {
|
@@ -974,20 +832,12 @@ exports.TrickleRequest = {
|
|
974
832
|
return message;
|
975
833
|
},
|
976
834
|
fromJSON(object) {
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
}
|
984
|
-
if (object.target !== undefined && object.target !== null) {
|
985
|
-
message.target = signalTargetFromJSON(object.target);
|
986
|
-
}
|
987
|
-
else {
|
988
|
-
message.target = 0;
|
989
|
-
}
|
990
|
-
return message;
|
835
|
+
return {
|
836
|
+
candidateInit: isSet(object.candidateInit)
|
837
|
+
? String(object.candidateInit)
|
838
|
+
: "",
|
839
|
+
target: isSet(object.target) ? signalTargetFromJSON(object.target) : 0,
|
840
|
+
};
|
991
841
|
},
|
992
842
|
toJSON(message) {
|
993
843
|
const obj = {};
|
@@ -999,15 +849,17 @@ exports.TrickleRequest = {
|
|
999
849
|
},
|
1000
850
|
fromPartial(object) {
|
1001
851
|
var _a, _b;
|
1002
|
-
const message =
|
852
|
+
const message = createBaseTrickleRequest();
|
1003
853
|
message.candidateInit = (_a = object.candidateInit) !== null && _a !== void 0 ? _a : "";
|
1004
854
|
message.target = (_b = object.target) !== null && _b !== void 0 ? _b : 0;
|
1005
855
|
return message;
|
1006
856
|
},
|
1007
857
|
};
|
1008
|
-
|
858
|
+
function createBaseMuteTrackRequest() {
|
859
|
+
return { sid: "", muted: false };
|
860
|
+
}
|
1009
861
|
exports.MuteTrackRequest = {
|
1010
|
-
encode(message, writer =
|
862
|
+
encode(message, writer = _m0.Writer.create()) {
|
1011
863
|
if (message.sid !== "") {
|
1012
864
|
writer.uint32(10).string(message.sid);
|
1013
865
|
}
|
@@ -1017,9 +869,9 @@ exports.MuteTrackRequest = {
|
|
1017
869
|
return writer;
|
1018
870
|
},
|
1019
871
|
decode(input, length) {
|
1020
|
-
const reader = input instanceof
|
872
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1021
873
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1022
|
-
const message =
|
874
|
+
const message = createBaseMuteTrackRequest();
|
1023
875
|
while (reader.pos < end) {
|
1024
876
|
const tag = reader.uint32();
|
1025
877
|
switch (tag >>> 3) {
|
@@ -1037,20 +889,10 @@ exports.MuteTrackRequest = {
|
|
1037
889
|
return message;
|
1038
890
|
},
|
1039
891
|
fromJSON(object) {
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
}
|
1044
|
-
else {
|
1045
|
-
message.sid = "";
|
1046
|
-
}
|
1047
|
-
if (object.muted !== undefined && object.muted !== null) {
|
1048
|
-
message.muted = Boolean(object.muted);
|
1049
|
-
}
|
1050
|
-
else {
|
1051
|
-
message.muted = false;
|
1052
|
-
}
|
1053
|
-
return message;
|
892
|
+
return {
|
893
|
+
sid: isSet(object.sid) ? String(object.sid) : "",
|
894
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
895
|
+
};
|
1054
896
|
},
|
1055
897
|
toJSON(message) {
|
1056
898
|
const obj = {};
|
@@ -1060,20 +902,27 @@ exports.MuteTrackRequest = {
|
|
1060
902
|
},
|
1061
903
|
fromPartial(object) {
|
1062
904
|
var _a, _b;
|
1063
|
-
const message =
|
905
|
+
const message = createBaseMuteTrackRequest();
|
1064
906
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
1065
907
|
message.muted = (_b = object.muted) !== null && _b !== void 0 ? _b : false;
|
1066
908
|
return message;
|
1067
909
|
},
|
1068
910
|
};
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
911
|
+
function createBaseJoinResponse() {
|
912
|
+
return {
|
913
|
+
room: undefined,
|
914
|
+
participant: undefined,
|
915
|
+
otherParticipants: [],
|
916
|
+
serverVersion: "",
|
917
|
+
iceServers: [],
|
918
|
+
subscriberPrimary: false,
|
919
|
+
alternativeUrl: "",
|
920
|
+
clientConfiguration: undefined,
|
921
|
+
serverRegion: "",
|
922
|
+
};
|
923
|
+
}
|
1075
924
|
exports.JoinResponse = {
|
1076
|
-
encode(message, writer =
|
925
|
+
encode(message, writer = _m0.Writer.create()) {
|
1077
926
|
if (message.room !== undefined) {
|
1078
927
|
livekit_models_1.Room.encode(message.room, writer.uint32(10).fork()).ldelim();
|
1079
928
|
}
|
@@ -1104,11 +953,9 @@ exports.JoinResponse = {
|
|
1104
953
|
return writer;
|
1105
954
|
},
|
1106
955
|
decode(input, length) {
|
1107
|
-
const reader = input instanceof
|
956
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1108
957
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1109
|
-
const message =
|
1110
|
-
message.otherParticipants = [];
|
1111
|
-
message.iceServers = [];
|
958
|
+
const message = createBaseJoinResponse();
|
1112
959
|
while (reader.pos < end) {
|
1113
960
|
const tag = reader.uint32();
|
1114
961
|
switch (tag >>> 3) {
|
@@ -1147,65 +994,33 @@ exports.JoinResponse = {
|
|
1147
994
|
return message;
|
1148
995
|
},
|
1149
996
|
fromJSON(object) {
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
}
|
1177
|
-
if (object.iceServers !== undefined && object.iceServers !== null) {
|
1178
|
-
for (const e of object.iceServers) {
|
1179
|
-
message.iceServers.push(exports.ICEServer.fromJSON(e));
|
1180
|
-
}
|
1181
|
-
}
|
1182
|
-
if (object.subscriberPrimary !== undefined &&
|
1183
|
-
object.subscriberPrimary !== null) {
|
1184
|
-
message.subscriberPrimary = Boolean(object.subscriberPrimary);
|
1185
|
-
}
|
1186
|
-
else {
|
1187
|
-
message.subscriberPrimary = false;
|
1188
|
-
}
|
1189
|
-
if (object.alternativeUrl !== undefined && object.alternativeUrl !== null) {
|
1190
|
-
message.alternativeUrl = String(object.alternativeUrl);
|
1191
|
-
}
|
1192
|
-
else {
|
1193
|
-
message.alternativeUrl = "";
|
1194
|
-
}
|
1195
|
-
if (object.clientConfiguration !== undefined &&
|
1196
|
-
object.clientConfiguration !== null) {
|
1197
|
-
message.clientConfiguration = livekit_models_1.ClientConfiguration.fromJSON(object.clientConfiguration);
|
1198
|
-
}
|
1199
|
-
else {
|
1200
|
-
message.clientConfiguration = undefined;
|
1201
|
-
}
|
1202
|
-
if (object.serverRegion !== undefined && object.serverRegion !== null) {
|
1203
|
-
message.serverRegion = String(object.serverRegion);
|
1204
|
-
}
|
1205
|
-
else {
|
1206
|
-
message.serverRegion = "";
|
1207
|
-
}
|
1208
|
-
return message;
|
997
|
+
return {
|
998
|
+
room: isSet(object.room) ? livekit_models_1.Room.fromJSON(object.room) : undefined,
|
999
|
+
participant: isSet(object.participant)
|
1000
|
+
? livekit_models_1.ParticipantInfo.fromJSON(object.participant)
|
1001
|
+
: undefined,
|
1002
|
+
otherParticipants: Array.isArray(object === null || object === void 0 ? void 0 : object.otherParticipants)
|
1003
|
+
? object.otherParticipants.map((e) => livekit_models_1.ParticipantInfo.fromJSON(e))
|
1004
|
+
: [],
|
1005
|
+
serverVersion: isSet(object.serverVersion)
|
1006
|
+
? String(object.serverVersion)
|
1007
|
+
: "",
|
1008
|
+
iceServers: Array.isArray(object === null || object === void 0 ? void 0 : object.iceServers)
|
1009
|
+
? object.iceServers.map((e) => exports.ICEServer.fromJSON(e))
|
1010
|
+
: [],
|
1011
|
+
subscriberPrimary: isSet(object.subscriberPrimary)
|
1012
|
+
? Boolean(object.subscriberPrimary)
|
1013
|
+
: false,
|
1014
|
+
alternativeUrl: isSet(object.alternativeUrl)
|
1015
|
+
? String(object.alternativeUrl)
|
1016
|
+
: "",
|
1017
|
+
clientConfiguration: isSet(object.clientConfiguration)
|
1018
|
+
? livekit_models_1.ClientConfiguration.fromJSON(object.clientConfiguration)
|
1019
|
+
: undefined,
|
1020
|
+
serverRegion: isSet(object.serverRegion)
|
1021
|
+
? String(object.serverRegion)
|
1022
|
+
: "",
|
1023
|
+
};
|
1209
1024
|
},
|
1210
1025
|
toJSON(message) {
|
1211
1026
|
const obj = {};
|
@@ -1241,51 +1056,39 @@ exports.JoinResponse = {
|
|
1241
1056
|
(obj.serverRegion = message.serverRegion);
|
1242
1057
|
return obj;
|
1243
1058
|
},
|
1244
|
-
fromPartial(object) {
|
1245
|
-
var _a, _b, _c, _d;
|
1246
|
-
const message =
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
message.
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
for (const e of object.iceServers) {
|
1270
|
-
message.iceServers.push(exports.ICEServer.fromPartial(e));
|
1271
|
-
}
|
1272
|
-
}
|
1273
|
-
message.subscriberPrimary = (_b = object.subscriberPrimary) !== null && _b !== void 0 ? _b : false;
|
1274
|
-
message.alternativeUrl = (_c = object.alternativeUrl) !== null && _c !== void 0 ? _c : "";
|
1275
|
-
if (object.clientConfiguration !== undefined &&
|
1276
|
-
object.clientConfiguration !== null) {
|
1277
|
-
message.clientConfiguration = livekit_models_1.ClientConfiguration.fromPartial(object.clientConfiguration);
|
1278
|
-
}
|
1279
|
-
else {
|
1280
|
-
message.clientConfiguration = undefined;
|
1281
|
-
}
|
1282
|
-
message.serverRegion = (_d = object.serverRegion) !== null && _d !== void 0 ? _d : "";
|
1059
|
+
fromPartial(object) {
|
1060
|
+
var _a, _b, _c, _d, _e, _f;
|
1061
|
+
const message = createBaseJoinResponse();
|
1062
|
+
message.room =
|
1063
|
+
object.room !== undefined && object.room !== null
|
1064
|
+
? livekit_models_1.Room.fromPartial(object.room)
|
1065
|
+
: undefined;
|
1066
|
+
message.participant =
|
1067
|
+
object.participant !== undefined && object.participant !== null
|
1068
|
+
? livekit_models_1.ParticipantInfo.fromPartial(object.participant)
|
1069
|
+
: undefined;
|
1070
|
+
message.otherParticipants =
|
1071
|
+
((_a = object.otherParticipants) === null || _a === void 0 ? void 0 : _a.map((e) => livekit_models_1.ParticipantInfo.fromPartial(e))) ||
|
1072
|
+
[];
|
1073
|
+
message.serverVersion = (_b = object.serverVersion) !== null && _b !== void 0 ? _b : "";
|
1074
|
+
message.iceServers =
|
1075
|
+
((_c = object.iceServers) === null || _c === void 0 ? void 0 : _c.map((e) => exports.ICEServer.fromPartial(e))) || [];
|
1076
|
+
message.subscriberPrimary = (_d = object.subscriberPrimary) !== null && _d !== void 0 ? _d : false;
|
1077
|
+
message.alternativeUrl = (_e = object.alternativeUrl) !== null && _e !== void 0 ? _e : "";
|
1078
|
+
message.clientConfiguration =
|
1079
|
+
object.clientConfiguration !== undefined &&
|
1080
|
+
object.clientConfiguration !== null
|
1081
|
+
? livekit_models_1.ClientConfiguration.fromPartial(object.clientConfiguration)
|
1082
|
+
: undefined;
|
1083
|
+
message.serverRegion = (_f = object.serverRegion) !== null && _f !== void 0 ? _f : "";
|
1283
1084
|
return message;
|
1284
1085
|
},
|
1285
1086
|
};
|
1286
|
-
|
1087
|
+
function createBaseTrackPublishedResponse() {
|
1088
|
+
return { cid: "", track: undefined };
|
1089
|
+
}
|
1287
1090
|
exports.TrackPublishedResponse = {
|
1288
|
-
encode(message, writer =
|
1091
|
+
encode(message, writer = _m0.Writer.create()) {
|
1289
1092
|
if (message.cid !== "") {
|
1290
1093
|
writer.uint32(10).string(message.cid);
|
1291
1094
|
}
|
@@ -1295,9 +1098,9 @@ exports.TrackPublishedResponse = {
|
|
1295
1098
|
return writer;
|
1296
1099
|
},
|
1297
1100
|
decode(input, length) {
|
1298
|
-
const reader = input instanceof
|
1101
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1299
1102
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1300
|
-
const message =
|
1103
|
+
const message = createBaseTrackPublishedResponse();
|
1301
1104
|
while (reader.pos < end) {
|
1302
1105
|
const tag = reader.uint32();
|
1303
1106
|
switch (tag >>> 3) {
|
@@ -1315,20 +1118,10 @@ exports.TrackPublishedResponse = {
|
|
1315
1118
|
return message;
|
1316
1119
|
},
|
1317
1120
|
fromJSON(object) {
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
}
|
1322
|
-
else {
|
1323
|
-
message.cid = "";
|
1324
|
-
}
|
1325
|
-
if (object.track !== undefined && object.track !== null) {
|
1326
|
-
message.track = livekit_models_1.TrackInfo.fromJSON(object.track);
|
1327
|
-
}
|
1328
|
-
else {
|
1329
|
-
message.track = undefined;
|
1330
|
-
}
|
1331
|
-
return message;
|
1121
|
+
return {
|
1122
|
+
cid: isSet(object.cid) ? String(object.cid) : "",
|
1123
|
+
track: isSet(object.track) ? livekit_models_1.TrackInfo.fromJSON(object.track) : undefined,
|
1124
|
+
};
|
1332
1125
|
},
|
1333
1126
|
toJSON(message) {
|
1334
1127
|
const obj = {};
|
@@ -1339,29 +1132,29 @@ exports.TrackPublishedResponse = {
|
|
1339
1132
|
},
|
1340
1133
|
fromPartial(object) {
|
1341
1134
|
var _a;
|
1342
|
-
const message =
|
1135
|
+
const message = createBaseTrackPublishedResponse();
|
1343
1136
|
message.cid = (_a = object.cid) !== null && _a !== void 0 ? _a : "";
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
message.track = undefined;
|
1349
|
-
}
|
1137
|
+
message.track =
|
1138
|
+
object.track !== undefined && object.track !== null
|
1139
|
+
? livekit_models_1.TrackInfo.fromPartial(object.track)
|
1140
|
+
: undefined;
|
1350
1141
|
return message;
|
1351
1142
|
},
|
1352
1143
|
};
|
1353
|
-
|
1144
|
+
function createBaseTrackUnpublishedResponse() {
|
1145
|
+
return { trackSid: "" };
|
1146
|
+
}
|
1354
1147
|
exports.TrackUnpublishedResponse = {
|
1355
|
-
encode(message, writer =
|
1148
|
+
encode(message, writer = _m0.Writer.create()) {
|
1356
1149
|
if (message.trackSid !== "") {
|
1357
1150
|
writer.uint32(10).string(message.trackSid);
|
1358
1151
|
}
|
1359
1152
|
return writer;
|
1360
1153
|
},
|
1361
1154
|
decode(input, length) {
|
1362
|
-
const reader = input instanceof
|
1155
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1363
1156
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1364
|
-
const message =
|
1157
|
+
const message = createBaseTrackUnpublishedResponse();
|
1365
1158
|
while (reader.pos < end) {
|
1366
1159
|
const tag = reader.uint32();
|
1367
1160
|
switch (tag >>> 3) {
|
@@ -1376,14 +1169,9 @@ exports.TrackUnpublishedResponse = {
|
|
1376
1169
|
return message;
|
1377
1170
|
},
|
1378
1171
|
fromJSON(object) {
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
}
|
1383
|
-
else {
|
1384
|
-
message.trackSid = "";
|
1385
|
-
}
|
1386
|
-
return message;
|
1172
|
+
return {
|
1173
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
1174
|
+
};
|
1387
1175
|
},
|
1388
1176
|
toJSON(message) {
|
1389
1177
|
const obj = {};
|
@@ -1392,14 +1180,16 @@ exports.TrackUnpublishedResponse = {
|
|
1392
1180
|
},
|
1393
1181
|
fromPartial(object) {
|
1394
1182
|
var _a;
|
1395
|
-
const message =
|
1183
|
+
const message = createBaseTrackUnpublishedResponse();
|
1396
1184
|
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
1397
1185
|
return message;
|
1398
1186
|
},
|
1399
1187
|
};
|
1400
|
-
|
1188
|
+
function createBaseSessionDescription() {
|
1189
|
+
return { type: "", sdp: "" };
|
1190
|
+
}
|
1401
1191
|
exports.SessionDescription = {
|
1402
|
-
encode(message, writer =
|
1192
|
+
encode(message, writer = _m0.Writer.create()) {
|
1403
1193
|
if (message.type !== "") {
|
1404
1194
|
writer.uint32(10).string(message.type);
|
1405
1195
|
}
|
@@ -1409,9 +1199,9 @@ exports.SessionDescription = {
|
|
1409
1199
|
return writer;
|
1410
1200
|
},
|
1411
1201
|
decode(input, length) {
|
1412
|
-
const reader = input instanceof
|
1202
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1413
1203
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1414
|
-
const message =
|
1204
|
+
const message = createBaseSessionDescription();
|
1415
1205
|
while (reader.pos < end) {
|
1416
1206
|
const tag = reader.uint32();
|
1417
1207
|
switch (tag >>> 3) {
|
@@ -1429,20 +1219,10 @@ exports.SessionDescription = {
|
|
1429
1219
|
return message;
|
1430
1220
|
},
|
1431
1221
|
fromJSON(object) {
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
}
|
1436
|
-
else {
|
1437
|
-
message.type = "";
|
1438
|
-
}
|
1439
|
-
if (object.sdp !== undefined && object.sdp !== null) {
|
1440
|
-
message.sdp = String(object.sdp);
|
1441
|
-
}
|
1442
|
-
else {
|
1443
|
-
message.sdp = "";
|
1444
|
-
}
|
1445
|
-
return message;
|
1222
|
+
return {
|
1223
|
+
type: isSet(object.type) ? String(object.type) : "",
|
1224
|
+
sdp: isSet(object.sdp) ? String(object.sdp) : "",
|
1225
|
+
};
|
1446
1226
|
},
|
1447
1227
|
toJSON(message) {
|
1448
1228
|
const obj = {};
|
@@ -1452,25 +1232,26 @@ exports.SessionDescription = {
|
|
1452
1232
|
},
|
1453
1233
|
fromPartial(object) {
|
1454
1234
|
var _a, _b;
|
1455
|
-
const message =
|
1235
|
+
const message = createBaseSessionDescription();
|
1456
1236
|
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
|
1457
1237
|
message.sdp = (_b = object.sdp) !== null && _b !== void 0 ? _b : "";
|
1458
1238
|
return message;
|
1459
1239
|
},
|
1460
1240
|
};
|
1461
|
-
|
1241
|
+
function createBaseParticipantUpdate() {
|
1242
|
+
return { participants: [] };
|
1243
|
+
}
|
1462
1244
|
exports.ParticipantUpdate = {
|
1463
|
-
encode(message, writer =
|
1245
|
+
encode(message, writer = _m0.Writer.create()) {
|
1464
1246
|
for (const v of message.participants) {
|
1465
1247
|
livekit_models_1.ParticipantInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
1466
1248
|
}
|
1467
1249
|
return writer;
|
1468
1250
|
},
|
1469
1251
|
decode(input, length) {
|
1470
|
-
const reader = input instanceof
|
1252
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1471
1253
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1472
|
-
const message =
|
1473
|
-
message.participants = [];
|
1254
|
+
const message = createBaseParticipantUpdate();
|
1474
1255
|
while (reader.pos < end) {
|
1475
1256
|
const tag = reader.uint32();
|
1476
1257
|
switch (tag >>> 3) {
|
@@ -1485,14 +1266,11 @@ exports.ParticipantUpdate = {
|
|
1485
1266
|
return message;
|
1486
1267
|
},
|
1487
1268
|
fromJSON(object) {
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
}
|
1494
|
-
}
|
1495
|
-
return message;
|
1269
|
+
return {
|
1270
|
+
participants: Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
1271
|
+
? object.participants.map((e) => livekit_models_1.ParticipantInfo.fromJSON(e))
|
1272
|
+
: [],
|
1273
|
+
};
|
1496
1274
|
},
|
1497
1275
|
toJSON(message) {
|
1498
1276
|
const obj = {};
|
@@ -1505,19 +1283,18 @@ exports.ParticipantUpdate = {
|
|
1505
1283
|
return obj;
|
1506
1284
|
},
|
1507
1285
|
fromPartial(object) {
|
1508
|
-
|
1509
|
-
message
|
1510
|
-
|
1511
|
-
|
1512
|
-
message.participants.push(livekit_models_1.ParticipantInfo.fromPartial(e));
|
1513
|
-
}
|
1514
|
-
}
|
1286
|
+
var _a;
|
1287
|
+
const message = createBaseParticipantUpdate();
|
1288
|
+
message.participants =
|
1289
|
+
((_a = object.participants) === null || _a === void 0 ? void 0 : _a.map((e) => livekit_models_1.ParticipantInfo.fromPartial(e))) || [];
|
1515
1290
|
return message;
|
1516
1291
|
},
|
1517
1292
|
};
|
1518
|
-
|
1293
|
+
function createBaseUpdateSubscription() {
|
1294
|
+
return { trackSids: [], subscribe: false, participantTracks: [] };
|
1295
|
+
}
|
1519
1296
|
exports.UpdateSubscription = {
|
1520
|
-
encode(message, writer =
|
1297
|
+
encode(message, writer = _m0.Writer.create()) {
|
1521
1298
|
for (const v of message.trackSids) {
|
1522
1299
|
writer.uint32(10).string(v);
|
1523
1300
|
}
|
@@ -1530,11 +1307,9 @@ exports.UpdateSubscription = {
|
|
1530
1307
|
return writer;
|
1531
1308
|
},
|
1532
1309
|
decode(input, length) {
|
1533
|
-
const reader = input instanceof
|
1310
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1534
1311
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1535
|
-
const message =
|
1536
|
-
message.trackSids = [];
|
1537
|
-
message.participantTracks = [];
|
1312
|
+
const message = createBaseUpdateSubscription();
|
1538
1313
|
while (reader.pos < end) {
|
1539
1314
|
const tag = reader.uint32();
|
1540
1315
|
switch (tag >>> 3) {
|
@@ -1555,27 +1330,15 @@ exports.UpdateSubscription = {
|
|
1555
1330
|
return message;
|
1556
1331
|
},
|
1557
1332
|
fromJSON(object) {
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
message.subscribe = Boolean(object.subscribe);
|
1568
|
-
}
|
1569
|
-
else {
|
1570
|
-
message.subscribe = false;
|
1571
|
-
}
|
1572
|
-
if (object.participantTracks !== undefined &&
|
1573
|
-
object.participantTracks !== null) {
|
1574
|
-
for (const e of object.participantTracks) {
|
1575
|
-
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromJSON(e));
|
1576
|
-
}
|
1577
|
-
}
|
1578
|
-
return message;
|
1333
|
+
return {
|
1334
|
+
trackSids: Array.isArray(object === null || object === void 0 ? void 0 : object.trackSids)
|
1335
|
+
? object.trackSids.map((e) => String(e))
|
1336
|
+
: [],
|
1337
|
+
subscribe: isSet(object.subscribe) ? Boolean(object.subscribe) : false,
|
1338
|
+
participantTracks: Array.isArray(object === null || object === void 0 ? void 0 : object.participantTracks)
|
1339
|
+
? object.participantTracks.map((e) => livekit_models_1.ParticipantTracks.fromJSON(e))
|
1340
|
+
: [],
|
1341
|
+
};
|
1579
1342
|
},
|
1580
1343
|
toJSON(message) {
|
1581
1344
|
const obj = {};
|
@@ -1595,34 +1358,21 @@ exports.UpdateSubscription = {
|
|
1595
1358
|
return obj;
|
1596
1359
|
},
|
1597
1360
|
fromPartial(object) {
|
1598
|
-
var _a;
|
1599
|
-
const message =
|
1600
|
-
message.trackSids = [];
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
}
|
1606
|
-
message.subscribe = (_a = object.subscribe) !== null && _a !== void 0 ? _a : false;
|
1607
|
-
message.participantTracks = [];
|
1608
|
-
if (object.participantTracks !== undefined &&
|
1609
|
-
object.participantTracks !== null) {
|
1610
|
-
for (const e of object.participantTracks) {
|
1611
|
-
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromPartial(e));
|
1612
|
-
}
|
1613
|
-
}
|
1361
|
+
var _a, _b, _c;
|
1362
|
+
const message = createBaseUpdateSubscription();
|
1363
|
+
message.trackSids = ((_a = object.trackSids) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
1364
|
+
message.subscribe = (_b = object.subscribe) !== null && _b !== void 0 ? _b : false;
|
1365
|
+
message.participantTracks =
|
1366
|
+
((_c = object.participantTracks) === null || _c === void 0 ? void 0 : _c.map((e) => livekit_models_1.ParticipantTracks.fromPartial(e))) ||
|
1367
|
+
[];
|
1614
1368
|
return message;
|
1615
1369
|
},
|
1616
1370
|
};
|
1617
|
-
|
1618
|
-
trackSids:
|
1619
|
-
|
1620
|
-
quality: 0,
|
1621
|
-
width: 0,
|
1622
|
-
height: 0,
|
1623
|
-
};
|
1371
|
+
function createBaseUpdateTrackSettings() {
|
1372
|
+
return { trackSids: [], disabled: false, quality: 0, width: 0, height: 0 };
|
1373
|
+
}
|
1624
1374
|
exports.UpdateTrackSettings = {
|
1625
|
-
encode(message, writer =
|
1375
|
+
encode(message, writer = _m0.Writer.create()) {
|
1626
1376
|
for (const v of message.trackSids) {
|
1627
1377
|
writer.uint32(10).string(v);
|
1628
1378
|
}
|
@@ -1641,10 +1391,9 @@ exports.UpdateTrackSettings = {
|
|
1641
1391
|
return writer;
|
1642
1392
|
},
|
1643
1393
|
decode(input, length) {
|
1644
|
-
const reader = input instanceof
|
1394
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1645
1395
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1646
|
-
const message =
|
1647
|
-
message.trackSids = [];
|
1396
|
+
const message = createBaseUpdateTrackSettings();
|
1648
1397
|
while (reader.pos < end) {
|
1649
1398
|
const tag = reader.uint32();
|
1650
1399
|
switch (tag >>> 3) {
|
@@ -1671,38 +1420,15 @@ exports.UpdateTrackSettings = {
|
|
1671
1420
|
return message;
|
1672
1421
|
},
|
1673
1422
|
fromJSON(object) {
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
}
|
1684
|
-
else {
|
1685
|
-
message.disabled = false;
|
1686
|
-
}
|
1687
|
-
if (object.quality !== undefined && object.quality !== null) {
|
1688
|
-
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
1689
|
-
}
|
1690
|
-
else {
|
1691
|
-
message.quality = 0;
|
1692
|
-
}
|
1693
|
-
if (object.width !== undefined && object.width !== null) {
|
1694
|
-
message.width = Number(object.width);
|
1695
|
-
}
|
1696
|
-
else {
|
1697
|
-
message.width = 0;
|
1698
|
-
}
|
1699
|
-
if (object.height !== undefined && object.height !== null) {
|
1700
|
-
message.height = Number(object.height);
|
1701
|
-
}
|
1702
|
-
else {
|
1703
|
-
message.height = 0;
|
1704
|
-
}
|
1705
|
-
return message;
|
1423
|
+
return {
|
1424
|
+
trackSids: Array.isArray(object === null || object === void 0 ? void 0 : object.trackSids)
|
1425
|
+
? object.trackSids.map((e) => String(e))
|
1426
|
+
: [],
|
1427
|
+
disabled: isSet(object.disabled) ? Boolean(object.disabled) : false,
|
1428
|
+
quality: isSet(object.quality) ? livekit_models_1.videoQualityFromJSON(object.quality) : 0,
|
1429
|
+
width: isSet(object.width) ? Number(object.width) : 0,
|
1430
|
+
height: isSet(object.height) ? Number(object.height) : 0,
|
1431
|
+
};
|
1706
1432
|
},
|
1707
1433
|
toJSON(message) {
|
1708
1434
|
const obj = {};
|
@@ -1715,38 +1441,35 @@ exports.UpdateTrackSettings = {
|
|
1715
1441
|
message.disabled !== undefined && (obj.disabled = message.disabled);
|
1716
1442
|
message.quality !== undefined &&
|
1717
1443
|
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
1718
|
-
message.width !== undefined && (obj.width = message.width);
|
1719
|
-
message.height !== undefined && (obj.height = message.height);
|
1444
|
+
message.width !== undefined && (obj.width = Math.round(message.width));
|
1445
|
+
message.height !== undefined && (obj.height = Math.round(message.height));
|
1720
1446
|
return obj;
|
1721
1447
|
},
|
1722
1448
|
fromPartial(object) {
|
1723
|
-
var _a, _b, _c, _d;
|
1724
|
-
const message =
|
1725
|
-
message.trackSids = [];
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
}
|
1731
|
-
message.disabled = (_a = object.disabled) !== null && _a !== void 0 ? _a : false;
|
1732
|
-
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
1733
|
-
message.width = (_c = object.width) !== null && _c !== void 0 ? _c : 0;
|
1734
|
-
message.height = (_d = object.height) !== null && _d !== void 0 ? _d : 0;
|
1449
|
+
var _a, _b, _c, _d, _e;
|
1450
|
+
const message = createBaseUpdateTrackSettings();
|
1451
|
+
message.trackSids = ((_a = object.trackSids) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
1452
|
+
message.disabled = (_b = object.disabled) !== null && _b !== void 0 ? _b : false;
|
1453
|
+
message.quality = (_c = object.quality) !== null && _c !== void 0 ? _c : 0;
|
1454
|
+
message.width = (_d = object.width) !== null && _d !== void 0 ? _d : 0;
|
1455
|
+
message.height = (_e = object.height) !== null && _e !== void 0 ? _e : 0;
|
1735
1456
|
return message;
|
1736
1457
|
},
|
1737
1458
|
};
|
1738
|
-
|
1459
|
+
function createBaseLeaveRequest() {
|
1460
|
+
return { canReconnect: false };
|
1461
|
+
}
|
1739
1462
|
exports.LeaveRequest = {
|
1740
|
-
encode(message, writer =
|
1463
|
+
encode(message, writer = _m0.Writer.create()) {
|
1741
1464
|
if (message.canReconnect === true) {
|
1742
1465
|
writer.uint32(8).bool(message.canReconnect);
|
1743
1466
|
}
|
1744
1467
|
return writer;
|
1745
1468
|
},
|
1746
1469
|
decode(input, length) {
|
1747
|
-
const reader = input instanceof
|
1470
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1748
1471
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1749
|
-
const message =
|
1472
|
+
const message = createBaseLeaveRequest();
|
1750
1473
|
while (reader.pos < end) {
|
1751
1474
|
const tag = reader.uint32();
|
1752
1475
|
switch (tag >>> 3) {
|
@@ -1761,14 +1484,11 @@ exports.LeaveRequest = {
|
|
1761
1484
|
return message;
|
1762
1485
|
},
|
1763
1486
|
fromJSON(object) {
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
message.canReconnect = false;
|
1770
|
-
}
|
1771
|
-
return message;
|
1487
|
+
return {
|
1488
|
+
canReconnect: isSet(object.canReconnect)
|
1489
|
+
? Boolean(object.canReconnect)
|
1490
|
+
: false,
|
1491
|
+
};
|
1772
1492
|
},
|
1773
1493
|
toJSON(message) {
|
1774
1494
|
const obj = {};
|
@@ -1778,14 +1498,16 @@ exports.LeaveRequest = {
|
|
1778
1498
|
},
|
1779
1499
|
fromPartial(object) {
|
1780
1500
|
var _a;
|
1781
|
-
const message =
|
1501
|
+
const message = createBaseLeaveRequest();
|
1782
1502
|
message.canReconnect = (_a = object.canReconnect) !== null && _a !== void 0 ? _a : false;
|
1783
1503
|
return message;
|
1784
1504
|
},
|
1785
1505
|
};
|
1786
|
-
|
1506
|
+
function createBaseUpdateVideoLayers() {
|
1507
|
+
return { trackSid: "", layers: [] };
|
1508
|
+
}
|
1787
1509
|
exports.UpdateVideoLayers = {
|
1788
|
-
encode(message, writer =
|
1510
|
+
encode(message, writer = _m0.Writer.create()) {
|
1789
1511
|
if (message.trackSid !== "") {
|
1790
1512
|
writer.uint32(10).string(message.trackSid);
|
1791
1513
|
}
|
@@ -1795,10 +1517,9 @@ exports.UpdateVideoLayers = {
|
|
1795
1517
|
return writer;
|
1796
1518
|
},
|
1797
1519
|
decode(input, length) {
|
1798
|
-
const reader = input instanceof
|
1520
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1799
1521
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1800
|
-
const message =
|
1801
|
-
message.layers = [];
|
1522
|
+
const message = createBaseUpdateVideoLayers();
|
1802
1523
|
while (reader.pos < end) {
|
1803
1524
|
const tag = reader.uint32();
|
1804
1525
|
switch (tag >>> 3) {
|
@@ -1816,20 +1537,12 @@ exports.UpdateVideoLayers = {
|
|
1816
1537
|
return message;
|
1817
1538
|
},
|
1818
1539
|
fromJSON(object) {
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
message.trackSid = "";
|
1826
|
-
}
|
1827
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1828
|
-
for (const e of object.layers) {
|
1829
|
-
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
1830
|
-
}
|
1831
|
-
}
|
1832
|
-
return message;
|
1540
|
+
return {
|
1541
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
1542
|
+
layers: Array.isArray(object === null || object === void 0 ? void 0 : object.layers)
|
1543
|
+
? object.layers.map((e) => livekit_models_1.VideoLayer.fromJSON(e))
|
1544
|
+
: [],
|
1545
|
+
};
|
1833
1546
|
},
|
1834
1547
|
toJSON(message) {
|
1835
1548
|
const obj = {};
|
@@ -1843,21 +1556,18 @@ exports.UpdateVideoLayers = {
|
|
1843
1556
|
return obj;
|
1844
1557
|
},
|
1845
1558
|
fromPartial(object) {
|
1846
|
-
var _a;
|
1847
|
-
const message =
|
1559
|
+
var _a, _b;
|
1560
|
+
const message = createBaseUpdateVideoLayers();
|
1848
1561
|
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
1849
|
-
message.layers = [];
|
1850
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1851
|
-
for (const e of object.layers) {
|
1852
|
-
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
1853
|
-
}
|
1854
|
-
}
|
1562
|
+
message.layers = ((_b = object.layers) === null || _b === void 0 ? void 0 : _b.map((e) => livekit_models_1.VideoLayer.fromPartial(e))) || [];
|
1855
1563
|
return message;
|
1856
1564
|
},
|
1857
1565
|
};
|
1858
|
-
|
1566
|
+
function createBaseICEServer() {
|
1567
|
+
return { urls: [], username: "", credential: "" };
|
1568
|
+
}
|
1859
1569
|
exports.ICEServer = {
|
1860
|
-
encode(message, writer =
|
1570
|
+
encode(message, writer = _m0.Writer.create()) {
|
1861
1571
|
for (const v of message.urls) {
|
1862
1572
|
writer.uint32(10).string(v);
|
1863
1573
|
}
|
@@ -1870,10 +1580,9 @@ exports.ICEServer = {
|
|
1870
1580
|
return writer;
|
1871
1581
|
},
|
1872
1582
|
decode(input, length) {
|
1873
|
-
const reader = input instanceof
|
1583
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1874
1584
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1875
|
-
const message =
|
1876
|
-
message.urls = [];
|
1585
|
+
const message = createBaseICEServer();
|
1877
1586
|
while (reader.pos < end) {
|
1878
1587
|
const tag = reader.uint32();
|
1879
1588
|
switch (tag >>> 3) {
|
@@ -1894,26 +1603,13 @@ exports.ICEServer = {
|
|
1894
1603
|
return message;
|
1895
1604
|
},
|
1896
1605
|
fromJSON(object) {
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
}
|
1904
|
-
if (object.username !== undefined && object.username !== null) {
|
1905
|
-
message.username = String(object.username);
|
1906
|
-
}
|
1907
|
-
else {
|
1908
|
-
message.username = "";
|
1909
|
-
}
|
1910
|
-
if (object.credential !== undefined && object.credential !== null) {
|
1911
|
-
message.credential = String(object.credential);
|
1912
|
-
}
|
1913
|
-
else {
|
1914
|
-
message.credential = "";
|
1915
|
-
}
|
1916
|
-
return message;
|
1606
|
+
return {
|
1607
|
+
urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls)
|
1608
|
+
? object.urls.map((e) => String(e))
|
1609
|
+
: [],
|
1610
|
+
username: isSet(object.username) ? String(object.username) : "",
|
1611
|
+
credential: isSet(object.credential) ? String(object.credential) : "",
|
1612
|
+
};
|
1917
1613
|
},
|
1918
1614
|
toJSON(message) {
|
1919
1615
|
const obj = {};
|
@@ -1928,32 +1624,28 @@ exports.ICEServer = {
|
|
1928
1624
|
return obj;
|
1929
1625
|
},
|
1930
1626
|
fromPartial(object) {
|
1931
|
-
var _a, _b;
|
1932
|
-
const message =
|
1933
|
-
message.urls = [];
|
1934
|
-
|
1935
|
-
|
1936
|
-
message.urls.push(e);
|
1937
|
-
}
|
1938
|
-
}
|
1939
|
-
message.username = (_a = object.username) !== null && _a !== void 0 ? _a : "";
|
1940
|
-
message.credential = (_b = object.credential) !== null && _b !== void 0 ? _b : "";
|
1627
|
+
var _a, _b, _c;
|
1628
|
+
const message = createBaseICEServer();
|
1629
|
+
message.urls = ((_a = object.urls) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
1630
|
+
message.username = (_b = object.username) !== null && _b !== void 0 ? _b : "";
|
1631
|
+
message.credential = (_c = object.credential) !== null && _c !== void 0 ? _c : "";
|
1941
1632
|
return message;
|
1942
1633
|
},
|
1943
1634
|
};
|
1944
|
-
|
1635
|
+
function createBaseSpeakersChanged() {
|
1636
|
+
return { speakers: [] };
|
1637
|
+
}
|
1945
1638
|
exports.SpeakersChanged = {
|
1946
|
-
encode(message, writer =
|
1639
|
+
encode(message, writer = _m0.Writer.create()) {
|
1947
1640
|
for (const v of message.speakers) {
|
1948
1641
|
livekit_models_1.SpeakerInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
1949
1642
|
}
|
1950
1643
|
return writer;
|
1951
1644
|
},
|
1952
1645
|
decode(input, length) {
|
1953
|
-
const reader = input instanceof
|
1646
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1954
1647
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1955
|
-
const message =
|
1956
|
-
message.speakers = [];
|
1648
|
+
const message = createBaseSpeakersChanged();
|
1957
1649
|
while (reader.pos < end) {
|
1958
1650
|
const tag = reader.uint32();
|
1959
1651
|
switch (tag >>> 3) {
|
@@ -1968,14 +1660,11 @@ exports.SpeakersChanged = {
|
|
1968
1660
|
return message;
|
1969
1661
|
},
|
1970
1662
|
fromJSON(object) {
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
}
|
1977
|
-
}
|
1978
|
-
return message;
|
1663
|
+
return {
|
1664
|
+
speakers: Array.isArray(object === null || object === void 0 ? void 0 : object.speakers)
|
1665
|
+
? object.speakers.map((e) => livekit_models_1.SpeakerInfo.fromJSON(e))
|
1666
|
+
: [],
|
1667
|
+
};
|
1979
1668
|
},
|
1980
1669
|
toJSON(message) {
|
1981
1670
|
const obj = {};
|
@@ -1988,28 +1677,27 @@ exports.SpeakersChanged = {
|
|
1988
1677
|
return obj;
|
1989
1678
|
},
|
1990
1679
|
fromPartial(object) {
|
1991
|
-
|
1992
|
-
message
|
1993
|
-
|
1994
|
-
|
1995
|
-
message.speakers.push(livekit_models_1.SpeakerInfo.fromPartial(e));
|
1996
|
-
}
|
1997
|
-
}
|
1680
|
+
var _a;
|
1681
|
+
const message = createBaseSpeakersChanged();
|
1682
|
+
message.speakers =
|
1683
|
+
((_a = object.speakers) === null || _a === void 0 ? void 0 : _a.map((e) => livekit_models_1.SpeakerInfo.fromPartial(e))) || [];
|
1998
1684
|
return message;
|
1999
1685
|
},
|
2000
1686
|
};
|
2001
|
-
|
1687
|
+
function createBaseRoomUpdate() {
|
1688
|
+
return { room: undefined };
|
1689
|
+
}
|
2002
1690
|
exports.RoomUpdate = {
|
2003
|
-
encode(message, writer =
|
1691
|
+
encode(message, writer = _m0.Writer.create()) {
|
2004
1692
|
if (message.room !== undefined) {
|
2005
1693
|
livekit_models_1.Room.encode(message.room, writer.uint32(10).fork()).ldelim();
|
2006
1694
|
}
|
2007
1695
|
return writer;
|
2008
1696
|
},
|
2009
1697
|
decode(input, length) {
|
2010
|
-
const reader = input instanceof
|
1698
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2011
1699
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2012
|
-
const message =
|
1700
|
+
const message = createBaseRoomUpdate();
|
2013
1701
|
while (reader.pos < end) {
|
2014
1702
|
const tag = reader.uint32();
|
2015
1703
|
switch (tag >>> 3) {
|
@@ -2024,14 +1712,9 @@ exports.RoomUpdate = {
|
|
2024
1712
|
return message;
|
2025
1713
|
},
|
2026
1714
|
fromJSON(object) {
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
}
|
2031
|
-
else {
|
2032
|
-
message.room = undefined;
|
2033
|
-
}
|
2034
|
-
return message;
|
1715
|
+
return {
|
1716
|
+
room: isSet(object.room) ? livekit_models_1.Room.fromJSON(object.room) : undefined,
|
1717
|
+
};
|
2035
1718
|
},
|
2036
1719
|
toJSON(message) {
|
2037
1720
|
const obj = {};
|
@@ -2040,23 +1723,19 @@ exports.RoomUpdate = {
|
|
2040
1723
|
return obj;
|
2041
1724
|
},
|
2042
1725
|
fromPartial(object) {
|
2043
|
-
const message =
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
message.room = undefined;
|
2049
|
-
}
|
1726
|
+
const message = createBaseRoomUpdate();
|
1727
|
+
message.room =
|
1728
|
+
object.room !== undefined && object.room !== null
|
1729
|
+
? livekit_models_1.Room.fromPartial(object.room)
|
1730
|
+
: undefined;
|
2050
1731
|
return message;
|
2051
1732
|
},
|
2052
1733
|
};
|
2053
|
-
|
2054
|
-
participantSid: "",
|
2055
|
-
|
2056
|
-
score: 0,
|
2057
|
-
};
|
1734
|
+
function createBaseConnectionQualityInfo() {
|
1735
|
+
return { participantSid: "", quality: 0, score: 0 };
|
1736
|
+
}
|
2058
1737
|
exports.ConnectionQualityInfo = {
|
2059
|
-
encode(message, writer =
|
1738
|
+
encode(message, writer = _m0.Writer.create()) {
|
2060
1739
|
if (message.participantSid !== "") {
|
2061
1740
|
writer.uint32(10).string(message.participantSid);
|
2062
1741
|
}
|
@@ -2069,9 +1748,9 @@ exports.ConnectionQualityInfo = {
|
|
2069
1748
|
return writer;
|
2070
1749
|
},
|
2071
1750
|
decode(input, length) {
|
2072
|
-
const reader = input instanceof
|
1751
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2073
1752
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2074
|
-
const message =
|
1753
|
+
const message = createBaseConnectionQualityInfo();
|
2075
1754
|
while (reader.pos < end) {
|
2076
1755
|
const tag = reader.uint32();
|
2077
1756
|
switch (tag >>> 3) {
|
@@ -2092,26 +1771,15 @@ exports.ConnectionQualityInfo = {
|
|
2092
1771
|
return message;
|
2093
1772
|
},
|
2094
1773
|
fromJSON(object) {
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
}
|
2105
|
-
else {
|
2106
|
-
message.quality = 0;
|
2107
|
-
}
|
2108
|
-
if (object.score !== undefined && object.score !== null) {
|
2109
|
-
message.score = Number(object.score);
|
2110
|
-
}
|
2111
|
-
else {
|
2112
|
-
message.score = 0;
|
2113
|
-
}
|
2114
|
-
return message;
|
1774
|
+
return {
|
1775
|
+
participantSid: isSet(object.participantSid)
|
1776
|
+
? String(object.participantSid)
|
1777
|
+
: "",
|
1778
|
+
quality: isSet(object.quality)
|
1779
|
+
? livekit_models_1.connectionQualityFromJSON(object.quality)
|
1780
|
+
: 0,
|
1781
|
+
score: isSet(object.score) ? Number(object.score) : 0,
|
1782
|
+
};
|
2115
1783
|
},
|
2116
1784
|
toJSON(message) {
|
2117
1785
|
const obj = {};
|
@@ -2124,26 +1792,27 @@ exports.ConnectionQualityInfo = {
|
|
2124
1792
|
},
|
2125
1793
|
fromPartial(object) {
|
2126
1794
|
var _a, _b, _c;
|
2127
|
-
const message =
|
1795
|
+
const message = createBaseConnectionQualityInfo();
|
2128
1796
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2129
1797
|
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
2130
1798
|
message.score = (_c = object.score) !== null && _c !== void 0 ? _c : 0;
|
2131
1799
|
return message;
|
2132
1800
|
},
|
2133
1801
|
};
|
2134
|
-
|
1802
|
+
function createBaseConnectionQualityUpdate() {
|
1803
|
+
return { updates: [] };
|
1804
|
+
}
|
2135
1805
|
exports.ConnectionQualityUpdate = {
|
2136
|
-
encode(message, writer =
|
1806
|
+
encode(message, writer = _m0.Writer.create()) {
|
2137
1807
|
for (const v of message.updates) {
|
2138
1808
|
exports.ConnectionQualityInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
2139
1809
|
}
|
2140
1810
|
return writer;
|
2141
1811
|
},
|
2142
1812
|
decode(input, length) {
|
2143
|
-
const reader = input instanceof
|
1813
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2144
1814
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2145
|
-
const message =
|
2146
|
-
message.updates = [];
|
1815
|
+
const message = createBaseConnectionQualityUpdate();
|
2147
1816
|
while (reader.pos < end) {
|
2148
1817
|
const tag = reader.uint32();
|
2149
1818
|
switch (tag >>> 3) {
|
@@ -2158,14 +1827,11 @@ exports.ConnectionQualityUpdate = {
|
|
2158
1827
|
return message;
|
2159
1828
|
},
|
2160
1829
|
fromJSON(object) {
|
2161
|
-
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
}
|
2167
|
-
}
|
2168
|
-
return message;
|
1830
|
+
return {
|
1831
|
+
updates: Array.isArray(object === null || object === void 0 ? void 0 : object.updates)
|
1832
|
+
? object.updates.map((e) => exports.ConnectionQualityInfo.fromJSON(e))
|
1833
|
+
: [],
|
1834
|
+
};
|
2169
1835
|
},
|
2170
1836
|
toJSON(message) {
|
2171
1837
|
const obj = {};
|
@@ -2178,23 +1844,18 @@ exports.ConnectionQualityUpdate = {
|
|
2178
1844
|
return obj;
|
2179
1845
|
},
|
2180
1846
|
fromPartial(object) {
|
2181
|
-
|
2182
|
-
message
|
2183
|
-
|
2184
|
-
|
2185
|
-
message.updates.push(exports.ConnectionQualityInfo.fromPartial(e));
|
2186
|
-
}
|
2187
|
-
}
|
1847
|
+
var _a;
|
1848
|
+
const message = createBaseConnectionQualityUpdate();
|
1849
|
+
message.updates =
|
1850
|
+
((_a = object.updates) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ConnectionQualityInfo.fromPartial(e))) || [];
|
2188
1851
|
return message;
|
2189
1852
|
},
|
2190
1853
|
};
|
2191
|
-
|
2192
|
-
participantSid: "",
|
2193
|
-
|
2194
|
-
state: 0,
|
2195
|
-
};
|
1854
|
+
function createBaseStreamStateInfo() {
|
1855
|
+
return { participantSid: "", trackSid: "", state: 0 };
|
1856
|
+
}
|
2196
1857
|
exports.StreamStateInfo = {
|
2197
|
-
encode(message, writer =
|
1858
|
+
encode(message, writer = _m0.Writer.create()) {
|
2198
1859
|
if (message.participantSid !== "") {
|
2199
1860
|
writer.uint32(10).string(message.participantSid);
|
2200
1861
|
}
|
@@ -2207,9 +1868,9 @@ exports.StreamStateInfo = {
|
|
2207
1868
|
return writer;
|
2208
1869
|
},
|
2209
1870
|
decode(input, length) {
|
2210
|
-
const reader = input instanceof
|
1871
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2211
1872
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2212
|
-
const message =
|
1873
|
+
const message = createBaseStreamStateInfo();
|
2213
1874
|
while (reader.pos < end) {
|
2214
1875
|
const tag = reader.uint32();
|
2215
1876
|
switch (tag >>> 3) {
|
@@ -2230,26 +1891,13 @@ exports.StreamStateInfo = {
|
|
2230
1891
|
return message;
|
2231
1892
|
},
|
2232
1893
|
fromJSON(object) {
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2239
|
-
}
|
2240
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2241
|
-
message.trackSid = String(object.trackSid);
|
2242
|
-
}
|
2243
|
-
else {
|
2244
|
-
message.trackSid = "";
|
2245
|
-
}
|
2246
|
-
if (object.state !== undefined && object.state !== null) {
|
2247
|
-
message.state = streamStateFromJSON(object.state);
|
2248
|
-
}
|
2249
|
-
else {
|
2250
|
-
message.state = 0;
|
2251
|
-
}
|
2252
|
-
return message;
|
1894
|
+
return {
|
1895
|
+
participantSid: isSet(object.participantSid)
|
1896
|
+
? String(object.participantSid)
|
1897
|
+
: "",
|
1898
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
1899
|
+
state: isSet(object.state) ? streamStateFromJSON(object.state) : 0,
|
1900
|
+
};
|
2253
1901
|
},
|
2254
1902
|
toJSON(message) {
|
2255
1903
|
const obj = {};
|
@@ -2262,26 +1910,27 @@ exports.StreamStateInfo = {
|
|
2262
1910
|
},
|
2263
1911
|
fromPartial(object) {
|
2264
1912
|
var _a, _b, _c;
|
2265
|
-
const message =
|
1913
|
+
const message = createBaseStreamStateInfo();
|
2266
1914
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2267
1915
|
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2268
1916
|
message.state = (_c = object.state) !== null && _c !== void 0 ? _c : 0;
|
2269
1917
|
return message;
|
2270
1918
|
},
|
2271
1919
|
};
|
2272
|
-
|
1920
|
+
function createBaseStreamStateUpdate() {
|
1921
|
+
return { streamStates: [] };
|
1922
|
+
}
|
2273
1923
|
exports.StreamStateUpdate = {
|
2274
|
-
encode(message, writer =
|
1924
|
+
encode(message, writer = _m0.Writer.create()) {
|
2275
1925
|
for (const v of message.streamStates) {
|
2276
1926
|
exports.StreamStateInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
2277
1927
|
}
|
2278
1928
|
return writer;
|
2279
1929
|
},
|
2280
1930
|
decode(input, length) {
|
2281
|
-
const reader = input instanceof
|
1931
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2282
1932
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2283
|
-
const message =
|
2284
|
-
message.streamStates = [];
|
1933
|
+
const message = createBaseStreamStateUpdate();
|
2285
1934
|
while (reader.pos < end) {
|
2286
1935
|
const tag = reader.uint32();
|
2287
1936
|
switch (tag >>> 3) {
|
@@ -2296,14 +1945,11 @@ exports.StreamStateUpdate = {
|
|
2296
1945
|
return message;
|
2297
1946
|
},
|
2298
1947
|
fromJSON(object) {
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
}
|
2305
|
-
}
|
2306
|
-
return message;
|
1948
|
+
return {
|
1949
|
+
streamStates: Array.isArray(object === null || object === void 0 ? void 0 : object.streamStates)
|
1950
|
+
? object.streamStates.map((e) => exports.StreamStateInfo.fromJSON(e))
|
1951
|
+
: [],
|
1952
|
+
};
|
2307
1953
|
},
|
2308
1954
|
toJSON(message) {
|
2309
1955
|
const obj = {};
|
@@ -2316,19 +1962,18 @@ exports.StreamStateUpdate = {
|
|
2316
1962
|
return obj;
|
2317
1963
|
},
|
2318
1964
|
fromPartial(object) {
|
2319
|
-
|
2320
|
-
message
|
2321
|
-
|
2322
|
-
|
2323
|
-
message.streamStates.push(exports.StreamStateInfo.fromPartial(e));
|
2324
|
-
}
|
2325
|
-
}
|
1965
|
+
var _a;
|
1966
|
+
const message = createBaseStreamStateUpdate();
|
1967
|
+
message.streamStates =
|
1968
|
+
((_a = object.streamStates) === null || _a === void 0 ? void 0 : _a.map((e) => exports.StreamStateInfo.fromPartial(e))) || [];
|
2326
1969
|
return message;
|
2327
1970
|
},
|
2328
1971
|
};
|
2329
|
-
|
1972
|
+
function createBaseSubscribedQuality() {
|
1973
|
+
return { quality: 0, enabled: false };
|
1974
|
+
}
|
2330
1975
|
exports.SubscribedQuality = {
|
2331
|
-
encode(message, writer =
|
1976
|
+
encode(message, writer = _m0.Writer.create()) {
|
2332
1977
|
if (message.quality !== 0) {
|
2333
1978
|
writer.uint32(8).int32(message.quality);
|
2334
1979
|
}
|
@@ -2338,9 +1983,9 @@ exports.SubscribedQuality = {
|
|
2338
1983
|
return writer;
|
2339
1984
|
},
|
2340
1985
|
decode(input, length) {
|
2341
|
-
const reader = input instanceof
|
1986
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2342
1987
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2343
|
-
const message =
|
1988
|
+
const message = createBaseSubscribedQuality();
|
2344
1989
|
while (reader.pos < end) {
|
2345
1990
|
const tag = reader.uint32();
|
2346
1991
|
switch (tag >>> 3) {
|
@@ -2358,20 +2003,10 @@ exports.SubscribedQuality = {
|
|
2358
2003
|
return message;
|
2359
2004
|
},
|
2360
2005
|
fromJSON(object) {
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
}
|
2365
|
-
else {
|
2366
|
-
message.quality = 0;
|
2367
|
-
}
|
2368
|
-
if (object.enabled !== undefined && object.enabled !== null) {
|
2369
|
-
message.enabled = Boolean(object.enabled);
|
2370
|
-
}
|
2371
|
-
else {
|
2372
|
-
message.enabled = false;
|
2373
|
-
}
|
2374
|
-
return message;
|
2006
|
+
return {
|
2007
|
+
quality: isSet(object.quality) ? livekit_models_1.videoQualityFromJSON(object.quality) : 0,
|
2008
|
+
enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
|
2009
|
+
};
|
2375
2010
|
},
|
2376
2011
|
toJSON(message) {
|
2377
2012
|
const obj = {};
|
@@ -2382,15 +2017,17 @@ exports.SubscribedQuality = {
|
|
2382
2017
|
},
|
2383
2018
|
fromPartial(object) {
|
2384
2019
|
var _a, _b;
|
2385
|
-
const message =
|
2020
|
+
const message = createBaseSubscribedQuality();
|
2386
2021
|
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
2387
2022
|
message.enabled = (_b = object.enabled) !== null && _b !== void 0 ? _b : false;
|
2388
2023
|
return message;
|
2389
2024
|
},
|
2390
2025
|
};
|
2391
|
-
|
2026
|
+
function createBaseSubscribedQualityUpdate() {
|
2027
|
+
return { trackSid: "", subscribedQualities: [] };
|
2028
|
+
}
|
2392
2029
|
exports.SubscribedQualityUpdate = {
|
2393
|
-
encode(message, writer =
|
2030
|
+
encode(message, writer = _m0.Writer.create()) {
|
2394
2031
|
if (message.trackSid !== "") {
|
2395
2032
|
writer.uint32(10).string(message.trackSid);
|
2396
2033
|
}
|
@@ -2400,10 +2037,9 @@ exports.SubscribedQualityUpdate = {
|
|
2400
2037
|
return writer;
|
2401
2038
|
},
|
2402
2039
|
decode(input, length) {
|
2403
|
-
const reader = input instanceof
|
2040
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2404
2041
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2405
|
-
const message =
|
2406
|
-
message.subscribedQualities = [];
|
2042
|
+
const message = createBaseSubscribedQualityUpdate();
|
2407
2043
|
while (reader.pos < end) {
|
2408
2044
|
const tag = reader.uint32();
|
2409
2045
|
switch (tag >>> 3) {
|
@@ -2421,21 +2057,12 @@ exports.SubscribedQualityUpdate = {
|
|
2421
2057
|
return message;
|
2422
2058
|
},
|
2423
2059
|
fromJSON(object) {
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
message.trackSid = "";
|
2431
|
-
}
|
2432
|
-
if (object.subscribedQualities !== undefined &&
|
2433
|
-
object.subscribedQualities !== null) {
|
2434
|
-
for (const e of object.subscribedQualities) {
|
2435
|
-
message.subscribedQualities.push(exports.SubscribedQuality.fromJSON(e));
|
2436
|
-
}
|
2437
|
-
}
|
2438
|
-
return message;
|
2060
|
+
return {
|
2061
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2062
|
+
subscribedQualities: Array.isArray(object === null || object === void 0 ? void 0 : object.subscribedQualities)
|
2063
|
+
? object.subscribedQualities.map((e) => exports.SubscribedQuality.fromJSON(e))
|
2064
|
+
: [],
|
2065
|
+
};
|
2439
2066
|
},
|
2440
2067
|
toJSON(message) {
|
2441
2068
|
const obj = {};
|
@@ -2449,26 +2076,19 @@ exports.SubscribedQualityUpdate = {
|
|
2449
2076
|
return obj;
|
2450
2077
|
},
|
2451
2078
|
fromPartial(object) {
|
2452
|
-
var _a;
|
2453
|
-
const message =
|
2079
|
+
var _a, _b;
|
2080
|
+
const message = createBaseSubscribedQualityUpdate();
|
2454
2081
|
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
2455
|
-
message.subscribedQualities =
|
2456
|
-
|
2457
|
-
object.subscribedQualities !== null) {
|
2458
|
-
for (const e of object.subscribedQualities) {
|
2459
|
-
message.subscribedQualities.push(exports.SubscribedQuality.fromPartial(e));
|
2460
|
-
}
|
2461
|
-
}
|
2082
|
+
message.subscribedQualities =
|
2083
|
+
((_b = object.subscribedQualities) === null || _b === void 0 ? void 0 : _b.map((e) => exports.SubscribedQuality.fromPartial(e))) || [];
|
2462
2084
|
return message;
|
2463
2085
|
},
|
2464
2086
|
};
|
2465
|
-
|
2466
|
-
participantSid: "",
|
2467
|
-
|
2468
|
-
trackSids: "",
|
2469
|
-
};
|
2087
|
+
function createBaseTrackPermission() {
|
2088
|
+
return { participantSid: "", allTracks: false, trackSids: [] };
|
2089
|
+
}
|
2470
2090
|
exports.TrackPermission = {
|
2471
|
-
encode(message, writer =
|
2091
|
+
encode(message, writer = _m0.Writer.create()) {
|
2472
2092
|
if (message.participantSid !== "") {
|
2473
2093
|
writer.uint32(10).string(message.participantSid);
|
2474
2094
|
}
|
@@ -2481,10 +2101,9 @@ exports.TrackPermission = {
|
|
2481
2101
|
return writer;
|
2482
2102
|
},
|
2483
2103
|
decode(input, length) {
|
2484
|
-
const reader = input instanceof
|
2104
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2485
2105
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2486
|
-
const message =
|
2487
|
-
message.trackSids = [];
|
2106
|
+
const message = createBaseTrackPermission();
|
2488
2107
|
while (reader.pos < end) {
|
2489
2108
|
const tag = reader.uint32();
|
2490
2109
|
switch (tag >>> 3) {
|
@@ -2505,26 +2124,15 @@ exports.TrackPermission = {
|
|
2505
2124
|
return message;
|
2506
2125
|
},
|
2507
2126
|
fromJSON(object) {
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
|
2515
|
-
|
2516
|
-
|
2517
|
-
message.allTracks = Boolean(object.allTracks);
|
2518
|
-
}
|
2519
|
-
else {
|
2520
|
-
message.allTracks = false;
|
2521
|
-
}
|
2522
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2523
|
-
for (const e of object.trackSids) {
|
2524
|
-
message.trackSids.push(String(e));
|
2525
|
-
}
|
2526
|
-
}
|
2527
|
-
return message;
|
2127
|
+
return {
|
2128
|
+
participantSid: isSet(object.participantSid)
|
2129
|
+
? String(object.participantSid)
|
2130
|
+
: "",
|
2131
|
+
allTracks: isSet(object.allTracks) ? Boolean(object.allTracks) : false,
|
2132
|
+
trackSids: Array.isArray(object === null || object === void 0 ? void 0 : object.trackSids)
|
2133
|
+
? object.trackSids.map((e) => String(e))
|
2134
|
+
: [],
|
2135
|
+
};
|
2528
2136
|
},
|
2529
2137
|
toJSON(message) {
|
2530
2138
|
const obj = {};
|
@@ -2540,22 +2148,19 @@ exports.TrackPermission = {
|
|
2540
2148
|
return obj;
|
2541
2149
|
},
|
2542
2150
|
fromPartial(object) {
|
2543
|
-
var _a, _b;
|
2544
|
-
const message =
|
2151
|
+
var _a, _b, _c;
|
2152
|
+
const message = createBaseTrackPermission();
|
2545
2153
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2546
2154
|
message.allTracks = (_b = object.allTracks) !== null && _b !== void 0 ? _b : false;
|
2547
|
-
message.trackSids = [];
|
2548
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2549
|
-
for (const e of object.trackSids) {
|
2550
|
-
message.trackSids.push(e);
|
2551
|
-
}
|
2552
|
-
}
|
2155
|
+
message.trackSids = ((_c = object.trackSids) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
2553
2156
|
return message;
|
2554
2157
|
},
|
2555
2158
|
};
|
2556
|
-
|
2159
|
+
function createBaseSubscriptionPermission() {
|
2160
|
+
return { allParticipants: false, trackPermissions: [] };
|
2161
|
+
}
|
2557
2162
|
exports.SubscriptionPermission = {
|
2558
|
-
encode(message, writer =
|
2163
|
+
encode(message, writer = _m0.Writer.create()) {
|
2559
2164
|
if (message.allParticipants === true) {
|
2560
2165
|
writer.uint32(8).bool(message.allParticipants);
|
2561
2166
|
}
|
@@ -2565,10 +2170,9 @@ exports.SubscriptionPermission = {
|
|
2565
2170
|
return writer;
|
2566
2171
|
},
|
2567
2172
|
decode(input, length) {
|
2568
|
-
const reader = input instanceof
|
2173
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2569
2174
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2570
|
-
const message =
|
2571
|
-
message.trackPermissions = [];
|
2175
|
+
const message = createBaseSubscriptionPermission();
|
2572
2176
|
while (reader.pos < end) {
|
2573
2177
|
const tag = reader.uint32();
|
2574
2178
|
switch (tag >>> 3) {
|
@@ -2586,22 +2190,14 @@ exports.SubscriptionPermission = {
|
|
2586
2190
|
return message;
|
2587
2191
|
},
|
2588
2192
|
fromJSON(object) {
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2596
|
-
|
2597
|
-
}
|
2598
|
-
if (object.trackPermissions !== undefined &&
|
2599
|
-
object.trackPermissions !== null) {
|
2600
|
-
for (const e of object.trackPermissions) {
|
2601
|
-
message.trackPermissions.push(exports.TrackPermission.fromJSON(e));
|
2602
|
-
}
|
2603
|
-
}
|
2604
|
-
return message;
|
2193
|
+
return {
|
2194
|
+
allParticipants: isSet(object.allParticipants)
|
2195
|
+
? Boolean(object.allParticipants)
|
2196
|
+
: false,
|
2197
|
+
trackPermissions: Array.isArray(object === null || object === void 0 ? void 0 : object.trackPermissions)
|
2198
|
+
? object.trackPermissions.map((e) => exports.TrackPermission.fromJSON(e))
|
2199
|
+
: [],
|
2200
|
+
};
|
2605
2201
|
},
|
2606
2202
|
toJSON(message) {
|
2607
2203
|
const obj = {};
|
@@ -2616,26 +2212,19 @@ exports.SubscriptionPermission = {
|
|
2616
2212
|
return obj;
|
2617
2213
|
},
|
2618
2214
|
fromPartial(object) {
|
2619
|
-
var _a;
|
2620
|
-
const message =
|
2215
|
+
var _a, _b;
|
2216
|
+
const message = createBaseSubscriptionPermission();
|
2621
2217
|
message.allParticipants = (_a = object.allParticipants) !== null && _a !== void 0 ? _a : false;
|
2622
|
-
message.trackPermissions =
|
2623
|
-
|
2624
|
-
object.trackPermissions !== null) {
|
2625
|
-
for (const e of object.trackPermissions) {
|
2626
|
-
message.trackPermissions.push(exports.TrackPermission.fromPartial(e));
|
2627
|
-
}
|
2628
|
-
}
|
2218
|
+
message.trackPermissions =
|
2219
|
+
((_b = object.trackPermissions) === null || _b === void 0 ? void 0 : _b.map((e) => exports.TrackPermission.fromPartial(e))) || [];
|
2629
2220
|
return message;
|
2630
2221
|
},
|
2631
2222
|
};
|
2632
|
-
|
2633
|
-
participantSid: "",
|
2634
|
-
|
2635
|
-
allowed: false,
|
2636
|
-
};
|
2223
|
+
function createBaseSubscriptionPermissionUpdate() {
|
2224
|
+
return { participantSid: "", trackSid: "", allowed: false };
|
2225
|
+
}
|
2637
2226
|
exports.SubscriptionPermissionUpdate = {
|
2638
|
-
encode(message, writer =
|
2227
|
+
encode(message, writer = _m0.Writer.create()) {
|
2639
2228
|
if (message.participantSid !== "") {
|
2640
2229
|
writer.uint32(10).string(message.participantSid);
|
2641
2230
|
}
|
@@ -2648,9 +2237,9 @@ exports.SubscriptionPermissionUpdate = {
|
|
2648
2237
|
return writer;
|
2649
2238
|
},
|
2650
2239
|
decode(input, length) {
|
2651
|
-
const reader = input instanceof
|
2240
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2652
2241
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2653
|
-
const message =
|
2242
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
2654
2243
|
while (reader.pos < end) {
|
2655
2244
|
const tag = reader.uint32();
|
2656
2245
|
switch (tag >>> 3) {
|
@@ -2671,26 +2260,13 @@ exports.SubscriptionPermissionUpdate = {
|
|
2671
2260
|
return message;
|
2672
2261
|
},
|
2673
2262
|
fromJSON(object) {
|
2674
|
-
|
2675
|
-
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
}
|
2681
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2682
|
-
message.trackSid = String(object.trackSid);
|
2683
|
-
}
|
2684
|
-
else {
|
2685
|
-
message.trackSid = "";
|
2686
|
-
}
|
2687
|
-
if (object.allowed !== undefined && object.allowed !== null) {
|
2688
|
-
message.allowed = Boolean(object.allowed);
|
2689
|
-
}
|
2690
|
-
else {
|
2691
|
-
message.allowed = false;
|
2692
|
-
}
|
2693
|
-
return message;
|
2263
|
+
return {
|
2264
|
+
participantSid: isSet(object.participantSid)
|
2265
|
+
? String(object.participantSid)
|
2266
|
+
: "",
|
2267
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2268
|
+
allowed: isSet(object.allowed) ? Boolean(object.allowed) : false,
|
2269
|
+
};
|
2694
2270
|
},
|
2695
2271
|
toJSON(message) {
|
2696
2272
|
const obj = {};
|
@@ -2702,16 +2278,23 @@ exports.SubscriptionPermissionUpdate = {
|
|
2702
2278
|
},
|
2703
2279
|
fromPartial(object) {
|
2704
2280
|
var _a, _b, _c;
|
2705
|
-
const message =
|
2281
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
2706
2282
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2707
2283
|
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2708
2284
|
message.allowed = (_c = object.allowed) !== null && _c !== void 0 ? _c : false;
|
2709
2285
|
return message;
|
2710
2286
|
},
|
2711
2287
|
};
|
2712
|
-
|
2288
|
+
function createBaseSyncState() {
|
2289
|
+
return {
|
2290
|
+
answer: undefined,
|
2291
|
+
subscription: undefined,
|
2292
|
+
publishTracks: [],
|
2293
|
+
dataChannels: [],
|
2294
|
+
};
|
2295
|
+
}
|
2713
2296
|
exports.SyncState = {
|
2714
|
-
encode(message, writer =
|
2297
|
+
encode(message, writer = _m0.Writer.create()) {
|
2715
2298
|
if (message.answer !== undefined) {
|
2716
2299
|
exports.SessionDescription.encode(message.answer, writer.uint32(10).fork()).ldelim();
|
2717
2300
|
}
|
@@ -2727,11 +2310,9 @@ exports.SyncState = {
|
|
2727
2310
|
return writer;
|
2728
2311
|
},
|
2729
2312
|
decode(input, length) {
|
2730
|
-
const reader = input instanceof
|
2313
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2731
2314
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2732
|
-
const message =
|
2733
|
-
message.publishTracks = [];
|
2734
|
-
message.dataChannels = [];
|
2315
|
+
const message = createBaseSyncState();
|
2735
2316
|
while (reader.pos < end) {
|
2736
2317
|
const tag = reader.uint32();
|
2737
2318
|
switch (tag >>> 3) {
|
@@ -2755,32 +2336,20 @@ exports.SyncState = {
|
|
2755
2336
|
return message;
|
2756
2337
|
},
|
2757
2338
|
fromJSON(object) {
|
2758
|
-
|
2759
|
-
|
2760
|
-
|
2761
|
-
|
2762
|
-
|
2763
|
-
|
2764
|
-
|
2765
|
-
|
2766
|
-
|
2767
|
-
|
2768
|
-
|
2769
|
-
|
2770
|
-
|
2771
|
-
|
2772
|
-
}
|
2773
|
-
if (object.publishTracks !== undefined && object.publishTracks !== null) {
|
2774
|
-
for (const e of object.publishTracks) {
|
2775
|
-
message.publishTracks.push(exports.TrackPublishedResponse.fromJSON(e));
|
2776
|
-
}
|
2777
|
-
}
|
2778
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
2779
|
-
for (const e of object.dataChannels) {
|
2780
|
-
message.dataChannels.push(exports.DataChannelInfo.fromJSON(e));
|
2781
|
-
}
|
2782
|
-
}
|
2783
|
-
return message;
|
2339
|
+
return {
|
2340
|
+
answer: isSet(object.answer)
|
2341
|
+
? exports.SessionDescription.fromJSON(object.answer)
|
2342
|
+
: undefined,
|
2343
|
+
subscription: isSet(object.subscription)
|
2344
|
+
? exports.UpdateSubscription.fromJSON(object.subscription)
|
2345
|
+
: undefined,
|
2346
|
+
publishTracks: Array.isArray(object === null || object === void 0 ? void 0 : object.publishTracks)
|
2347
|
+
? object.publishTracks.map((e) => exports.TrackPublishedResponse.fromJSON(e))
|
2348
|
+
: [],
|
2349
|
+
dataChannels: Array.isArray(object === null || object === void 0 ? void 0 : object.dataChannels)
|
2350
|
+
? object.dataChannels.map((e) => exports.DataChannelInfo.fromJSON(e))
|
2351
|
+
: [],
|
2352
|
+
};
|
2784
2353
|
},
|
2785
2354
|
toJSON(message) {
|
2786
2355
|
const obj = {};
|
@@ -2807,37 +2376,29 @@ exports.SyncState = {
|
|
2807
2376
|
return obj;
|
2808
2377
|
},
|
2809
2378
|
fromPartial(object) {
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
message.
|
2824
|
-
|
2825
|
-
for (const e of object.publishTracks) {
|
2826
|
-
message.publishTracks.push(exports.TrackPublishedResponse.fromPartial(e));
|
2827
|
-
}
|
2828
|
-
}
|
2829
|
-
message.dataChannels = [];
|
2830
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
2831
|
-
for (const e of object.dataChannels) {
|
2832
|
-
message.dataChannels.push(exports.DataChannelInfo.fromPartial(e));
|
2833
|
-
}
|
2834
|
-
}
|
2379
|
+
var _a, _b;
|
2380
|
+
const message = createBaseSyncState();
|
2381
|
+
message.answer =
|
2382
|
+
object.answer !== undefined && object.answer !== null
|
2383
|
+
? exports.SessionDescription.fromPartial(object.answer)
|
2384
|
+
: undefined;
|
2385
|
+
message.subscription =
|
2386
|
+
object.subscription !== undefined && object.subscription !== null
|
2387
|
+
? exports.UpdateSubscription.fromPartial(object.subscription)
|
2388
|
+
: undefined;
|
2389
|
+
message.publishTracks =
|
2390
|
+
((_a = object.publishTracks) === null || _a === void 0 ? void 0 : _a.map((e) => exports.TrackPublishedResponse.fromPartial(e))) ||
|
2391
|
+
[];
|
2392
|
+
message.dataChannels =
|
2393
|
+
((_b = object.dataChannels) === null || _b === void 0 ? void 0 : _b.map((e) => exports.DataChannelInfo.fromPartial(e))) || [];
|
2835
2394
|
return message;
|
2836
2395
|
},
|
2837
2396
|
};
|
2838
|
-
|
2397
|
+
function createBaseDataChannelInfo() {
|
2398
|
+
return { label: "", id: 0 };
|
2399
|
+
}
|
2839
2400
|
exports.DataChannelInfo = {
|
2840
|
-
encode(message, writer =
|
2401
|
+
encode(message, writer = _m0.Writer.create()) {
|
2841
2402
|
if (message.label !== "") {
|
2842
2403
|
writer.uint32(10).string(message.label);
|
2843
2404
|
}
|
@@ -2847,9 +2408,9 @@ exports.DataChannelInfo = {
|
|
2847
2408
|
return writer;
|
2848
2409
|
},
|
2849
2410
|
decode(input, length) {
|
2850
|
-
const reader = input instanceof
|
2411
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2851
2412
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2852
|
-
const message =
|
2413
|
+
const message = createBaseDataChannelInfo();
|
2853
2414
|
while (reader.pos < end) {
|
2854
2415
|
const tag = reader.uint32();
|
2855
2416
|
switch (tag >>> 3) {
|
@@ -2867,38 +2428,35 @@ exports.DataChannelInfo = {
|
|
2867
2428
|
return message;
|
2868
2429
|
},
|
2869
2430
|
fromJSON(object) {
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
}
|
2874
|
-
else {
|
2875
|
-
message.label = "";
|
2876
|
-
}
|
2877
|
-
if (object.id !== undefined && object.id !== null) {
|
2878
|
-
message.id = Number(object.id);
|
2879
|
-
}
|
2880
|
-
else {
|
2881
|
-
message.id = 0;
|
2882
|
-
}
|
2883
|
-
return message;
|
2431
|
+
return {
|
2432
|
+
label: isSet(object.label) ? String(object.label) : "",
|
2433
|
+
id: isSet(object.id) ? Number(object.id) : 0,
|
2434
|
+
};
|
2884
2435
|
},
|
2885
2436
|
toJSON(message) {
|
2886
2437
|
const obj = {};
|
2887
2438
|
message.label !== undefined && (obj.label = message.label);
|
2888
|
-
message.id !== undefined && (obj.id = message.id);
|
2439
|
+
message.id !== undefined && (obj.id = Math.round(message.id));
|
2889
2440
|
return obj;
|
2890
2441
|
},
|
2891
2442
|
fromPartial(object) {
|
2892
2443
|
var _a, _b;
|
2893
|
-
const message =
|
2444
|
+
const message = createBaseDataChannelInfo();
|
2894
2445
|
message.label = (_a = object.label) !== null && _a !== void 0 ? _a : "";
|
2895
2446
|
message.id = (_b = object.id) !== null && _b !== void 0 ? _b : 0;
|
2896
2447
|
return message;
|
2897
2448
|
},
|
2898
2449
|
};
|
2899
|
-
|
2450
|
+
function createBaseSimulateScenario() {
|
2451
|
+
return {
|
2452
|
+
speakerUpdate: undefined,
|
2453
|
+
nodeFailure: undefined,
|
2454
|
+
migration: undefined,
|
2455
|
+
serverLeave: undefined,
|
2456
|
+
};
|
2457
|
+
}
|
2900
2458
|
exports.SimulateScenario = {
|
2901
|
-
encode(message, writer =
|
2459
|
+
encode(message, writer = _m0.Writer.create()) {
|
2902
2460
|
if (message.speakerUpdate !== undefined) {
|
2903
2461
|
writer.uint32(8).int32(message.speakerUpdate);
|
2904
2462
|
}
|
@@ -2914,9 +2472,9 @@ exports.SimulateScenario = {
|
|
2914
2472
|
return writer;
|
2915
2473
|
},
|
2916
2474
|
decode(input, length) {
|
2917
|
-
const reader = input instanceof
|
2475
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2918
2476
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2919
|
-
const message =
|
2477
|
+
const message = createBaseSimulateScenario();
|
2920
2478
|
while (reader.pos < end) {
|
2921
2479
|
const tag = reader.uint32();
|
2922
2480
|
switch (tag >>> 3) {
|
@@ -2940,37 +2498,25 @@ exports.SimulateScenario = {
|
|
2940
2498
|
return message;
|
2941
2499
|
},
|
2942
2500
|
fromJSON(object) {
|
2943
|
-
|
2944
|
-
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
2948
|
-
|
2949
|
-
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2953
|
-
|
2954
|
-
|
2955
|
-
|
2956
|
-
|
2957
|
-
message.migration = Boolean(object.migration);
|
2958
|
-
}
|
2959
|
-
else {
|
2960
|
-
message.migration = undefined;
|
2961
|
-
}
|
2962
|
-
if (object.serverLeave !== undefined && object.serverLeave !== null) {
|
2963
|
-
message.serverLeave = Boolean(object.serverLeave);
|
2964
|
-
}
|
2965
|
-
else {
|
2966
|
-
message.serverLeave = undefined;
|
2967
|
-
}
|
2968
|
-
return message;
|
2501
|
+
return {
|
2502
|
+
speakerUpdate: isSet(object.speakerUpdate)
|
2503
|
+
? Number(object.speakerUpdate)
|
2504
|
+
: undefined,
|
2505
|
+
nodeFailure: isSet(object.nodeFailure)
|
2506
|
+
? Boolean(object.nodeFailure)
|
2507
|
+
: undefined,
|
2508
|
+
migration: isSet(object.migration)
|
2509
|
+
? Boolean(object.migration)
|
2510
|
+
: undefined,
|
2511
|
+
serverLeave: isSet(object.serverLeave)
|
2512
|
+
? Boolean(object.serverLeave)
|
2513
|
+
: undefined,
|
2514
|
+
};
|
2969
2515
|
},
|
2970
2516
|
toJSON(message) {
|
2971
2517
|
const obj = {};
|
2972
2518
|
message.speakerUpdate !== undefined &&
|
2973
|
-
(obj.speakerUpdate = message.speakerUpdate);
|
2519
|
+
(obj.speakerUpdate = Math.round(message.speakerUpdate));
|
2974
2520
|
message.nodeFailure !== undefined &&
|
2975
2521
|
(obj.nodeFailure = message.nodeFailure);
|
2976
2522
|
message.migration !== undefined && (obj.migration = message.migration);
|
@@ -2980,7 +2526,7 @@ exports.SimulateScenario = {
|
|
2980
2526
|
},
|
2981
2527
|
fromPartial(object) {
|
2982
2528
|
var _a, _b, _c, _d;
|
2983
|
-
const message =
|
2529
|
+
const message = createBaseSimulateScenario();
|
2984
2530
|
message.speakerUpdate = (_a = object.speakerUpdate) !== null && _a !== void 0 ? _a : undefined;
|
2985
2531
|
message.nodeFailure = (_b = object.nodeFailure) !== null && _b !== void 0 ? _b : undefined;
|
2986
2532
|
message.migration = (_c = object.migration) !== null && _c !== void 0 ? _c : undefined;
|
@@ -2988,8 +2534,11 @@ exports.SimulateScenario = {
|
|
2988
2534
|
return message;
|
2989
2535
|
},
|
2990
2536
|
};
|
2991
|
-
if (
|
2992
|
-
|
2993
|
-
|
2537
|
+
if (_m0.util.Long !== long_1.default) {
|
2538
|
+
_m0.util.Long = long_1.default;
|
2539
|
+
_m0.configure();
|
2540
|
+
}
|
2541
|
+
function isSet(value) {
|
2542
|
+
return value !== null && value !== undefined;
|
2994
2543
|
}
|
2995
2544
|
//# sourceMappingURL=livekit_rtc.js.map
|