livekit-client 0.17.2 → 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/api/SignalClient.d.ts +2 -1
- package/dist/api/SignalClient.js +6 -1
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +132 -0
- package/dist/proto/google/protobuf/timestamp.js +108 -0
- package/dist/proto/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +596 -16
- package/dist/proto/livekit_models.js +1012 -642
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +3416 -29
- package/dist/proto/livekit_rtc.js +830 -1210
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/Room.d.ts +2 -1
- package/dist/room/Room.js +16 -1
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +12 -2
- package/dist/room/events.js +10 -0
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +4 -1
- package/dist/room/participant/LocalParticipant.js +18 -0
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +5 -1
- package/dist/room/participant/Participant.js +15 -1
- package/dist/room/participant/Participant.js.map +1 -1
- package/dist/room/track/Track.js +10 -3
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/options.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +2 -2
- package/src/api/SignalClient.ts +8 -1
- package/src/proto/google/protobuf/timestamp.ts +232 -0
- package/src/proto/livekit_models.ts +1134 -570
- package/src/proto/livekit_rtc.ts +834 -1135
- package/src/room/Room.ts +30 -9
- package/src/room/events.ts +12 -0
- package/src/room/participant/LocalParticipant.ts +25 -2
- package/src/room/participant/Participant.ts +22 -2
- package/src/room/track/Track.ts +10 -4
- package/src/room/track/options.ts +1 -1
- package/src/version.ts +2 -2
@@ -1,12 +1,31 @@
|
|
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
|
};
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
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.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;
|
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
|
}
|
@@ -419,12 +411,15 @@ exports.SignalResponse = {
|
|
419
411
|
if (message.refreshToken !== undefined) {
|
420
412
|
writer.uint32(130).string(message.refreshToken);
|
421
413
|
}
|
414
|
+
if (message.trackUnpublished !== undefined) {
|
415
|
+
exports.TrackUnpublishedResponse.encode(message.trackUnpublished, writer.uint32(138).fork()).ldelim();
|
416
|
+
}
|
422
417
|
return writer;
|
423
418
|
},
|
424
419
|
decode(input, length) {
|
425
|
-
const reader = input instanceof
|
420
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
426
421
|
let end = length === undefined ? reader.len : reader.pos + length;
|
427
|
-
const message =
|
422
|
+
const message = createBaseSignalResponse();
|
428
423
|
while (reader.pos < end) {
|
429
424
|
const tag = reader.uint32();
|
430
425
|
switch (tag >>> 3) {
|
@@ -474,6 +469,9 @@ exports.SignalResponse = {
|
|
474
469
|
case 16:
|
475
470
|
message.refreshToken = reader.string();
|
476
471
|
break;
|
472
|
+
case 17:
|
473
|
+
message.trackUnpublished = exports.TrackUnpublishedResponse.decode(reader, reader.uint32());
|
474
|
+
break;
|
477
475
|
default:
|
478
476
|
reader.skipType(tag & 7);
|
479
477
|
break;
|
@@ -482,104 +480,54 @@ exports.SignalResponse = {
|
|
482
480
|
return message;
|
483
481
|
},
|
484
482
|
fromJSON(object) {
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
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
|
-
if (object.speakersChanged !== undefined &&
|
535
|
-
object.speakersChanged !== null) {
|
536
|
-
message.speakersChanged = exports.SpeakersChanged.fromJSON(object.speakersChanged);
|
537
|
-
}
|
538
|
-
else {
|
539
|
-
message.speakersChanged = undefined;
|
540
|
-
}
|
541
|
-
if (object.roomUpdate !== undefined && object.roomUpdate !== null) {
|
542
|
-
message.roomUpdate = exports.RoomUpdate.fromJSON(object.roomUpdate);
|
543
|
-
}
|
544
|
-
else {
|
545
|
-
message.roomUpdate = undefined;
|
546
|
-
}
|
547
|
-
if (object.connectionQuality !== undefined &&
|
548
|
-
object.connectionQuality !== null) {
|
549
|
-
message.connectionQuality = exports.ConnectionQualityUpdate.fromJSON(object.connectionQuality);
|
550
|
-
}
|
551
|
-
else {
|
552
|
-
message.connectionQuality = undefined;
|
553
|
-
}
|
554
|
-
if (object.streamStateUpdate !== undefined &&
|
555
|
-
object.streamStateUpdate !== null) {
|
556
|
-
message.streamStateUpdate = exports.StreamStateUpdate.fromJSON(object.streamStateUpdate);
|
557
|
-
}
|
558
|
-
else {
|
559
|
-
message.streamStateUpdate = undefined;
|
560
|
-
}
|
561
|
-
if (object.subscribedQualityUpdate !== undefined &&
|
562
|
-
object.subscribedQualityUpdate !== null) {
|
563
|
-
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate);
|
564
|
-
}
|
565
|
-
else {
|
566
|
-
message.subscribedQualityUpdate = undefined;
|
567
|
-
}
|
568
|
-
if (object.subscriptionPermissionUpdate !== undefined &&
|
569
|
-
object.subscriptionPermissionUpdate !== null) {
|
570
|
-
message.subscriptionPermissionUpdate =
|
571
|
-
exports.SubscriptionPermissionUpdate.fromJSON(object.subscriptionPermissionUpdate);
|
572
|
-
}
|
573
|
-
else {
|
574
|
-
message.subscriptionPermissionUpdate = undefined;
|
575
|
-
}
|
576
|
-
if (object.refreshToken !== undefined && object.refreshToken !== null) {
|
577
|
-
message.refreshToken = String(object.refreshToken);
|
578
|
-
}
|
579
|
-
else {
|
580
|
-
message.refreshToken = undefined;
|
581
|
-
}
|
582
|
-
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
|
+
};
|
583
531
|
},
|
584
532
|
toJSON(message) {
|
585
533
|
const obj = {};
|
@@ -639,117 +587,98 @@ exports.SignalResponse = {
|
|
639
587
|
: undefined);
|
640
588
|
message.refreshToken !== undefined &&
|
641
589
|
(obj.refreshToken = message.refreshToken);
|
590
|
+
message.trackUnpublished !== undefined &&
|
591
|
+
(obj.trackUnpublished = message.trackUnpublished
|
592
|
+
? exports.TrackUnpublishedResponse.toJSON(message.trackUnpublished)
|
593
|
+
: undefined);
|
642
594
|
return obj;
|
643
595
|
},
|
644
596
|
fromPartial(object) {
|
645
597
|
var _a;
|
646
|
-
const message =
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
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
|
-
if (object.connectionQuality !== undefined &&
|
709
|
-
object.connectionQuality !== null) {
|
710
|
-
message.connectionQuality = exports.ConnectionQualityUpdate.fromPartial(object.connectionQuality);
|
711
|
-
}
|
712
|
-
else {
|
713
|
-
message.connectionQuality = undefined;
|
714
|
-
}
|
715
|
-
if (object.streamStateUpdate !== undefined &&
|
716
|
-
object.streamStateUpdate !== null) {
|
717
|
-
message.streamStateUpdate = exports.StreamStateUpdate.fromPartial(object.streamStateUpdate);
|
718
|
-
}
|
719
|
-
else {
|
720
|
-
message.streamStateUpdate = undefined;
|
721
|
-
}
|
722
|
-
if (object.subscribedQualityUpdate !== undefined &&
|
723
|
-
object.subscribedQualityUpdate !== null) {
|
724
|
-
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate);
|
725
|
-
}
|
726
|
-
else {
|
727
|
-
message.subscribedQualityUpdate = undefined;
|
728
|
-
}
|
729
|
-
if (object.subscriptionPermissionUpdate !== undefined &&
|
730
|
-
object.subscriptionPermissionUpdate !== null) {
|
731
|
-
message.subscriptionPermissionUpdate =
|
732
|
-
exports.SubscriptionPermissionUpdate.fromPartial(object.subscriptionPermissionUpdate);
|
733
|
-
}
|
734
|
-
else {
|
735
|
-
message.subscriptionPermissionUpdate = undefined;
|
736
|
-
}
|
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;
|
737
659
|
message.refreshToken = (_a = object.refreshToken) !== null && _a !== void 0 ? _a : undefined;
|
660
|
+
message.trackUnpublished =
|
661
|
+
object.trackUnpublished !== undefined && object.trackUnpublished !== null
|
662
|
+
? exports.TrackUnpublishedResponse.fromPartial(object.trackUnpublished)
|
663
|
+
: undefined;
|
738
664
|
return message;
|
739
665
|
},
|
740
666
|
};
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
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
|
+
}
|
751
680
|
exports.AddTrackRequest = {
|
752
|
-
encode(message, writer =
|
681
|
+
encode(message, writer = _m0.Writer.create()) {
|
753
682
|
if (message.cid !== "") {
|
754
683
|
writer.uint32(10).string(message.cid);
|
755
684
|
}
|
@@ -780,10 +709,9 @@ exports.AddTrackRequest = {
|
|
780
709
|
return writer;
|
781
710
|
},
|
782
711
|
decode(input, length) {
|
783
|
-
const reader = input instanceof
|
712
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
784
713
|
let end = length === undefined ? reader.len : reader.pos + length;
|
785
|
-
const message =
|
786
|
-
message.layers = [];
|
714
|
+
const message = createBaseAddTrackRequest();
|
787
715
|
while (reader.pos < end) {
|
788
716
|
const tag = reader.uint32();
|
789
717
|
switch (tag >>> 3) {
|
@@ -822,70 +750,27 @@ exports.AddTrackRequest = {
|
|
822
750
|
return message;
|
823
751
|
},
|
824
752
|
fromJSON(object) {
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
}
|
839
|
-
if (object.type !== undefined && object.type !== null) {
|
840
|
-
message.type = livekit_models_1.trackTypeFromJSON(object.type);
|
841
|
-
}
|
842
|
-
else {
|
843
|
-
message.type = 0;
|
844
|
-
}
|
845
|
-
if (object.width !== undefined && object.width !== null) {
|
846
|
-
message.width = Number(object.width);
|
847
|
-
}
|
848
|
-
else {
|
849
|
-
message.width = 0;
|
850
|
-
}
|
851
|
-
if (object.height !== undefined && object.height !== null) {
|
852
|
-
message.height = Number(object.height);
|
853
|
-
}
|
854
|
-
else {
|
855
|
-
message.height = 0;
|
856
|
-
}
|
857
|
-
if (object.muted !== undefined && object.muted !== null) {
|
858
|
-
message.muted = Boolean(object.muted);
|
859
|
-
}
|
860
|
-
else {
|
861
|
-
message.muted = false;
|
862
|
-
}
|
863
|
-
if (object.disableDtx !== undefined && object.disableDtx !== null) {
|
864
|
-
message.disableDtx = Boolean(object.disableDtx);
|
865
|
-
}
|
866
|
-
else {
|
867
|
-
message.disableDtx = false;
|
868
|
-
}
|
869
|
-
if (object.source !== undefined && object.source !== null) {
|
870
|
-
message.source = livekit_models_1.trackSourceFromJSON(object.source);
|
871
|
-
}
|
872
|
-
else {
|
873
|
-
message.source = 0;
|
874
|
-
}
|
875
|
-
if (object.layers !== undefined && object.layers !== null) {
|
876
|
-
for (const e of object.layers) {
|
877
|
-
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
878
|
-
}
|
879
|
-
}
|
880
|
-
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
|
+
};
|
881
766
|
},
|
882
767
|
toJSON(message) {
|
883
768
|
const obj = {};
|
884
769
|
message.cid !== undefined && (obj.cid = message.cid);
|
885
770
|
message.name !== undefined && (obj.name = message.name);
|
886
771
|
message.type !== undefined && (obj.type = livekit_models_1.trackTypeToJSON(message.type));
|
887
|
-
message.width !== undefined && (obj.width = message.width);
|
888
|
-
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));
|
889
774
|
message.muted !== undefined && (obj.muted = message.muted);
|
890
775
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
891
776
|
message.source !== undefined &&
|
@@ -899,8 +784,8 @@ exports.AddTrackRequest = {
|
|
899
784
|
return obj;
|
900
785
|
},
|
901
786
|
fromPartial(object) {
|
902
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
903
|
-
const message =
|
787
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
788
|
+
const message = createBaseAddTrackRequest();
|
904
789
|
message.cid = (_a = object.cid) !== null && _a !== void 0 ? _a : "";
|
905
790
|
message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
|
906
791
|
message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
|
@@ -909,18 +794,15 @@ exports.AddTrackRequest = {
|
|
909
794
|
message.muted = (_f = object.muted) !== null && _f !== void 0 ? _f : false;
|
910
795
|
message.disableDtx = (_g = object.disableDtx) !== null && _g !== void 0 ? _g : false;
|
911
796
|
message.source = (_h = object.source) !== null && _h !== void 0 ? _h : 0;
|
912
|
-
message.layers = [];
|
913
|
-
if (object.layers !== undefined && object.layers !== null) {
|
914
|
-
for (const e of object.layers) {
|
915
|
-
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
916
|
-
}
|
917
|
-
}
|
797
|
+
message.layers = ((_j = object.layers) === null || _j === void 0 ? void 0 : _j.map((e) => livekit_models_1.VideoLayer.fromPartial(e))) || [];
|
918
798
|
return message;
|
919
799
|
},
|
920
800
|
};
|
921
|
-
|
801
|
+
function createBaseTrickleRequest() {
|
802
|
+
return { candidateInit: "", target: 0 };
|
803
|
+
}
|
922
804
|
exports.TrickleRequest = {
|
923
|
-
encode(message, writer =
|
805
|
+
encode(message, writer = _m0.Writer.create()) {
|
924
806
|
if (message.candidateInit !== "") {
|
925
807
|
writer.uint32(10).string(message.candidateInit);
|
926
808
|
}
|
@@ -930,9 +812,9 @@ exports.TrickleRequest = {
|
|
930
812
|
return writer;
|
931
813
|
},
|
932
814
|
decode(input, length) {
|
933
|
-
const reader = input instanceof
|
815
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
934
816
|
let end = length === undefined ? reader.len : reader.pos + length;
|
935
|
-
const message =
|
817
|
+
const message = createBaseTrickleRequest();
|
936
818
|
while (reader.pos < end) {
|
937
819
|
const tag = reader.uint32();
|
938
820
|
switch (tag >>> 3) {
|
@@ -950,20 +832,12 @@ exports.TrickleRequest = {
|
|
950
832
|
return message;
|
951
833
|
},
|
952
834
|
fromJSON(object) {
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
}
|
960
|
-
if (object.target !== undefined && object.target !== null) {
|
961
|
-
message.target = signalTargetFromJSON(object.target);
|
962
|
-
}
|
963
|
-
else {
|
964
|
-
message.target = 0;
|
965
|
-
}
|
966
|
-
return message;
|
835
|
+
return {
|
836
|
+
candidateInit: isSet(object.candidateInit)
|
837
|
+
? String(object.candidateInit)
|
838
|
+
: "",
|
839
|
+
target: isSet(object.target) ? signalTargetFromJSON(object.target) : 0,
|
840
|
+
};
|
967
841
|
},
|
968
842
|
toJSON(message) {
|
969
843
|
const obj = {};
|
@@ -975,15 +849,17 @@ exports.TrickleRequest = {
|
|
975
849
|
},
|
976
850
|
fromPartial(object) {
|
977
851
|
var _a, _b;
|
978
|
-
const message =
|
852
|
+
const message = createBaseTrickleRequest();
|
979
853
|
message.candidateInit = (_a = object.candidateInit) !== null && _a !== void 0 ? _a : "";
|
980
854
|
message.target = (_b = object.target) !== null && _b !== void 0 ? _b : 0;
|
981
855
|
return message;
|
982
856
|
},
|
983
857
|
};
|
984
|
-
|
858
|
+
function createBaseMuteTrackRequest() {
|
859
|
+
return { sid: "", muted: false };
|
860
|
+
}
|
985
861
|
exports.MuteTrackRequest = {
|
986
|
-
encode(message, writer =
|
862
|
+
encode(message, writer = _m0.Writer.create()) {
|
987
863
|
if (message.sid !== "") {
|
988
864
|
writer.uint32(10).string(message.sid);
|
989
865
|
}
|
@@ -993,9 +869,9 @@ exports.MuteTrackRequest = {
|
|
993
869
|
return writer;
|
994
870
|
},
|
995
871
|
decode(input, length) {
|
996
|
-
const reader = input instanceof
|
872
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
997
873
|
let end = length === undefined ? reader.len : reader.pos + length;
|
998
|
-
const message =
|
874
|
+
const message = createBaseMuteTrackRequest();
|
999
875
|
while (reader.pos < end) {
|
1000
876
|
const tag = reader.uint32();
|
1001
877
|
switch (tag >>> 3) {
|
@@ -1013,20 +889,10 @@ exports.MuteTrackRequest = {
|
|
1013
889
|
return message;
|
1014
890
|
},
|
1015
891
|
fromJSON(object) {
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
}
|
1020
|
-
else {
|
1021
|
-
message.sid = "";
|
1022
|
-
}
|
1023
|
-
if (object.muted !== undefined && object.muted !== null) {
|
1024
|
-
message.muted = Boolean(object.muted);
|
1025
|
-
}
|
1026
|
-
else {
|
1027
|
-
message.muted = false;
|
1028
|
-
}
|
1029
|
-
return message;
|
892
|
+
return {
|
893
|
+
sid: isSet(object.sid) ? String(object.sid) : "",
|
894
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
895
|
+
};
|
1030
896
|
},
|
1031
897
|
toJSON(message) {
|
1032
898
|
const obj = {};
|
@@ -1036,20 +902,27 @@ exports.MuteTrackRequest = {
|
|
1036
902
|
},
|
1037
903
|
fromPartial(object) {
|
1038
904
|
var _a, _b;
|
1039
|
-
const message =
|
905
|
+
const message = createBaseMuteTrackRequest();
|
1040
906
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
1041
907
|
message.muted = (_b = object.muted) !== null && _b !== void 0 ? _b : false;
|
1042
908
|
return message;
|
1043
909
|
},
|
1044
910
|
};
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
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
|
+
}
|
1051
924
|
exports.JoinResponse = {
|
1052
|
-
encode(message, writer =
|
925
|
+
encode(message, writer = _m0.Writer.create()) {
|
1053
926
|
if (message.room !== undefined) {
|
1054
927
|
livekit_models_1.Room.encode(message.room, writer.uint32(10).fork()).ldelim();
|
1055
928
|
}
|
@@ -1080,11 +953,9 @@ exports.JoinResponse = {
|
|
1080
953
|
return writer;
|
1081
954
|
},
|
1082
955
|
decode(input, length) {
|
1083
|
-
const reader = input instanceof
|
956
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1084
957
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1085
|
-
const message =
|
1086
|
-
message.otherParticipants = [];
|
1087
|
-
message.iceServers = [];
|
958
|
+
const message = createBaseJoinResponse();
|
1088
959
|
while (reader.pos < end) {
|
1089
960
|
const tag = reader.uint32();
|
1090
961
|
switch (tag >>> 3) {
|
@@ -1123,65 +994,33 @@ exports.JoinResponse = {
|
|
1123
994
|
return message;
|
1124
995
|
},
|
1125
996
|
fromJSON(object) {
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
}
|
1153
|
-
if (object.iceServers !== undefined && object.iceServers !== null) {
|
1154
|
-
for (const e of object.iceServers) {
|
1155
|
-
message.iceServers.push(exports.ICEServer.fromJSON(e));
|
1156
|
-
}
|
1157
|
-
}
|
1158
|
-
if (object.subscriberPrimary !== undefined &&
|
1159
|
-
object.subscriberPrimary !== null) {
|
1160
|
-
message.subscriberPrimary = Boolean(object.subscriberPrimary);
|
1161
|
-
}
|
1162
|
-
else {
|
1163
|
-
message.subscriberPrimary = false;
|
1164
|
-
}
|
1165
|
-
if (object.alternativeUrl !== undefined && object.alternativeUrl !== null) {
|
1166
|
-
message.alternativeUrl = String(object.alternativeUrl);
|
1167
|
-
}
|
1168
|
-
else {
|
1169
|
-
message.alternativeUrl = "";
|
1170
|
-
}
|
1171
|
-
if (object.clientConfiguration !== undefined &&
|
1172
|
-
object.clientConfiguration !== null) {
|
1173
|
-
message.clientConfiguration = livekit_models_1.ClientConfiguration.fromJSON(object.clientConfiguration);
|
1174
|
-
}
|
1175
|
-
else {
|
1176
|
-
message.clientConfiguration = undefined;
|
1177
|
-
}
|
1178
|
-
if (object.serverRegion !== undefined && object.serverRegion !== null) {
|
1179
|
-
message.serverRegion = String(object.serverRegion);
|
1180
|
-
}
|
1181
|
-
else {
|
1182
|
-
message.serverRegion = "";
|
1183
|
-
}
|
1184
|
-
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
|
+
};
|
1185
1024
|
},
|
1186
1025
|
toJSON(message) {
|
1187
1026
|
const obj = {};
|
@@ -1218,50 +1057,38 @@ exports.JoinResponse = {
|
|
1218
1057
|
return obj;
|
1219
1058
|
},
|
1220
1059
|
fromPartial(object) {
|
1221
|
-
var _a, _b, _c, _d;
|
1222
|
-
const message =
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
message.
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
for (const e of object.iceServers) {
|
1246
|
-
message.iceServers.push(exports.ICEServer.fromPartial(e));
|
1247
|
-
}
|
1248
|
-
}
|
1249
|
-
message.subscriberPrimary = (_b = object.subscriberPrimary) !== null && _b !== void 0 ? _b : false;
|
1250
|
-
message.alternativeUrl = (_c = object.alternativeUrl) !== null && _c !== void 0 ? _c : "";
|
1251
|
-
if (object.clientConfiguration !== undefined &&
|
1252
|
-
object.clientConfiguration !== null) {
|
1253
|
-
message.clientConfiguration = livekit_models_1.ClientConfiguration.fromPartial(object.clientConfiguration);
|
1254
|
-
}
|
1255
|
-
else {
|
1256
|
-
message.clientConfiguration = undefined;
|
1257
|
-
}
|
1258
|
-
message.serverRegion = (_d = object.serverRegion) !== null && _d !== void 0 ? _d : "";
|
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 : "";
|
1259
1084
|
return message;
|
1260
1085
|
},
|
1261
1086
|
};
|
1262
|
-
|
1087
|
+
function createBaseTrackPublishedResponse() {
|
1088
|
+
return { cid: "", track: undefined };
|
1089
|
+
}
|
1263
1090
|
exports.TrackPublishedResponse = {
|
1264
|
-
encode(message, writer =
|
1091
|
+
encode(message, writer = _m0.Writer.create()) {
|
1265
1092
|
if (message.cid !== "") {
|
1266
1093
|
writer.uint32(10).string(message.cid);
|
1267
1094
|
}
|
@@ -1271,9 +1098,9 @@ exports.TrackPublishedResponse = {
|
|
1271
1098
|
return writer;
|
1272
1099
|
},
|
1273
1100
|
decode(input, length) {
|
1274
|
-
const reader = input instanceof
|
1101
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1275
1102
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1276
|
-
const message =
|
1103
|
+
const message = createBaseTrackPublishedResponse();
|
1277
1104
|
while (reader.pos < end) {
|
1278
1105
|
const tag = reader.uint32();
|
1279
1106
|
switch (tag >>> 3) {
|
@@ -1291,44 +1118,78 @@ exports.TrackPublishedResponse = {
|
|
1291
1118
|
return message;
|
1292
1119
|
},
|
1293
1120
|
fromJSON(object) {
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
}
|
1298
|
-
|
1299
|
-
|
1300
|
-
}
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1121
|
+
return {
|
1122
|
+
cid: isSet(object.cid) ? String(object.cid) : "",
|
1123
|
+
track: isSet(object.track) ? livekit_models_1.TrackInfo.fromJSON(object.track) : undefined,
|
1124
|
+
};
|
1125
|
+
},
|
1126
|
+
toJSON(message) {
|
1127
|
+
const obj = {};
|
1128
|
+
message.cid !== undefined && (obj.cid = message.cid);
|
1129
|
+
message.track !== undefined &&
|
1130
|
+
(obj.track = message.track ? livekit_models_1.TrackInfo.toJSON(message.track) : undefined);
|
1131
|
+
return obj;
|
1132
|
+
},
|
1133
|
+
fromPartial(object) {
|
1134
|
+
var _a;
|
1135
|
+
const message = createBaseTrackPublishedResponse();
|
1136
|
+
message.cid = (_a = object.cid) !== null && _a !== void 0 ? _a : "";
|
1137
|
+
message.track =
|
1138
|
+
object.track !== undefined && object.track !== null
|
1139
|
+
? livekit_models_1.TrackInfo.fromPartial(object.track)
|
1140
|
+
: undefined;
|
1141
|
+
return message;
|
1142
|
+
},
|
1143
|
+
};
|
1144
|
+
function createBaseTrackUnpublishedResponse() {
|
1145
|
+
return { trackSid: "" };
|
1146
|
+
}
|
1147
|
+
exports.TrackUnpublishedResponse = {
|
1148
|
+
encode(message, writer = _m0.Writer.create()) {
|
1149
|
+
if (message.trackSid !== "") {
|
1150
|
+
writer.uint32(10).string(message.trackSid);
|
1151
|
+
}
|
1152
|
+
return writer;
|
1153
|
+
},
|
1154
|
+
decode(input, length) {
|
1155
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1156
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1157
|
+
const message = createBaseTrackUnpublishedResponse();
|
1158
|
+
while (reader.pos < end) {
|
1159
|
+
const tag = reader.uint32();
|
1160
|
+
switch (tag >>> 3) {
|
1161
|
+
case 1:
|
1162
|
+
message.trackSid = reader.string();
|
1163
|
+
break;
|
1164
|
+
default:
|
1165
|
+
reader.skipType(tag & 7);
|
1166
|
+
break;
|
1167
|
+
}
|
1168
|
+
}
|
1169
|
+
return message;
|
1170
|
+
},
|
1171
|
+
fromJSON(object) {
|
1172
|
+
return {
|
1173
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
1174
|
+
};
|
1308
1175
|
},
|
1309
1176
|
toJSON(message) {
|
1310
1177
|
const obj = {};
|
1311
|
-
message.
|
1312
|
-
message.track !== undefined &&
|
1313
|
-
(obj.track = message.track ? livekit_models_1.TrackInfo.toJSON(message.track) : undefined);
|
1178
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
1314
1179
|
return obj;
|
1315
1180
|
},
|
1316
1181
|
fromPartial(object) {
|
1317
1182
|
var _a;
|
1318
|
-
const message =
|
1319
|
-
message.
|
1320
|
-
if (object.track !== undefined && object.track !== null) {
|
1321
|
-
message.track = livekit_models_1.TrackInfo.fromPartial(object.track);
|
1322
|
-
}
|
1323
|
-
else {
|
1324
|
-
message.track = undefined;
|
1325
|
-
}
|
1183
|
+
const message = createBaseTrackUnpublishedResponse();
|
1184
|
+
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
1326
1185
|
return message;
|
1327
1186
|
},
|
1328
1187
|
};
|
1329
|
-
|
1188
|
+
function createBaseSessionDescription() {
|
1189
|
+
return { type: "", sdp: "" };
|
1190
|
+
}
|
1330
1191
|
exports.SessionDescription = {
|
1331
|
-
encode(message, writer =
|
1192
|
+
encode(message, writer = _m0.Writer.create()) {
|
1332
1193
|
if (message.type !== "") {
|
1333
1194
|
writer.uint32(10).string(message.type);
|
1334
1195
|
}
|
@@ -1338,9 +1199,9 @@ exports.SessionDescription = {
|
|
1338
1199
|
return writer;
|
1339
1200
|
},
|
1340
1201
|
decode(input, length) {
|
1341
|
-
const reader = input instanceof
|
1202
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1342
1203
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1343
|
-
const message =
|
1204
|
+
const message = createBaseSessionDescription();
|
1344
1205
|
while (reader.pos < end) {
|
1345
1206
|
const tag = reader.uint32();
|
1346
1207
|
switch (tag >>> 3) {
|
@@ -1358,20 +1219,10 @@ exports.SessionDescription = {
|
|
1358
1219
|
return message;
|
1359
1220
|
},
|
1360
1221
|
fromJSON(object) {
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
}
|
1365
|
-
else {
|
1366
|
-
message.type = "";
|
1367
|
-
}
|
1368
|
-
if (object.sdp !== undefined && object.sdp !== null) {
|
1369
|
-
message.sdp = String(object.sdp);
|
1370
|
-
}
|
1371
|
-
else {
|
1372
|
-
message.sdp = "";
|
1373
|
-
}
|
1374
|
-
return message;
|
1222
|
+
return {
|
1223
|
+
type: isSet(object.type) ? String(object.type) : "",
|
1224
|
+
sdp: isSet(object.sdp) ? String(object.sdp) : "",
|
1225
|
+
};
|
1375
1226
|
},
|
1376
1227
|
toJSON(message) {
|
1377
1228
|
const obj = {};
|
@@ -1381,25 +1232,26 @@ exports.SessionDescription = {
|
|
1381
1232
|
},
|
1382
1233
|
fromPartial(object) {
|
1383
1234
|
var _a, _b;
|
1384
|
-
const message =
|
1235
|
+
const message = createBaseSessionDescription();
|
1385
1236
|
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
|
1386
1237
|
message.sdp = (_b = object.sdp) !== null && _b !== void 0 ? _b : "";
|
1387
1238
|
return message;
|
1388
1239
|
},
|
1389
1240
|
};
|
1390
|
-
|
1241
|
+
function createBaseParticipantUpdate() {
|
1242
|
+
return { participants: [] };
|
1243
|
+
}
|
1391
1244
|
exports.ParticipantUpdate = {
|
1392
|
-
encode(message, writer =
|
1245
|
+
encode(message, writer = _m0.Writer.create()) {
|
1393
1246
|
for (const v of message.participants) {
|
1394
1247
|
livekit_models_1.ParticipantInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
1395
1248
|
}
|
1396
1249
|
return writer;
|
1397
1250
|
},
|
1398
1251
|
decode(input, length) {
|
1399
|
-
const reader = input instanceof
|
1252
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1400
1253
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1401
|
-
const message =
|
1402
|
-
message.participants = [];
|
1254
|
+
const message = createBaseParticipantUpdate();
|
1403
1255
|
while (reader.pos < end) {
|
1404
1256
|
const tag = reader.uint32();
|
1405
1257
|
switch (tag >>> 3) {
|
@@ -1414,14 +1266,11 @@ exports.ParticipantUpdate = {
|
|
1414
1266
|
return message;
|
1415
1267
|
},
|
1416
1268
|
fromJSON(object) {
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
}
|
1423
|
-
}
|
1424
|
-
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
|
+
};
|
1425
1274
|
},
|
1426
1275
|
toJSON(message) {
|
1427
1276
|
const obj = {};
|
@@ -1434,19 +1283,18 @@ exports.ParticipantUpdate = {
|
|
1434
1283
|
return obj;
|
1435
1284
|
},
|
1436
1285
|
fromPartial(object) {
|
1437
|
-
|
1438
|
-
message
|
1439
|
-
|
1440
|
-
|
1441
|
-
message.participants.push(livekit_models_1.ParticipantInfo.fromPartial(e));
|
1442
|
-
}
|
1443
|
-
}
|
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))) || [];
|
1444
1290
|
return message;
|
1445
1291
|
},
|
1446
1292
|
};
|
1447
|
-
|
1293
|
+
function createBaseUpdateSubscription() {
|
1294
|
+
return { trackSids: [], subscribe: false, participantTracks: [] };
|
1295
|
+
}
|
1448
1296
|
exports.UpdateSubscription = {
|
1449
|
-
encode(message, writer =
|
1297
|
+
encode(message, writer = _m0.Writer.create()) {
|
1450
1298
|
for (const v of message.trackSids) {
|
1451
1299
|
writer.uint32(10).string(v);
|
1452
1300
|
}
|
@@ -1459,11 +1307,9 @@ exports.UpdateSubscription = {
|
|
1459
1307
|
return writer;
|
1460
1308
|
},
|
1461
1309
|
decode(input, length) {
|
1462
|
-
const reader = input instanceof
|
1310
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1463
1311
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1464
|
-
const message =
|
1465
|
-
message.trackSids = [];
|
1466
|
-
message.participantTracks = [];
|
1312
|
+
const message = createBaseUpdateSubscription();
|
1467
1313
|
while (reader.pos < end) {
|
1468
1314
|
const tag = reader.uint32();
|
1469
1315
|
switch (tag >>> 3) {
|
@@ -1484,27 +1330,15 @@ exports.UpdateSubscription = {
|
|
1484
1330
|
return message;
|
1485
1331
|
},
|
1486
1332
|
fromJSON(object) {
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
message.subscribe = Boolean(object.subscribe);
|
1497
|
-
}
|
1498
|
-
else {
|
1499
|
-
message.subscribe = false;
|
1500
|
-
}
|
1501
|
-
if (object.participantTracks !== undefined &&
|
1502
|
-
object.participantTracks !== null) {
|
1503
|
-
for (const e of object.participantTracks) {
|
1504
|
-
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromJSON(e));
|
1505
|
-
}
|
1506
|
-
}
|
1507
|
-
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
|
+
};
|
1508
1342
|
},
|
1509
1343
|
toJSON(message) {
|
1510
1344
|
const obj = {};
|
@@ -1524,34 +1358,21 @@ exports.UpdateSubscription = {
|
|
1524
1358
|
return obj;
|
1525
1359
|
},
|
1526
1360
|
fromPartial(object) {
|
1527
|
-
var _a;
|
1528
|
-
const message =
|
1529
|
-
message.trackSids = [];
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
}
|
1535
|
-
message.subscribe = (_a = object.subscribe) !== null && _a !== void 0 ? _a : false;
|
1536
|
-
message.participantTracks = [];
|
1537
|
-
if (object.participantTracks !== undefined &&
|
1538
|
-
object.participantTracks !== null) {
|
1539
|
-
for (const e of object.participantTracks) {
|
1540
|
-
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromPartial(e));
|
1541
|
-
}
|
1542
|
-
}
|
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
|
+
[];
|
1543
1368
|
return message;
|
1544
1369
|
},
|
1545
1370
|
};
|
1546
|
-
|
1547
|
-
trackSids:
|
1548
|
-
|
1549
|
-
quality: 0,
|
1550
|
-
width: 0,
|
1551
|
-
height: 0,
|
1552
|
-
};
|
1371
|
+
function createBaseUpdateTrackSettings() {
|
1372
|
+
return { trackSids: [], disabled: false, quality: 0, width: 0, height: 0 };
|
1373
|
+
}
|
1553
1374
|
exports.UpdateTrackSettings = {
|
1554
|
-
encode(message, writer =
|
1375
|
+
encode(message, writer = _m0.Writer.create()) {
|
1555
1376
|
for (const v of message.trackSids) {
|
1556
1377
|
writer.uint32(10).string(v);
|
1557
1378
|
}
|
@@ -1570,10 +1391,9 @@ exports.UpdateTrackSettings = {
|
|
1570
1391
|
return writer;
|
1571
1392
|
},
|
1572
1393
|
decode(input, length) {
|
1573
|
-
const reader = input instanceof
|
1394
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1574
1395
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1575
|
-
const message =
|
1576
|
-
message.trackSids = [];
|
1396
|
+
const message = createBaseUpdateTrackSettings();
|
1577
1397
|
while (reader.pos < end) {
|
1578
1398
|
const tag = reader.uint32();
|
1579
1399
|
switch (tag >>> 3) {
|
@@ -1600,38 +1420,15 @@ exports.UpdateTrackSettings = {
|
|
1600
1420
|
return message;
|
1601
1421
|
},
|
1602
1422
|
fromJSON(object) {
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
}
|
1613
|
-
else {
|
1614
|
-
message.disabled = false;
|
1615
|
-
}
|
1616
|
-
if (object.quality !== undefined && object.quality !== null) {
|
1617
|
-
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
1618
|
-
}
|
1619
|
-
else {
|
1620
|
-
message.quality = 0;
|
1621
|
-
}
|
1622
|
-
if (object.width !== undefined && object.width !== null) {
|
1623
|
-
message.width = Number(object.width);
|
1624
|
-
}
|
1625
|
-
else {
|
1626
|
-
message.width = 0;
|
1627
|
-
}
|
1628
|
-
if (object.height !== undefined && object.height !== null) {
|
1629
|
-
message.height = Number(object.height);
|
1630
|
-
}
|
1631
|
-
else {
|
1632
|
-
message.height = 0;
|
1633
|
-
}
|
1634
|
-
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
|
+
};
|
1635
1432
|
},
|
1636
1433
|
toJSON(message) {
|
1637
1434
|
const obj = {};
|
@@ -1644,38 +1441,35 @@ exports.UpdateTrackSettings = {
|
|
1644
1441
|
message.disabled !== undefined && (obj.disabled = message.disabled);
|
1645
1442
|
message.quality !== undefined &&
|
1646
1443
|
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
1647
|
-
message.width !== undefined && (obj.width = message.width);
|
1648
|
-
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));
|
1649
1446
|
return obj;
|
1650
1447
|
},
|
1651
1448
|
fromPartial(object) {
|
1652
|
-
var _a, _b, _c, _d;
|
1653
|
-
const message =
|
1654
|
-
message.trackSids = [];
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
}
|
1660
|
-
message.disabled = (_a = object.disabled) !== null && _a !== void 0 ? _a : false;
|
1661
|
-
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
1662
|
-
message.width = (_c = object.width) !== null && _c !== void 0 ? _c : 0;
|
1663
|
-
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;
|
1664
1456
|
return message;
|
1665
1457
|
},
|
1666
1458
|
};
|
1667
|
-
|
1459
|
+
function createBaseLeaveRequest() {
|
1460
|
+
return { canReconnect: false };
|
1461
|
+
}
|
1668
1462
|
exports.LeaveRequest = {
|
1669
|
-
encode(message, writer =
|
1463
|
+
encode(message, writer = _m0.Writer.create()) {
|
1670
1464
|
if (message.canReconnect === true) {
|
1671
1465
|
writer.uint32(8).bool(message.canReconnect);
|
1672
1466
|
}
|
1673
1467
|
return writer;
|
1674
1468
|
},
|
1675
1469
|
decode(input, length) {
|
1676
|
-
const reader = input instanceof
|
1470
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1677
1471
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1678
|
-
const message =
|
1472
|
+
const message = createBaseLeaveRequest();
|
1679
1473
|
while (reader.pos < end) {
|
1680
1474
|
const tag = reader.uint32();
|
1681
1475
|
switch (tag >>> 3) {
|
@@ -1690,14 +1484,11 @@ exports.LeaveRequest = {
|
|
1690
1484
|
return message;
|
1691
1485
|
},
|
1692
1486
|
fromJSON(object) {
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
message.canReconnect = false;
|
1699
|
-
}
|
1700
|
-
return message;
|
1487
|
+
return {
|
1488
|
+
canReconnect: isSet(object.canReconnect)
|
1489
|
+
? Boolean(object.canReconnect)
|
1490
|
+
: false,
|
1491
|
+
};
|
1701
1492
|
},
|
1702
1493
|
toJSON(message) {
|
1703
1494
|
const obj = {};
|
@@ -1707,14 +1498,16 @@ exports.LeaveRequest = {
|
|
1707
1498
|
},
|
1708
1499
|
fromPartial(object) {
|
1709
1500
|
var _a;
|
1710
|
-
const message =
|
1501
|
+
const message = createBaseLeaveRequest();
|
1711
1502
|
message.canReconnect = (_a = object.canReconnect) !== null && _a !== void 0 ? _a : false;
|
1712
1503
|
return message;
|
1713
1504
|
},
|
1714
1505
|
};
|
1715
|
-
|
1506
|
+
function createBaseUpdateVideoLayers() {
|
1507
|
+
return { trackSid: "", layers: [] };
|
1508
|
+
}
|
1716
1509
|
exports.UpdateVideoLayers = {
|
1717
|
-
encode(message, writer =
|
1510
|
+
encode(message, writer = _m0.Writer.create()) {
|
1718
1511
|
if (message.trackSid !== "") {
|
1719
1512
|
writer.uint32(10).string(message.trackSid);
|
1720
1513
|
}
|
@@ -1724,10 +1517,9 @@ exports.UpdateVideoLayers = {
|
|
1724
1517
|
return writer;
|
1725
1518
|
},
|
1726
1519
|
decode(input, length) {
|
1727
|
-
const reader = input instanceof
|
1520
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1728
1521
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1729
|
-
const message =
|
1730
|
-
message.layers = [];
|
1522
|
+
const message = createBaseUpdateVideoLayers();
|
1731
1523
|
while (reader.pos < end) {
|
1732
1524
|
const tag = reader.uint32();
|
1733
1525
|
switch (tag >>> 3) {
|
@@ -1745,20 +1537,12 @@ exports.UpdateVideoLayers = {
|
|
1745
1537
|
return message;
|
1746
1538
|
},
|
1747
1539
|
fromJSON(object) {
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
message.trackSid = "";
|
1755
|
-
}
|
1756
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1757
|
-
for (const e of object.layers) {
|
1758
|
-
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
1759
|
-
}
|
1760
|
-
}
|
1761
|
-
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
|
+
};
|
1762
1546
|
},
|
1763
1547
|
toJSON(message) {
|
1764
1548
|
const obj = {};
|
@@ -1772,21 +1556,18 @@ exports.UpdateVideoLayers = {
|
|
1772
1556
|
return obj;
|
1773
1557
|
},
|
1774
1558
|
fromPartial(object) {
|
1775
|
-
var _a;
|
1776
|
-
const message =
|
1559
|
+
var _a, _b;
|
1560
|
+
const message = createBaseUpdateVideoLayers();
|
1777
1561
|
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
1778
|
-
message.layers = [];
|
1779
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1780
|
-
for (const e of object.layers) {
|
1781
|
-
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
1782
|
-
}
|
1783
|
-
}
|
1562
|
+
message.layers = ((_b = object.layers) === null || _b === void 0 ? void 0 : _b.map((e) => livekit_models_1.VideoLayer.fromPartial(e))) || [];
|
1784
1563
|
return message;
|
1785
1564
|
},
|
1786
1565
|
};
|
1787
|
-
|
1566
|
+
function createBaseICEServer() {
|
1567
|
+
return { urls: [], username: "", credential: "" };
|
1568
|
+
}
|
1788
1569
|
exports.ICEServer = {
|
1789
|
-
encode(message, writer =
|
1570
|
+
encode(message, writer = _m0.Writer.create()) {
|
1790
1571
|
for (const v of message.urls) {
|
1791
1572
|
writer.uint32(10).string(v);
|
1792
1573
|
}
|
@@ -1799,10 +1580,9 @@ exports.ICEServer = {
|
|
1799
1580
|
return writer;
|
1800
1581
|
},
|
1801
1582
|
decode(input, length) {
|
1802
|
-
const reader = input instanceof
|
1583
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1803
1584
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1804
|
-
const message =
|
1805
|
-
message.urls = [];
|
1585
|
+
const message = createBaseICEServer();
|
1806
1586
|
while (reader.pos < end) {
|
1807
1587
|
const tag = reader.uint32();
|
1808
1588
|
switch (tag >>> 3) {
|
@@ -1823,26 +1603,13 @@ exports.ICEServer = {
|
|
1823
1603
|
return message;
|
1824
1604
|
},
|
1825
1605
|
fromJSON(object) {
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
}
|
1833
|
-
if (object.username !== undefined && object.username !== null) {
|
1834
|
-
message.username = String(object.username);
|
1835
|
-
}
|
1836
|
-
else {
|
1837
|
-
message.username = "";
|
1838
|
-
}
|
1839
|
-
if (object.credential !== undefined && object.credential !== null) {
|
1840
|
-
message.credential = String(object.credential);
|
1841
|
-
}
|
1842
|
-
else {
|
1843
|
-
message.credential = "";
|
1844
|
-
}
|
1845
|
-
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
|
+
};
|
1846
1613
|
},
|
1847
1614
|
toJSON(message) {
|
1848
1615
|
const obj = {};
|
@@ -1857,32 +1624,28 @@ exports.ICEServer = {
|
|
1857
1624
|
return obj;
|
1858
1625
|
},
|
1859
1626
|
fromPartial(object) {
|
1860
|
-
var _a, _b;
|
1861
|
-
const message =
|
1862
|
-
message.urls = [];
|
1863
|
-
|
1864
|
-
|
1865
|
-
message.urls.push(e);
|
1866
|
-
}
|
1867
|
-
}
|
1868
|
-
message.username = (_a = object.username) !== null && _a !== void 0 ? _a : "";
|
1869
|
-
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 : "";
|
1870
1632
|
return message;
|
1871
1633
|
},
|
1872
1634
|
};
|
1873
|
-
|
1635
|
+
function createBaseSpeakersChanged() {
|
1636
|
+
return { speakers: [] };
|
1637
|
+
}
|
1874
1638
|
exports.SpeakersChanged = {
|
1875
|
-
encode(message, writer =
|
1639
|
+
encode(message, writer = _m0.Writer.create()) {
|
1876
1640
|
for (const v of message.speakers) {
|
1877
1641
|
livekit_models_1.SpeakerInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
1878
1642
|
}
|
1879
1643
|
return writer;
|
1880
1644
|
},
|
1881
1645
|
decode(input, length) {
|
1882
|
-
const reader = input instanceof
|
1646
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1883
1647
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1884
|
-
const message =
|
1885
|
-
message.speakers = [];
|
1648
|
+
const message = createBaseSpeakersChanged();
|
1886
1649
|
while (reader.pos < end) {
|
1887
1650
|
const tag = reader.uint32();
|
1888
1651
|
switch (tag >>> 3) {
|
@@ -1897,14 +1660,11 @@ exports.SpeakersChanged = {
|
|
1897
1660
|
return message;
|
1898
1661
|
},
|
1899
1662
|
fromJSON(object) {
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
}
|
1906
|
-
}
|
1907
|
-
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
|
+
};
|
1908
1668
|
},
|
1909
1669
|
toJSON(message) {
|
1910
1670
|
const obj = {};
|
@@ -1917,28 +1677,27 @@ exports.SpeakersChanged = {
|
|
1917
1677
|
return obj;
|
1918
1678
|
},
|
1919
1679
|
fromPartial(object) {
|
1920
|
-
|
1921
|
-
message
|
1922
|
-
|
1923
|
-
|
1924
|
-
message.speakers.push(livekit_models_1.SpeakerInfo.fromPartial(e));
|
1925
|
-
}
|
1926
|
-
}
|
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))) || [];
|
1927
1684
|
return message;
|
1928
1685
|
},
|
1929
1686
|
};
|
1930
|
-
|
1687
|
+
function createBaseRoomUpdate() {
|
1688
|
+
return { room: undefined };
|
1689
|
+
}
|
1931
1690
|
exports.RoomUpdate = {
|
1932
|
-
encode(message, writer =
|
1691
|
+
encode(message, writer = _m0.Writer.create()) {
|
1933
1692
|
if (message.room !== undefined) {
|
1934
1693
|
livekit_models_1.Room.encode(message.room, writer.uint32(10).fork()).ldelim();
|
1935
1694
|
}
|
1936
1695
|
return writer;
|
1937
1696
|
},
|
1938
1697
|
decode(input, length) {
|
1939
|
-
const reader = input instanceof
|
1698
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1940
1699
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1941
|
-
const message =
|
1700
|
+
const message = createBaseRoomUpdate();
|
1942
1701
|
while (reader.pos < end) {
|
1943
1702
|
const tag = reader.uint32();
|
1944
1703
|
switch (tag >>> 3) {
|
@@ -1953,14 +1712,9 @@ exports.RoomUpdate = {
|
|
1953
1712
|
return message;
|
1954
1713
|
},
|
1955
1714
|
fromJSON(object) {
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
}
|
1960
|
-
else {
|
1961
|
-
message.room = undefined;
|
1962
|
-
}
|
1963
|
-
return message;
|
1715
|
+
return {
|
1716
|
+
room: isSet(object.room) ? livekit_models_1.Room.fromJSON(object.room) : undefined,
|
1717
|
+
};
|
1964
1718
|
},
|
1965
1719
|
toJSON(message) {
|
1966
1720
|
const obj = {};
|
@@ -1969,23 +1723,19 @@ exports.RoomUpdate = {
|
|
1969
1723
|
return obj;
|
1970
1724
|
},
|
1971
1725
|
fromPartial(object) {
|
1972
|
-
const message =
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
message.room = undefined;
|
1978
|
-
}
|
1726
|
+
const message = createBaseRoomUpdate();
|
1727
|
+
message.room =
|
1728
|
+
object.room !== undefined && object.room !== null
|
1729
|
+
? livekit_models_1.Room.fromPartial(object.room)
|
1730
|
+
: undefined;
|
1979
1731
|
return message;
|
1980
1732
|
},
|
1981
1733
|
};
|
1982
|
-
|
1983
|
-
participantSid: "",
|
1984
|
-
|
1985
|
-
score: 0,
|
1986
|
-
};
|
1734
|
+
function createBaseConnectionQualityInfo() {
|
1735
|
+
return { participantSid: "", quality: 0, score: 0 };
|
1736
|
+
}
|
1987
1737
|
exports.ConnectionQualityInfo = {
|
1988
|
-
encode(message, writer =
|
1738
|
+
encode(message, writer = _m0.Writer.create()) {
|
1989
1739
|
if (message.participantSid !== "") {
|
1990
1740
|
writer.uint32(10).string(message.participantSid);
|
1991
1741
|
}
|
@@ -1998,9 +1748,9 @@ exports.ConnectionQualityInfo = {
|
|
1998
1748
|
return writer;
|
1999
1749
|
},
|
2000
1750
|
decode(input, length) {
|
2001
|
-
const reader = input instanceof
|
1751
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2002
1752
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2003
|
-
const message =
|
1753
|
+
const message = createBaseConnectionQualityInfo();
|
2004
1754
|
while (reader.pos < end) {
|
2005
1755
|
const tag = reader.uint32();
|
2006
1756
|
switch (tag >>> 3) {
|
@@ -2021,26 +1771,15 @@ exports.ConnectionQualityInfo = {
|
|
2021
1771
|
return message;
|
2022
1772
|
},
|
2023
1773
|
fromJSON(object) {
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
}
|
2034
|
-
else {
|
2035
|
-
message.quality = 0;
|
2036
|
-
}
|
2037
|
-
if (object.score !== undefined && object.score !== null) {
|
2038
|
-
message.score = Number(object.score);
|
2039
|
-
}
|
2040
|
-
else {
|
2041
|
-
message.score = 0;
|
2042
|
-
}
|
2043
|
-
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
|
+
};
|
2044
1783
|
},
|
2045
1784
|
toJSON(message) {
|
2046
1785
|
const obj = {};
|
@@ -2053,26 +1792,27 @@ exports.ConnectionQualityInfo = {
|
|
2053
1792
|
},
|
2054
1793
|
fromPartial(object) {
|
2055
1794
|
var _a, _b, _c;
|
2056
|
-
const message =
|
1795
|
+
const message = createBaseConnectionQualityInfo();
|
2057
1796
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2058
1797
|
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
2059
1798
|
message.score = (_c = object.score) !== null && _c !== void 0 ? _c : 0;
|
2060
1799
|
return message;
|
2061
1800
|
},
|
2062
1801
|
};
|
2063
|
-
|
1802
|
+
function createBaseConnectionQualityUpdate() {
|
1803
|
+
return { updates: [] };
|
1804
|
+
}
|
2064
1805
|
exports.ConnectionQualityUpdate = {
|
2065
|
-
encode(message, writer =
|
1806
|
+
encode(message, writer = _m0.Writer.create()) {
|
2066
1807
|
for (const v of message.updates) {
|
2067
1808
|
exports.ConnectionQualityInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
2068
1809
|
}
|
2069
1810
|
return writer;
|
2070
1811
|
},
|
2071
1812
|
decode(input, length) {
|
2072
|
-
const reader = input instanceof
|
1813
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2073
1814
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2074
|
-
const message =
|
2075
|
-
message.updates = [];
|
1815
|
+
const message = createBaseConnectionQualityUpdate();
|
2076
1816
|
while (reader.pos < end) {
|
2077
1817
|
const tag = reader.uint32();
|
2078
1818
|
switch (tag >>> 3) {
|
@@ -2087,14 +1827,11 @@ exports.ConnectionQualityUpdate = {
|
|
2087
1827
|
return message;
|
2088
1828
|
},
|
2089
1829
|
fromJSON(object) {
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
}
|
2096
|
-
}
|
2097
|
-
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
|
+
};
|
2098
1835
|
},
|
2099
1836
|
toJSON(message) {
|
2100
1837
|
const obj = {};
|
@@ -2107,23 +1844,18 @@ exports.ConnectionQualityUpdate = {
|
|
2107
1844
|
return obj;
|
2108
1845
|
},
|
2109
1846
|
fromPartial(object) {
|
2110
|
-
|
2111
|
-
message
|
2112
|
-
|
2113
|
-
|
2114
|
-
message.updates.push(exports.ConnectionQualityInfo.fromPartial(e));
|
2115
|
-
}
|
2116
|
-
}
|
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))) || [];
|
2117
1851
|
return message;
|
2118
1852
|
},
|
2119
1853
|
};
|
2120
|
-
|
2121
|
-
participantSid: "",
|
2122
|
-
|
2123
|
-
state: 0,
|
2124
|
-
};
|
1854
|
+
function createBaseStreamStateInfo() {
|
1855
|
+
return { participantSid: "", trackSid: "", state: 0 };
|
1856
|
+
}
|
2125
1857
|
exports.StreamStateInfo = {
|
2126
|
-
encode(message, writer =
|
1858
|
+
encode(message, writer = _m0.Writer.create()) {
|
2127
1859
|
if (message.participantSid !== "") {
|
2128
1860
|
writer.uint32(10).string(message.participantSid);
|
2129
1861
|
}
|
@@ -2136,9 +1868,9 @@ exports.StreamStateInfo = {
|
|
2136
1868
|
return writer;
|
2137
1869
|
},
|
2138
1870
|
decode(input, length) {
|
2139
|
-
const reader = input instanceof
|
1871
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2140
1872
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2141
|
-
const message =
|
1873
|
+
const message = createBaseStreamStateInfo();
|
2142
1874
|
while (reader.pos < end) {
|
2143
1875
|
const tag = reader.uint32();
|
2144
1876
|
switch (tag >>> 3) {
|
@@ -2159,26 +1891,13 @@ exports.StreamStateInfo = {
|
|
2159
1891
|
return message;
|
2160
1892
|
},
|
2161
1893
|
fromJSON(object) {
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
}
|
2169
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2170
|
-
message.trackSid = String(object.trackSid);
|
2171
|
-
}
|
2172
|
-
else {
|
2173
|
-
message.trackSid = "";
|
2174
|
-
}
|
2175
|
-
if (object.state !== undefined && object.state !== null) {
|
2176
|
-
message.state = streamStateFromJSON(object.state);
|
2177
|
-
}
|
2178
|
-
else {
|
2179
|
-
message.state = 0;
|
2180
|
-
}
|
2181
|
-
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
|
+
};
|
2182
1901
|
},
|
2183
1902
|
toJSON(message) {
|
2184
1903
|
const obj = {};
|
@@ -2191,26 +1910,27 @@ exports.StreamStateInfo = {
|
|
2191
1910
|
},
|
2192
1911
|
fromPartial(object) {
|
2193
1912
|
var _a, _b, _c;
|
2194
|
-
const message =
|
1913
|
+
const message = createBaseStreamStateInfo();
|
2195
1914
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2196
1915
|
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2197
1916
|
message.state = (_c = object.state) !== null && _c !== void 0 ? _c : 0;
|
2198
1917
|
return message;
|
2199
1918
|
},
|
2200
1919
|
};
|
2201
|
-
|
1920
|
+
function createBaseStreamStateUpdate() {
|
1921
|
+
return { streamStates: [] };
|
1922
|
+
}
|
2202
1923
|
exports.StreamStateUpdate = {
|
2203
|
-
encode(message, writer =
|
1924
|
+
encode(message, writer = _m0.Writer.create()) {
|
2204
1925
|
for (const v of message.streamStates) {
|
2205
1926
|
exports.StreamStateInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
2206
1927
|
}
|
2207
1928
|
return writer;
|
2208
1929
|
},
|
2209
1930
|
decode(input, length) {
|
2210
|
-
const reader = input instanceof
|
1931
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2211
1932
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2212
|
-
const message =
|
2213
|
-
message.streamStates = [];
|
1933
|
+
const message = createBaseStreamStateUpdate();
|
2214
1934
|
while (reader.pos < end) {
|
2215
1935
|
const tag = reader.uint32();
|
2216
1936
|
switch (tag >>> 3) {
|
@@ -2225,14 +1945,11 @@ exports.StreamStateUpdate = {
|
|
2225
1945
|
return message;
|
2226
1946
|
},
|
2227
1947
|
fromJSON(object) {
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2231
|
-
|
2232
|
-
|
2233
|
-
}
|
2234
|
-
}
|
2235
|
-
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
|
+
};
|
2236
1953
|
},
|
2237
1954
|
toJSON(message) {
|
2238
1955
|
const obj = {};
|
@@ -2245,19 +1962,18 @@ exports.StreamStateUpdate = {
|
|
2245
1962
|
return obj;
|
2246
1963
|
},
|
2247
1964
|
fromPartial(object) {
|
2248
|
-
|
2249
|
-
message
|
2250
|
-
|
2251
|
-
|
2252
|
-
message.streamStates.push(exports.StreamStateInfo.fromPartial(e));
|
2253
|
-
}
|
2254
|
-
}
|
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))) || [];
|
2255
1969
|
return message;
|
2256
1970
|
},
|
2257
1971
|
};
|
2258
|
-
|
1972
|
+
function createBaseSubscribedQuality() {
|
1973
|
+
return { quality: 0, enabled: false };
|
1974
|
+
}
|
2259
1975
|
exports.SubscribedQuality = {
|
2260
|
-
encode(message, writer =
|
1976
|
+
encode(message, writer = _m0.Writer.create()) {
|
2261
1977
|
if (message.quality !== 0) {
|
2262
1978
|
writer.uint32(8).int32(message.quality);
|
2263
1979
|
}
|
@@ -2267,9 +1983,9 @@ exports.SubscribedQuality = {
|
|
2267
1983
|
return writer;
|
2268
1984
|
},
|
2269
1985
|
decode(input, length) {
|
2270
|
-
const reader = input instanceof
|
1986
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2271
1987
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2272
|
-
const message =
|
1988
|
+
const message = createBaseSubscribedQuality();
|
2273
1989
|
while (reader.pos < end) {
|
2274
1990
|
const tag = reader.uint32();
|
2275
1991
|
switch (tag >>> 3) {
|
@@ -2287,20 +2003,10 @@ exports.SubscribedQuality = {
|
|
2287
2003
|
return message;
|
2288
2004
|
},
|
2289
2005
|
fromJSON(object) {
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
}
|
2294
|
-
else {
|
2295
|
-
message.quality = 0;
|
2296
|
-
}
|
2297
|
-
if (object.enabled !== undefined && object.enabled !== null) {
|
2298
|
-
message.enabled = Boolean(object.enabled);
|
2299
|
-
}
|
2300
|
-
else {
|
2301
|
-
message.enabled = false;
|
2302
|
-
}
|
2303
|
-
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
|
+
};
|
2304
2010
|
},
|
2305
2011
|
toJSON(message) {
|
2306
2012
|
const obj = {};
|
@@ -2311,15 +2017,17 @@ exports.SubscribedQuality = {
|
|
2311
2017
|
},
|
2312
2018
|
fromPartial(object) {
|
2313
2019
|
var _a, _b;
|
2314
|
-
const message =
|
2020
|
+
const message = createBaseSubscribedQuality();
|
2315
2021
|
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
2316
2022
|
message.enabled = (_b = object.enabled) !== null && _b !== void 0 ? _b : false;
|
2317
2023
|
return message;
|
2318
2024
|
},
|
2319
2025
|
};
|
2320
|
-
|
2026
|
+
function createBaseSubscribedQualityUpdate() {
|
2027
|
+
return { trackSid: "", subscribedQualities: [] };
|
2028
|
+
}
|
2321
2029
|
exports.SubscribedQualityUpdate = {
|
2322
|
-
encode(message, writer =
|
2030
|
+
encode(message, writer = _m0.Writer.create()) {
|
2323
2031
|
if (message.trackSid !== "") {
|
2324
2032
|
writer.uint32(10).string(message.trackSid);
|
2325
2033
|
}
|
@@ -2329,10 +2037,9 @@ exports.SubscribedQualityUpdate = {
|
|
2329
2037
|
return writer;
|
2330
2038
|
},
|
2331
2039
|
decode(input, length) {
|
2332
|
-
const reader = input instanceof
|
2040
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2333
2041
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2334
|
-
const message =
|
2335
|
-
message.subscribedQualities = [];
|
2042
|
+
const message = createBaseSubscribedQualityUpdate();
|
2336
2043
|
while (reader.pos < end) {
|
2337
2044
|
const tag = reader.uint32();
|
2338
2045
|
switch (tag >>> 3) {
|
@@ -2350,21 +2057,12 @@ exports.SubscribedQualityUpdate = {
|
|
2350
2057
|
return message;
|
2351
2058
|
},
|
2352
2059
|
fromJSON(object) {
|
2353
|
-
|
2354
|
-
|
2355
|
-
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2359
|
-
message.trackSid = "";
|
2360
|
-
}
|
2361
|
-
if (object.subscribedQualities !== undefined &&
|
2362
|
-
object.subscribedQualities !== null) {
|
2363
|
-
for (const e of object.subscribedQualities) {
|
2364
|
-
message.subscribedQualities.push(exports.SubscribedQuality.fromJSON(e));
|
2365
|
-
}
|
2366
|
-
}
|
2367
|
-
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
|
+
};
|
2368
2066
|
},
|
2369
2067
|
toJSON(message) {
|
2370
2068
|
const obj = {};
|
@@ -2378,26 +2076,19 @@ exports.SubscribedQualityUpdate = {
|
|
2378
2076
|
return obj;
|
2379
2077
|
},
|
2380
2078
|
fromPartial(object) {
|
2381
|
-
var _a;
|
2382
|
-
const message =
|
2079
|
+
var _a, _b;
|
2080
|
+
const message = createBaseSubscribedQualityUpdate();
|
2383
2081
|
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
2384
|
-
message.subscribedQualities =
|
2385
|
-
|
2386
|
-
object.subscribedQualities !== null) {
|
2387
|
-
for (const e of object.subscribedQualities) {
|
2388
|
-
message.subscribedQualities.push(exports.SubscribedQuality.fromPartial(e));
|
2389
|
-
}
|
2390
|
-
}
|
2082
|
+
message.subscribedQualities =
|
2083
|
+
((_b = object.subscribedQualities) === null || _b === void 0 ? void 0 : _b.map((e) => exports.SubscribedQuality.fromPartial(e))) || [];
|
2391
2084
|
return message;
|
2392
2085
|
},
|
2393
2086
|
};
|
2394
|
-
|
2395
|
-
participantSid: "",
|
2396
|
-
|
2397
|
-
trackSids: "",
|
2398
|
-
};
|
2087
|
+
function createBaseTrackPermission() {
|
2088
|
+
return { participantSid: "", allTracks: false, trackSids: [] };
|
2089
|
+
}
|
2399
2090
|
exports.TrackPermission = {
|
2400
|
-
encode(message, writer =
|
2091
|
+
encode(message, writer = _m0.Writer.create()) {
|
2401
2092
|
if (message.participantSid !== "") {
|
2402
2093
|
writer.uint32(10).string(message.participantSid);
|
2403
2094
|
}
|
@@ -2410,10 +2101,9 @@ exports.TrackPermission = {
|
|
2410
2101
|
return writer;
|
2411
2102
|
},
|
2412
2103
|
decode(input, length) {
|
2413
|
-
const reader = input instanceof
|
2104
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2414
2105
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2415
|
-
const message =
|
2416
|
-
message.trackSids = [];
|
2106
|
+
const message = createBaseTrackPermission();
|
2417
2107
|
while (reader.pos < end) {
|
2418
2108
|
const tag = reader.uint32();
|
2419
2109
|
switch (tag >>> 3) {
|
@@ -2434,26 +2124,15 @@ exports.TrackPermission = {
|
|
2434
2124
|
return message;
|
2435
2125
|
},
|
2436
2126
|
fromJSON(object) {
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
message.allTracks = Boolean(object.allTracks);
|
2447
|
-
}
|
2448
|
-
else {
|
2449
|
-
message.allTracks = false;
|
2450
|
-
}
|
2451
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2452
|
-
for (const e of object.trackSids) {
|
2453
|
-
message.trackSids.push(String(e));
|
2454
|
-
}
|
2455
|
-
}
|
2456
|
-
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
|
+
};
|
2457
2136
|
},
|
2458
2137
|
toJSON(message) {
|
2459
2138
|
const obj = {};
|
@@ -2469,22 +2148,19 @@ exports.TrackPermission = {
|
|
2469
2148
|
return obj;
|
2470
2149
|
},
|
2471
2150
|
fromPartial(object) {
|
2472
|
-
var _a, _b;
|
2473
|
-
const message =
|
2151
|
+
var _a, _b, _c;
|
2152
|
+
const message = createBaseTrackPermission();
|
2474
2153
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2475
2154
|
message.allTracks = (_b = object.allTracks) !== null && _b !== void 0 ? _b : false;
|
2476
|
-
message.trackSids = [];
|
2477
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2478
|
-
for (const e of object.trackSids) {
|
2479
|
-
message.trackSids.push(e);
|
2480
|
-
}
|
2481
|
-
}
|
2155
|
+
message.trackSids = ((_c = object.trackSids) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
2482
2156
|
return message;
|
2483
2157
|
},
|
2484
2158
|
};
|
2485
|
-
|
2159
|
+
function createBaseSubscriptionPermission() {
|
2160
|
+
return { allParticipants: false, trackPermissions: [] };
|
2161
|
+
}
|
2486
2162
|
exports.SubscriptionPermission = {
|
2487
|
-
encode(message, writer =
|
2163
|
+
encode(message, writer = _m0.Writer.create()) {
|
2488
2164
|
if (message.allParticipants === true) {
|
2489
2165
|
writer.uint32(8).bool(message.allParticipants);
|
2490
2166
|
}
|
@@ -2494,10 +2170,9 @@ exports.SubscriptionPermission = {
|
|
2494
2170
|
return writer;
|
2495
2171
|
},
|
2496
2172
|
decode(input, length) {
|
2497
|
-
const reader = input instanceof
|
2173
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2498
2174
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2499
|
-
const message =
|
2500
|
-
message.trackPermissions = [];
|
2175
|
+
const message = createBaseSubscriptionPermission();
|
2501
2176
|
while (reader.pos < end) {
|
2502
2177
|
const tag = reader.uint32();
|
2503
2178
|
switch (tag >>> 3) {
|
@@ -2515,22 +2190,14 @@ exports.SubscriptionPermission = {
|
|
2515
2190
|
return message;
|
2516
2191
|
},
|
2517
2192
|
fromJSON(object) {
|
2518
|
-
|
2519
|
-
|
2520
|
-
|
2521
|
-
|
2522
|
-
|
2523
|
-
|
2524
|
-
|
2525
|
-
|
2526
|
-
}
|
2527
|
-
if (object.trackPermissions !== undefined &&
|
2528
|
-
object.trackPermissions !== null) {
|
2529
|
-
for (const e of object.trackPermissions) {
|
2530
|
-
message.trackPermissions.push(exports.TrackPermission.fromJSON(e));
|
2531
|
-
}
|
2532
|
-
}
|
2533
|
-
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
|
+
};
|
2534
2201
|
},
|
2535
2202
|
toJSON(message) {
|
2536
2203
|
const obj = {};
|
@@ -2545,26 +2212,19 @@ exports.SubscriptionPermission = {
|
|
2545
2212
|
return obj;
|
2546
2213
|
},
|
2547
2214
|
fromPartial(object) {
|
2548
|
-
var _a;
|
2549
|
-
const message =
|
2215
|
+
var _a, _b;
|
2216
|
+
const message = createBaseSubscriptionPermission();
|
2550
2217
|
message.allParticipants = (_a = object.allParticipants) !== null && _a !== void 0 ? _a : false;
|
2551
|
-
message.trackPermissions =
|
2552
|
-
|
2553
|
-
object.trackPermissions !== null) {
|
2554
|
-
for (const e of object.trackPermissions) {
|
2555
|
-
message.trackPermissions.push(exports.TrackPermission.fromPartial(e));
|
2556
|
-
}
|
2557
|
-
}
|
2218
|
+
message.trackPermissions =
|
2219
|
+
((_b = object.trackPermissions) === null || _b === void 0 ? void 0 : _b.map((e) => exports.TrackPermission.fromPartial(e))) || [];
|
2558
2220
|
return message;
|
2559
2221
|
},
|
2560
2222
|
};
|
2561
|
-
|
2562
|
-
participantSid: "",
|
2563
|
-
|
2564
|
-
allowed: false,
|
2565
|
-
};
|
2223
|
+
function createBaseSubscriptionPermissionUpdate() {
|
2224
|
+
return { participantSid: "", trackSid: "", allowed: false };
|
2225
|
+
}
|
2566
2226
|
exports.SubscriptionPermissionUpdate = {
|
2567
|
-
encode(message, writer =
|
2227
|
+
encode(message, writer = _m0.Writer.create()) {
|
2568
2228
|
if (message.participantSid !== "") {
|
2569
2229
|
writer.uint32(10).string(message.participantSid);
|
2570
2230
|
}
|
@@ -2577,9 +2237,9 @@ exports.SubscriptionPermissionUpdate = {
|
|
2577
2237
|
return writer;
|
2578
2238
|
},
|
2579
2239
|
decode(input, length) {
|
2580
|
-
const reader = input instanceof
|
2240
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2581
2241
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2582
|
-
const message =
|
2242
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
2583
2243
|
while (reader.pos < end) {
|
2584
2244
|
const tag = reader.uint32();
|
2585
2245
|
switch (tag >>> 3) {
|
@@ -2600,26 +2260,13 @@ exports.SubscriptionPermissionUpdate = {
|
|
2600
2260
|
return message;
|
2601
2261
|
},
|
2602
2262
|
fromJSON(object) {
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
}
|
2610
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2611
|
-
message.trackSid = String(object.trackSid);
|
2612
|
-
}
|
2613
|
-
else {
|
2614
|
-
message.trackSid = "";
|
2615
|
-
}
|
2616
|
-
if (object.allowed !== undefined && object.allowed !== null) {
|
2617
|
-
message.allowed = Boolean(object.allowed);
|
2618
|
-
}
|
2619
|
-
else {
|
2620
|
-
message.allowed = false;
|
2621
|
-
}
|
2622
|
-
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
|
+
};
|
2623
2270
|
},
|
2624
2271
|
toJSON(message) {
|
2625
2272
|
const obj = {};
|
@@ -2631,16 +2278,23 @@ exports.SubscriptionPermissionUpdate = {
|
|
2631
2278
|
},
|
2632
2279
|
fromPartial(object) {
|
2633
2280
|
var _a, _b, _c;
|
2634
|
-
const message =
|
2281
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
2635
2282
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2636
2283
|
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2637
2284
|
message.allowed = (_c = object.allowed) !== null && _c !== void 0 ? _c : false;
|
2638
2285
|
return message;
|
2639
2286
|
},
|
2640
2287
|
};
|
2641
|
-
|
2288
|
+
function createBaseSyncState() {
|
2289
|
+
return {
|
2290
|
+
answer: undefined,
|
2291
|
+
subscription: undefined,
|
2292
|
+
publishTracks: [],
|
2293
|
+
dataChannels: [],
|
2294
|
+
};
|
2295
|
+
}
|
2642
2296
|
exports.SyncState = {
|
2643
|
-
encode(message, writer =
|
2297
|
+
encode(message, writer = _m0.Writer.create()) {
|
2644
2298
|
if (message.answer !== undefined) {
|
2645
2299
|
exports.SessionDescription.encode(message.answer, writer.uint32(10).fork()).ldelim();
|
2646
2300
|
}
|
@@ -2656,11 +2310,9 @@ exports.SyncState = {
|
|
2656
2310
|
return writer;
|
2657
2311
|
},
|
2658
2312
|
decode(input, length) {
|
2659
|
-
const reader = input instanceof
|
2313
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2660
2314
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2661
|
-
const message =
|
2662
|
-
message.publishTracks = [];
|
2663
|
-
message.dataChannels = [];
|
2315
|
+
const message = createBaseSyncState();
|
2664
2316
|
while (reader.pos < end) {
|
2665
2317
|
const tag = reader.uint32();
|
2666
2318
|
switch (tag >>> 3) {
|
@@ -2684,32 +2336,20 @@ exports.SyncState = {
|
|
2684
2336
|
return message;
|
2685
2337
|
},
|
2686
2338
|
fromJSON(object) {
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2700
|
-
|
2701
|
-
}
|
2702
|
-
if (object.publishTracks !== undefined && object.publishTracks !== null) {
|
2703
|
-
for (const e of object.publishTracks) {
|
2704
|
-
message.publishTracks.push(exports.TrackPublishedResponse.fromJSON(e));
|
2705
|
-
}
|
2706
|
-
}
|
2707
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
2708
|
-
for (const e of object.dataChannels) {
|
2709
|
-
message.dataChannels.push(exports.DataChannelInfo.fromJSON(e));
|
2710
|
-
}
|
2711
|
-
}
|
2712
|
-
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
|
+
};
|
2713
2353
|
},
|
2714
2354
|
toJSON(message) {
|
2715
2355
|
const obj = {};
|
@@ -2736,37 +2376,29 @@ exports.SyncState = {
|
|
2736
2376
|
return obj;
|
2737
2377
|
},
|
2738
2378
|
fromPartial(object) {
|
2739
|
-
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
|
2744
|
-
|
2745
|
-
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
2752
|
-
message.
|
2753
|
-
|
2754
|
-
for (const e of object.publishTracks) {
|
2755
|
-
message.publishTracks.push(exports.TrackPublishedResponse.fromPartial(e));
|
2756
|
-
}
|
2757
|
-
}
|
2758
|
-
message.dataChannels = [];
|
2759
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
2760
|
-
for (const e of object.dataChannels) {
|
2761
|
-
message.dataChannels.push(exports.DataChannelInfo.fromPartial(e));
|
2762
|
-
}
|
2763
|
-
}
|
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))) || [];
|
2764
2394
|
return message;
|
2765
2395
|
},
|
2766
2396
|
};
|
2767
|
-
|
2397
|
+
function createBaseDataChannelInfo() {
|
2398
|
+
return { label: "", id: 0 };
|
2399
|
+
}
|
2768
2400
|
exports.DataChannelInfo = {
|
2769
|
-
encode(message, writer =
|
2401
|
+
encode(message, writer = _m0.Writer.create()) {
|
2770
2402
|
if (message.label !== "") {
|
2771
2403
|
writer.uint32(10).string(message.label);
|
2772
2404
|
}
|
@@ -2776,9 +2408,9 @@ exports.DataChannelInfo = {
|
|
2776
2408
|
return writer;
|
2777
2409
|
},
|
2778
2410
|
decode(input, length) {
|
2779
|
-
const reader = input instanceof
|
2411
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2780
2412
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2781
|
-
const message =
|
2413
|
+
const message = createBaseDataChannelInfo();
|
2782
2414
|
while (reader.pos < end) {
|
2783
2415
|
const tag = reader.uint32();
|
2784
2416
|
switch (tag >>> 3) {
|
@@ -2796,38 +2428,35 @@ exports.DataChannelInfo = {
|
|
2796
2428
|
return message;
|
2797
2429
|
},
|
2798
2430
|
fromJSON(object) {
|
2799
|
-
|
2800
|
-
|
2801
|
-
|
2802
|
-
}
|
2803
|
-
else {
|
2804
|
-
message.label = "";
|
2805
|
-
}
|
2806
|
-
if (object.id !== undefined && object.id !== null) {
|
2807
|
-
message.id = Number(object.id);
|
2808
|
-
}
|
2809
|
-
else {
|
2810
|
-
message.id = 0;
|
2811
|
-
}
|
2812
|
-
return message;
|
2431
|
+
return {
|
2432
|
+
label: isSet(object.label) ? String(object.label) : "",
|
2433
|
+
id: isSet(object.id) ? Number(object.id) : 0,
|
2434
|
+
};
|
2813
2435
|
},
|
2814
2436
|
toJSON(message) {
|
2815
2437
|
const obj = {};
|
2816
2438
|
message.label !== undefined && (obj.label = message.label);
|
2817
|
-
message.id !== undefined && (obj.id = message.id);
|
2439
|
+
message.id !== undefined && (obj.id = Math.round(message.id));
|
2818
2440
|
return obj;
|
2819
2441
|
},
|
2820
2442
|
fromPartial(object) {
|
2821
2443
|
var _a, _b;
|
2822
|
-
const message =
|
2444
|
+
const message = createBaseDataChannelInfo();
|
2823
2445
|
message.label = (_a = object.label) !== null && _a !== void 0 ? _a : "";
|
2824
2446
|
message.id = (_b = object.id) !== null && _b !== void 0 ? _b : 0;
|
2825
2447
|
return message;
|
2826
2448
|
},
|
2827
2449
|
};
|
2828
|
-
|
2450
|
+
function createBaseSimulateScenario() {
|
2451
|
+
return {
|
2452
|
+
speakerUpdate: undefined,
|
2453
|
+
nodeFailure: undefined,
|
2454
|
+
migration: undefined,
|
2455
|
+
serverLeave: undefined,
|
2456
|
+
};
|
2457
|
+
}
|
2829
2458
|
exports.SimulateScenario = {
|
2830
|
-
encode(message, writer =
|
2459
|
+
encode(message, writer = _m0.Writer.create()) {
|
2831
2460
|
if (message.speakerUpdate !== undefined) {
|
2832
2461
|
writer.uint32(8).int32(message.speakerUpdate);
|
2833
2462
|
}
|
@@ -2843,9 +2472,9 @@ exports.SimulateScenario = {
|
|
2843
2472
|
return writer;
|
2844
2473
|
},
|
2845
2474
|
decode(input, length) {
|
2846
|
-
const reader = input instanceof
|
2475
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2847
2476
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2848
|
-
const message =
|
2477
|
+
const message = createBaseSimulateScenario();
|
2849
2478
|
while (reader.pos < end) {
|
2850
2479
|
const tag = reader.uint32();
|
2851
2480
|
switch (tag >>> 3) {
|
@@ -2869,37 +2498,25 @@ exports.SimulateScenario = {
|
|
2869
2498
|
return message;
|
2870
2499
|
},
|
2871
2500
|
fromJSON(object) {
|
2872
|
-
|
2873
|
-
|
2874
|
-
|
2875
|
-
|
2876
|
-
|
2877
|
-
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2886
|
-
message.migration = Boolean(object.migration);
|
2887
|
-
}
|
2888
|
-
else {
|
2889
|
-
message.migration = undefined;
|
2890
|
-
}
|
2891
|
-
if (object.serverLeave !== undefined && object.serverLeave !== null) {
|
2892
|
-
message.serverLeave = Boolean(object.serverLeave);
|
2893
|
-
}
|
2894
|
-
else {
|
2895
|
-
message.serverLeave = undefined;
|
2896
|
-
}
|
2897
|
-
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
|
+
};
|
2898
2515
|
},
|
2899
2516
|
toJSON(message) {
|
2900
2517
|
const obj = {};
|
2901
2518
|
message.speakerUpdate !== undefined &&
|
2902
|
-
(obj.speakerUpdate = message.speakerUpdate);
|
2519
|
+
(obj.speakerUpdate = Math.round(message.speakerUpdate));
|
2903
2520
|
message.nodeFailure !== undefined &&
|
2904
2521
|
(obj.nodeFailure = message.nodeFailure);
|
2905
2522
|
message.migration !== undefined && (obj.migration = message.migration);
|
@@ -2909,7 +2526,7 @@ exports.SimulateScenario = {
|
|
2909
2526
|
},
|
2910
2527
|
fromPartial(object) {
|
2911
2528
|
var _a, _b, _c, _d;
|
2912
|
-
const message =
|
2529
|
+
const message = createBaseSimulateScenario();
|
2913
2530
|
message.speakerUpdate = (_a = object.speakerUpdate) !== null && _a !== void 0 ? _a : undefined;
|
2914
2531
|
message.nodeFailure = (_b = object.nodeFailure) !== null && _b !== void 0 ? _b : undefined;
|
2915
2532
|
message.migration = (_c = object.migration) !== null && _c !== void 0 ? _c : undefined;
|
@@ -2917,8 +2534,11 @@ exports.SimulateScenario = {
|
|
2917
2534
|
return message;
|
2918
2535
|
},
|
2919
2536
|
};
|
2920
|
-
if (
|
2921
|
-
|
2922
|
-
|
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;
|
2923
2543
|
}
|
2924
2544
|
//# sourceMappingURL=livekit_rtc.js.map
|