livekit-client 0.14.3 → 0.15.3
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/.github/workflows/{lint.yaml → test.yaml} +7 -4
- package/.gitmodules +3 -0
- package/README.md +46 -14
- package/dist/api/SignalClient.d.ts +12 -32
- package/dist/api/SignalClient.js +59 -8
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/connect.d.ts +1 -1
- package/dist/connect.js +71 -73
- package/dist/connect.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +10 -0
- package/dist/logger.js +15 -0
- package/dist/logger.js.map +1 -1
- package/dist/options.d.ts +83 -19
- package/dist/options.js +0 -10
- package/dist/options.js.map +1 -1
- package/dist/proto/livekit_models.d.ts +45 -1
- package/dist/proto/livekit_models.js +333 -4
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +148 -7
- package/dist/proto/livekit_rtc.js +1047 -30
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/PCTransport.js +4 -0
- package/dist/room/PCTransport.js.map +1 -1
- package/dist/room/RTCEngine.d.ts +4 -2
- package/dist/room/RTCEngine.js +36 -38
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +23 -17
- package/dist/room/Room.js +205 -71
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +143 -14
- package/dist/room/events.js +142 -13
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +53 -13
- package/dist/room/participant/LocalParticipant.js +244 -169
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +3 -1
- package/dist/room/participant/Participant.js +3 -1
- package/dist/room/participant/Participant.js.map +1 -1
- package/dist/room/participant/ParticipantTrackPermission.d.ts +19 -0
- package/dist/room/participant/ParticipantTrackPermission.js +16 -0
- package/dist/room/participant/ParticipantTrackPermission.js.map +1 -0
- package/dist/room/participant/RemoteParticipant.d.ts +2 -2
- package/dist/room/participant/RemoteParticipant.js +10 -15
- package/dist/room/participant/RemoteParticipant.js.map +1 -1
- package/dist/room/participant/publishUtils.d.ts +11 -0
- package/dist/room/participant/publishUtils.js +148 -0
- package/dist/room/participant/publishUtils.js.map +1 -0
- package/dist/room/participant/publishUtils.test.d.ts +1 -0
- package/dist/room/participant/publishUtils.test.js +79 -0
- package/dist/room/participant/publishUtils.test.js.map +1 -0
- package/dist/room/stats.d.ts +21 -6
- package/dist/room/stats.js +22 -1
- package/dist/room/stats.js.map +1 -1
- package/dist/room/track/LocalAudioTrack.d.ts +8 -3
- package/dist/room/track/LocalAudioTrack.js +49 -3
- package/dist/room/track/LocalAudioTrack.js.map +1 -1
- package/dist/room/track/LocalTrack.d.ts +1 -3
- package/dist/room/track/LocalTrack.js +3 -50
- package/dist/room/track/LocalTrack.js.map +1 -1
- package/dist/room/track/LocalTrackPublication.d.ts +3 -1
- package/dist/room/track/LocalTrackPublication.js +15 -5
- package/dist/room/track/LocalTrackPublication.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.d.ts +14 -5
- package/dist/room/track/LocalVideoTrack.js +156 -62
- package/dist/room/track/LocalVideoTrack.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.test.d.ts +1 -0
- package/dist/room/track/LocalVideoTrack.test.js +68 -0
- package/dist/room/track/LocalVideoTrack.test.js.map +1 -0
- package/dist/room/track/RemoteAudioTrack.d.ts +6 -8
- package/dist/room/track/RemoteAudioTrack.js +55 -19
- package/dist/room/track/RemoteAudioTrack.js.map +1 -1
- package/dist/room/track/RemoteTrack.d.ts +14 -0
- package/dist/room/track/RemoteTrack.js +47 -0
- package/dist/room/track/RemoteTrack.js.map +1 -0
- package/dist/room/track/RemoteTrackPublication.d.ts +10 -4
- package/dist/room/track/RemoteTrackPublication.js +41 -15
- package/dist/room/track/RemoteTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.d.ts +7 -9
- package/dist/room/track/RemoteVideoTrack.js +77 -41
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.d.ts +13 -2
- package/dist/room/track/Track.js +34 -2
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/TrackPublication.d.ts +14 -1
- package/dist/room/track/TrackPublication.js +24 -7
- package/dist/room/track/TrackPublication.js.map +1 -1
- package/dist/room/track/create.d.ts +4 -6
- package/dist/room/track/create.js +10 -57
- package/dist/room/track/create.js.map +1 -1
- package/dist/room/track/defaults.d.ts +4 -0
- package/dist/room/track/defaults.js +21 -0
- package/dist/room/track/defaults.js.map +1 -0
- package/dist/room/track/options.d.ts +15 -65
- package/dist/room/track/options.js +14 -13
- package/dist/room/track/options.js.map +1 -1
- package/dist/room/track/utils.d.ts +3 -0
- package/dist/room/track/utils.js +68 -0
- package/dist/room/track/utils.js.map +1 -0
- package/dist/room/track/utils.test.d.ts +1 -0
- package/dist/room/track/utils.test.js +85 -0
- package/dist/room/track/utils.test.js.map +1 -0
- package/dist/room/utils.d.ts +1 -1
- package/dist/room/utils.js +5 -6
- package/dist/room/utils.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/example/index.html +193 -178
- package/example/sample.ts +467 -327
- package/example/styles.css +144 -0
- package/example/webpack.config.js +1 -1
- package/jest.config.js +6 -0
- package/package.json +9 -6
- package/tsconfig.eslint.json +8 -1
- package/dist/room/defaults.d.ts +0 -5
- package/dist/room/defaults.js +0 -32
- package/dist/room/defaults.js.map +0 -1
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.ConnectionQualityUpdate = exports.ConnectionQualityInfo = exports.RoomUpdate = exports.SpeakersChanged = exports.ICEServer = 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.
|
6
|
+
exports.SimulateScenario = exports.SyncState = exports.SubscriptionPermissionUpdate = exports.UpdateSubscriptionPermissions = 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;
|
7
7
|
/* eslint-disable */
|
8
8
|
const long_1 = __importDefault(require("long"));
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
@@ -41,44 +41,38 @@ function signalTargetToJSON(object) {
|
|
41
41
|
}
|
42
42
|
}
|
43
43
|
exports.signalTargetToJSON = signalTargetToJSON;
|
44
|
-
var
|
45
|
-
(function (
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
function videoQualityFromJSON(object) {
|
44
|
+
var StreamState;
|
45
|
+
(function (StreamState) {
|
46
|
+
StreamState[StreamState["ACTIVE"] = 0] = "ACTIVE";
|
47
|
+
StreamState[StreamState["PAUSED"] = 1] = "PAUSED";
|
48
|
+
StreamState[StreamState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
49
|
+
})(StreamState = exports.StreamState || (exports.StreamState = {}));
|
50
|
+
function streamStateFromJSON(object) {
|
52
51
|
switch (object) {
|
53
52
|
case 0:
|
54
|
-
case "
|
55
|
-
return
|
53
|
+
case "ACTIVE":
|
54
|
+
return StreamState.ACTIVE;
|
56
55
|
case 1:
|
57
|
-
case "
|
58
|
-
return
|
59
|
-
case 2:
|
60
|
-
case "HIGH":
|
61
|
-
return VideoQuality.HIGH;
|
56
|
+
case "PAUSED":
|
57
|
+
return StreamState.PAUSED;
|
62
58
|
case -1:
|
63
59
|
case "UNRECOGNIZED":
|
64
60
|
default:
|
65
|
-
return
|
61
|
+
return StreamState.UNRECOGNIZED;
|
66
62
|
}
|
67
63
|
}
|
68
|
-
exports.
|
69
|
-
function
|
64
|
+
exports.streamStateFromJSON = streamStateFromJSON;
|
65
|
+
function streamStateToJSON(object) {
|
70
66
|
switch (object) {
|
71
|
-
case
|
72
|
-
return "
|
73
|
-
case
|
74
|
-
return "
|
75
|
-
case VideoQuality.HIGH:
|
76
|
-
return "HIGH";
|
67
|
+
case StreamState.ACTIVE:
|
68
|
+
return "ACTIVE";
|
69
|
+
case StreamState.PAUSED:
|
70
|
+
return "PAUSED";
|
77
71
|
default:
|
78
72
|
return "UNKNOWN";
|
79
73
|
}
|
80
74
|
}
|
81
|
-
exports.
|
75
|
+
exports.streamStateToJSON = streamStateToJSON;
|
82
76
|
const baseSignalRequest = {};
|
83
77
|
exports.SignalRequest = {
|
84
78
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -106,6 +100,18 @@ exports.SignalRequest = {
|
|
106
100
|
if (message.leave !== undefined) {
|
107
101
|
exports.LeaveRequest.encode(message.leave, writer.uint32(66).fork()).ldelim();
|
108
102
|
}
|
103
|
+
if (message.updateLayers !== undefined) {
|
104
|
+
exports.UpdateVideoLayers.encode(message.updateLayers, writer.uint32(82).fork()).ldelim();
|
105
|
+
}
|
106
|
+
if (message.subscriptionPermissions !== undefined) {
|
107
|
+
exports.UpdateSubscriptionPermissions.encode(message.subscriptionPermissions, writer.uint32(90).fork()).ldelim();
|
108
|
+
}
|
109
|
+
if (message.syncState !== undefined) {
|
110
|
+
exports.SyncState.encode(message.syncState, writer.uint32(98).fork()).ldelim();
|
111
|
+
}
|
112
|
+
if (message.simulate !== undefined) {
|
113
|
+
exports.SimulateScenario.encode(message.simulate, writer.uint32(106).fork()).ldelim();
|
114
|
+
}
|
109
115
|
return writer;
|
110
116
|
},
|
111
117
|
decode(input, length) {
|
@@ -139,6 +145,19 @@ exports.SignalRequest = {
|
|
139
145
|
case 8:
|
140
146
|
message.leave = exports.LeaveRequest.decode(reader, reader.uint32());
|
141
147
|
break;
|
148
|
+
case 10:
|
149
|
+
message.updateLayers = exports.UpdateVideoLayers.decode(reader, reader.uint32());
|
150
|
+
break;
|
151
|
+
case 11:
|
152
|
+
message.subscriptionPermissions =
|
153
|
+
exports.UpdateSubscriptionPermissions.decode(reader, reader.uint32());
|
154
|
+
break;
|
155
|
+
case 12:
|
156
|
+
message.syncState = exports.SyncState.decode(reader, reader.uint32());
|
157
|
+
break;
|
158
|
+
case 13:
|
159
|
+
message.simulate = exports.SimulateScenario.decode(reader, reader.uint32());
|
160
|
+
break;
|
142
161
|
default:
|
143
162
|
reader.skipType(tag & 7);
|
144
163
|
break;
|
@@ -196,6 +215,31 @@ exports.SignalRequest = {
|
|
196
215
|
else {
|
197
216
|
message.leave = undefined;
|
198
217
|
}
|
218
|
+
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
219
|
+
message.updateLayers = exports.UpdateVideoLayers.fromJSON(object.updateLayers);
|
220
|
+
}
|
221
|
+
else {
|
222
|
+
message.updateLayers = undefined;
|
223
|
+
}
|
224
|
+
if (object.subscriptionPermissions !== undefined &&
|
225
|
+
object.subscriptionPermissions !== null) {
|
226
|
+
message.subscriptionPermissions = exports.UpdateSubscriptionPermissions.fromJSON(object.subscriptionPermissions);
|
227
|
+
}
|
228
|
+
else {
|
229
|
+
message.subscriptionPermissions = undefined;
|
230
|
+
}
|
231
|
+
if (object.syncState !== undefined && object.syncState !== null) {
|
232
|
+
message.syncState = exports.SyncState.fromJSON(object.syncState);
|
233
|
+
}
|
234
|
+
else {
|
235
|
+
message.syncState = undefined;
|
236
|
+
}
|
237
|
+
if (object.simulate !== undefined && object.simulate !== null) {
|
238
|
+
message.simulate = exports.SimulateScenario.fromJSON(object.simulate);
|
239
|
+
}
|
240
|
+
else {
|
241
|
+
message.simulate = undefined;
|
242
|
+
}
|
199
243
|
return message;
|
200
244
|
},
|
201
245
|
toJSON(message) {
|
@@ -232,6 +276,22 @@ exports.SignalRequest = {
|
|
232
276
|
(obj.leave = message.leave
|
233
277
|
? exports.LeaveRequest.toJSON(message.leave)
|
234
278
|
: undefined);
|
279
|
+
message.updateLayers !== undefined &&
|
280
|
+
(obj.updateLayers = message.updateLayers
|
281
|
+
? exports.UpdateVideoLayers.toJSON(message.updateLayers)
|
282
|
+
: undefined);
|
283
|
+
message.subscriptionPermissions !== undefined &&
|
284
|
+
(obj.subscriptionPermissions = message.subscriptionPermissions
|
285
|
+
? exports.UpdateSubscriptionPermissions.toJSON(message.subscriptionPermissions)
|
286
|
+
: undefined);
|
287
|
+
message.syncState !== undefined &&
|
288
|
+
(obj.syncState = message.syncState
|
289
|
+
? exports.SyncState.toJSON(message.syncState)
|
290
|
+
: undefined);
|
291
|
+
message.simulate !== undefined &&
|
292
|
+
(obj.simulate = message.simulate
|
293
|
+
? exports.SimulateScenario.toJSON(message.simulate)
|
294
|
+
: undefined);
|
235
295
|
return obj;
|
236
296
|
},
|
237
297
|
fromPartial(object) {
|
@@ -284,6 +344,32 @@ exports.SignalRequest = {
|
|
284
344
|
else {
|
285
345
|
message.leave = undefined;
|
286
346
|
}
|
347
|
+
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
348
|
+
message.updateLayers = exports.UpdateVideoLayers.fromPartial(object.updateLayers);
|
349
|
+
}
|
350
|
+
else {
|
351
|
+
message.updateLayers = undefined;
|
352
|
+
}
|
353
|
+
if (object.subscriptionPermissions !== undefined &&
|
354
|
+
object.subscriptionPermissions !== null) {
|
355
|
+
message.subscriptionPermissions =
|
356
|
+
exports.UpdateSubscriptionPermissions.fromPartial(object.subscriptionPermissions);
|
357
|
+
}
|
358
|
+
else {
|
359
|
+
message.subscriptionPermissions = undefined;
|
360
|
+
}
|
361
|
+
if (object.syncState !== undefined && object.syncState !== null) {
|
362
|
+
message.syncState = exports.SyncState.fromPartial(object.syncState);
|
363
|
+
}
|
364
|
+
else {
|
365
|
+
message.syncState = undefined;
|
366
|
+
}
|
367
|
+
if (object.simulate !== undefined && object.simulate !== null) {
|
368
|
+
message.simulate = exports.SimulateScenario.fromPartial(object.simulate);
|
369
|
+
}
|
370
|
+
else {
|
371
|
+
message.simulate = undefined;
|
372
|
+
}
|
287
373
|
return message;
|
288
374
|
},
|
289
375
|
};
|
@@ -323,6 +409,15 @@ exports.SignalResponse = {
|
|
323
409
|
if (message.connectionQuality !== undefined) {
|
324
410
|
exports.ConnectionQualityUpdate.encode(message.connectionQuality, writer.uint32(98).fork()).ldelim();
|
325
411
|
}
|
412
|
+
if (message.streamStateUpdate !== undefined) {
|
413
|
+
exports.StreamStateUpdate.encode(message.streamStateUpdate, writer.uint32(106).fork()).ldelim();
|
414
|
+
}
|
415
|
+
if (message.subscribedQualityUpdate !== undefined) {
|
416
|
+
exports.SubscribedQualityUpdate.encode(message.subscribedQualityUpdate, writer.uint32(114).fork()).ldelim();
|
417
|
+
}
|
418
|
+
if (message.subscriptionPermissionUpdate !== undefined) {
|
419
|
+
exports.SubscriptionPermissionUpdate.encode(message.subscriptionPermissionUpdate, writer.uint32(122).fork()).ldelim();
|
420
|
+
}
|
326
421
|
return writer;
|
327
422
|
},
|
328
423
|
decode(input, length) {
|
@@ -365,6 +460,16 @@ exports.SignalResponse = {
|
|
365
460
|
case 12:
|
366
461
|
message.connectionQuality = exports.ConnectionQualityUpdate.decode(reader, reader.uint32());
|
367
462
|
break;
|
463
|
+
case 13:
|
464
|
+
message.streamStateUpdate = exports.StreamStateUpdate.decode(reader, reader.uint32());
|
465
|
+
break;
|
466
|
+
case 14:
|
467
|
+
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.decode(reader, reader.uint32());
|
468
|
+
break;
|
469
|
+
case 15:
|
470
|
+
message.subscriptionPermissionUpdate =
|
471
|
+
exports.SubscriptionPermissionUpdate.decode(reader, reader.uint32());
|
472
|
+
break;
|
368
473
|
default:
|
369
474
|
reader.skipType(tag & 7);
|
370
475
|
break;
|
@@ -442,6 +547,28 @@ exports.SignalResponse = {
|
|
442
547
|
else {
|
443
548
|
message.connectionQuality = undefined;
|
444
549
|
}
|
550
|
+
if (object.streamStateUpdate !== undefined &&
|
551
|
+
object.streamStateUpdate !== null) {
|
552
|
+
message.streamStateUpdate = exports.StreamStateUpdate.fromJSON(object.streamStateUpdate);
|
553
|
+
}
|
554
|
+
else {
|
555
|
+
message.streamStateUpdate = undefined;
|
556
|
+
}
|
557
|
+
if (object.subscribedQualityUpdate !== undefined &&
|
558
|
+
object.subscribedQualityUpdate !== null) {
|
559
|
+
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate);
|
560
|
+
}
|
561
|
+
else {
|
562
|
+
message.subscribedQualityUpdate = undefined;
|
563
|
+
}
|
564
|
+
if (object.subscriptionPermissionUpdate !== undefined &&
|
565
|
+
object.subscriptionPermissionUpdate !== null) {
|
566
|
+
message.subscriptionPermissionUpdate =
|
567
|
+
exports.SubscriptionPermissionUpdate.fromJSON(object.subscriptionPermissionUpdate);
|
568
|
+
}
|
569
|
+
else {
|
570
|
+
message.subscriptionPermissionUpdate = undefined;
|
571
|
+
}
|
445
572
|
return message;
|
446
573
|
},
|
447
574
|
toJSON(message) {
|
@@ -488,6 +615,18 @@ exports.SignalResponse = {
|
|
488
615
|
(obj.connectionQuality = message.connectionQuality
|
489
616
|
? exports.ConnectionQualityUpdate.toJSON(message.connectionQuality)
|
490
617
|
: undefined);
|
618
|
+
message.streamStateUpdate !== undefined &&
|
619
|
+
(obj.streamStateUpdate = message.streamStateUpdate
|
620
|
+
? exports.StreamStateUpdate.toJSON(message.streamStateUpdate)
|
621
|
+
: undefined);
|
622
|
+
message.subscribedQualityUpdate !== undefined &&
|
623
|
+
(obj.subscribedQualityUpdate = message.subscribedQualityUpdate
|
624
|
+
? exports.SubscribedQualityUpdate.toJSON(message.subscribedQualityUpdate)
|
625
|
+
: undefined);
|
626
|
+
message.subscriptionPermissionUpdate !== undefined &&
|
627
|
+
(obj.subscriptionPermissionUpdate = message.subscriptionPermissionUpdate
|
628
|
+
? exports.SubscriptionPermissionUpdate.toJSON(message.subscriptionPermissionUpdate)
|
629
|
+
: undefined);
|
491
630
|
return obj;
|
492
631
|
},
|
493
632
|
fromPartial(object) {
|
@@ -560,6 +699,28 @@ exports.SignalResponse = {
|
|
560
699
|
else {
|
561
700
|
message.connectionQuality = undefined;
|
562
701
|
}
|
702
|
+
if (object.streamStateUpdate !== undefined &&
|
703
|
+
object.streamStateUpdate !== null) {
|
704
|
+
message.streamStateUpdate = exports.StreamStateUpdate.fromPartial(object.streamStateUpdate);
|
705
|
+
}
|
706
|
+
else {
|
707
|
+
message.streamStateUpdate = undefined;
|
708
|
+
}
|
709
|
+
if (object.subscribedQualityUpdate !== undefined &&
|
710
|
+
object.subscribedQualityUpdate !== null) {
|
711
|
+
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate);
|
712
|
+
}
|
713
|
+
else {
|
714
|
+
message.subscribedQualityUpdate = undefined;
|
715
|
+
}
|
716
|
+
if (object.subscriptionPermissionUpdate !== undefined &&
|
717
|
+
object.subscriptionPermissionUpdate !== null) {
|
718
|
+
message.subscriptionPermissionUpdate =
|
719
|
+
exports.SubscriptionPermissionUpdate.fromPartial(object.subscriptionPermissionUpdate);
|
720
|
+
}
|
721
|
+
else {
|
722
|
+
message.subscriptionPermissionUpdate = undefined;
|
723
|
+
}
|
563
724
|
return message;
|
564
725
|
},
|
565
726
|
};
|
@@ -599,12 +760,16 @@ exports.AddTrackRequest = {
|
|
599
760
|
if (message.source !== 0) {
|
600
761
|
writer.uint32(64).int32(message.source);
|
601
762
|
}
|
763
|
+
for (const v of message.layers) {
|
764
|
+
livekit_models_1.VideoLayer.encode(v, writer.uint32(74).fork()).ldelim();
|
765
|
+
}
|
602
766
|
return writer;
|
603
767
|
},
|
604
768
|
decode(input, length) {
|
605
769
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
606
770
|
let end = length === undefined ? reader.len : reader.pos + length;
|
607
771
|
const message = Object.assign({}, baseAddTrackRequest);
|
772
|
+
message.layers = [];
|
608
773
|
while (reader.pos < end) {
|
609
774
|
const tag = reader.uint32();
|
610
775
|
switch (tag >>> 3) {
|
@@ -632,6 +797,9 @@ exports.AddTrackRequest = {
|
|
632
797
|
case 8:
|
633
798
|
message.source = reader.int32();
|
634
799
|
break;
|
800
|
+
case 9:
|
801
|
+
message.layers.push(livekit_models_1.VideoLayer.decode(reader, reader.uint32()));
|
802
|
+
break;
|
635
803
|
default:
|
636
804
|
reader.skipType(tag & 7);
|
637
805
|
break;
|
@@ -641,6 +809,7 @@ exports.AddTrackRequest = {
|
|
641
809
|
},
|
642
810
|
fromJSON(object) {
|
643
811
|
const message = Object.assign({}, baseAddTrackRequest);
|
812
|
+
message.layers = [];
|
644
813
|
if (object.cid !== undefined && object.cid !== null) {
|
645
814
|
message.cid = String(object.cid);
|
646
815
|
}
|
@@ -689,6 +858,11 @@ exports.AddTrackRequest = {
|
|
689
858
|
else {
|
690
859
|
message.source = 0;
|
691
860
|
}
|
861
|
+
if (object.layers !== undefined && object.layers !== null) {
|
862
|
+
for (const e of object.layers) {
|
863
|
+
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
864
|
+
}
|
865
|
+
}
|
692
866
|
return message;
|
693
867
|
},
|
694
868
|
toJSON(message) {
|
@@ -702,6 +876,12 @@ exports.AddTrackRequest = {
|
|
702
876
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
703
877
|
message.source !== undefined &&
|
704
878
|
(obj.source = livekit_models_1.trackSourceToJSON(message.source));
|
879
|
+
if (message.layers) {
|
880
|
+
obj.layers = message.layers.map((e) => e ? livekit_models_1.VideoLayer.toJSON(e) : undefined);
|
881
|
+
}
|
882
|
+
else {
|
883
|
+
obj.layers = [];
|
884
|
+
}
|
705
885
|
return obj;
|
706
886
|
},
|
707
887
|
fromPartial(object) {
|
@@ -715,6 +895,12 @@ exports.AddTrackRequest = {
|
|
715
895
|
message.muted = (_f = object.muted) !== null && _f !== void 0 ? _f : false;
|
716
896
|
message.disableDtx = (_g = object.disableDtx) !== null && _g !== void 0 ? _g : false;
|
717
897
|
message.source = (_h = object.source) !== null && _h !== void 0 ? _h : 0;
|
898
|
+
message.layers = [];
|
899
|
+
if (object.layers !== undefined && object.layers !== null) {
|
900
|
+
for (const e of object.layers) {
|
901
|
+
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
902
|
+
}
|
903
|
+
}
|
718
904
|
return message;
|
719
905
|
},
|
720
906
|
};
|
@@ -1213,6 +1399,9 @@ exports.UpdateSubscription = {
|
|
1213
1399
|
if (message.subscribe === true) {
|
1214
1400
|
writer.uint32(16).bool(message.subscribe);
|
1215
1401
|
}
|
1402
|
+
for (const v of message.participantTracks) {
|
1403
|
+
livekit_models_1.ParticipantTracks.encode(v, writer.uint32(26).fork()).ldelim();
|
1404
|
+
}
|
1216
1405
|
return writer;
|
1217
1406
|
},
|
1218
1407
|
decode(input, length) {
|
@@ -1220,6 +1409,7 @@ exports.UpdateSubscription = {
|
|
1220
1409
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1221
1410
|
const message = Object.assign({}, baseUpdateSubscription);
|
1222
1411
|
message.trackSids = [];
|
1412
|
+
message.participantTracks = [];
|
1223
1413
|
while (reader.pos < end) {
|
1224
1414
|
const tag = reader.uint32();
|
1225
1415
|
switch (tag >>> 3) {
|
@@ -1229,6 +1419,9 @@ exports.UpdateSubscription = {
|
|
1229
1419
|
case 2:
|
1230
1420
|
message.subscribe = reader.bool();
|
1231
1421
|
break;
|
1422
|
+
case 3:
|
1423
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.decode(reader, reader.uint32()));
|
1424
|
+
break;
|
1232
1425
|
default:
|
1233
1426
|
reader.skipType(tag & 7);
|
1234
1427
|
break;
|
@@ -1239,6 +1432,7 @@ exports.UpdateSubscription = {
|
|
1239
1432
|
fromJSON(object) {
|
1240
1433
|
const message = Object.assign({}, baseUpdateSubscription);
|
1241
1434
|
message.trackSids = [];
|
1435
|
+
message.participantTracks = [];
|
1242
1436
|
if (object.trackSids !== undefined && object.trackSids !== null) {
|
1243
1437
|
for (const e of object.trackSids) {
|
1244
1438
|
message.trackSids.push(String(e));
|
@@ -1250,6 +1444,12 @@ exports.UpdateSubscription = {
|
|
1250
1444
|
else {
|
1251
1445
|
message.subscribe = false;
|
1252
1446
|
}
|
1447
|
+
if (object.participantTracks !== undefined &&
|
1448
|
+
object.participantTracks !== null) {
|
1449
|
+
for (const e of object.participantTracks) {
|
1450
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromJSON(e));
|
1451
|
+
}
|
1452
|
+
}
|
1253
1453
|
return message;
|
1254
1454
|
},
|
1255
1455
|
toJSON(message) {
|
@@ -1261,6 +1461,12 @@ exports.UpdateSubscription = {
|
|
1261
1461
|
obj.trackSids = [];
|
1262
1462
|
}
|
1263
1463
|
message.subscribe !== undefined && (obj.subscribe = message.subscribe);
|
1464
|
+
if (message.participantTracks) {
|
1465
|
+
obj.participantTracks = message.participantTracks.map((e) => e ? livekit_models_1.ParticipantTracks.toJSON(e) : undefined);
|
1466
|
+
}
|
1467
|
+
else {
|
1468
|
+
obj.participantTracks = [];
|
1469
|
+
}
|
1264
1470
|
return obj;
|
1265
1471
|
},
|
1266
1472
|
fromPartial(object) {
|
@@ -1273,6 +1479,13 @@ exports.UpdateSubscription = {
|
|
1273
1479
|
}
|
1274
1480
|
}
|
1275
1481
|
message.subscribe = (_a = object.subscribe) !== null && _a !== void 0 ? _a : false;
|
1482
|
+
message.participantTracks = [];
|
1483
|
+
if (object.participantTracks !== undefined &&
|
1484
|
+
object.participantTracks !== null) {
|
1485
|
+
for (const e of object.participantTracks) {
|
1486
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromPartial(e));
|
1487
|
+
}
|
1488
|
+
}
|
1276
1489
|
return message;
|
1277
1490
|
},
|
1278
1491
|
};
|
@@ -1347,7 +1560,7 @@ exports.UpdateTrackSettings = {
|
|
1347
1560
|
message.disabled = false;
|
1348
1561
|
}
|
1349
1562
|
if (object.quality !== undefined && object.quality !== null) {
|
1350
|
-
message.quality = videoQualityFromJSON(object.quality);
|
1563
|
+
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
1351
1564
|
}
|
1352
1565
|
else {
|
1353
1566
|
message.quality = 0;
|
@@ -1376,7 +1589,7 @@ exports.UpdateTrackSettings = {
|
|
1376
1589
|
}
|
1377
1590
|
message.disabled !== undefined && (obj.disabled = message.disabled);
|
1378
1591
|
message.quality !== undefined &&
|
1379
|
-
(obj.quality = videoQualityToJSON(message.quality));
|
1592
|
+
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
1380
1593
|
message.width !== undefined && (obj.width = message.width);
|
1381
1594
|
message.height !== undefined && (obj.height = message.height);
|
1382
1595
|
return obj;
|
@@ -1445,6 +1658,78 @@ exports.LeaveRequest = {
|
|
1445
1658
|
return message;
|
1446
1659
|
},
|
1447
1660
|
};
|
1661
|
+
const baseUpdateVideoLayers = { trackSid: "" };
|
1662
|
+
exports.UpdateVideoLayers = {
|
1663
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
1664
|
+
if (message.trackSid !== "") {
|
1665
|
+
writer.uint32(10).string(message.trackSid);
|
1666
|
+
}
|
1667
|
+
for (const v of message.layers) {
|
1668
|
+
livekit_models_1.VideoLayer.encode(v, writer.uint32(18).fork()).ldelim();
|
1669
|
+
}
|
1670
|
+
return writer;
|
1671
|
+
},
|
1672
|
+
decode(input, length) {
|
1673
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
1674
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1675
|
+
const message = Object.assign({}, baseUpdateVideoLayers);
|
1676
|
+
message.layers = [];
|
1677
|
+
while (reader.pos < end) {
|
1678
|
+
const tag = reader.uint32();
|
1679
|
+
switch (tag >>> 3) {
|
1680
|
+
case 1:
|
1681
|
+
message.trackSid = reader.string();
|
1682
|
+
break;
|
1683
|
+
case 2:
|
1684
|
+
message.layers.push(livekit_models_1.VideoLayer.decode(reader, reader.uint32()));
|
1685
|
+
break;
|
1686
|
+
default:
|
1687
|
+
reader.skipType(tag & 7);
|
1688
|
+
break;
|
1689
|
+
}
|
1690
|
+
}
|
1691
|
+
return message;
|
1692
|
+
},
|
1693
|
+
fromJSON(object) {
|
1694
|
+
const message = Object.assign({}, baseUpdateVideoLayers);
|
1695
|
+
message.layers = [];
|
1696
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
1697
|
+
message.trackSid = String(object.trackSid);
|
1698
|
+
}
|
1699
|
+
else {
|
1700
|
+
message.trackSid = "";
|
1701
|
+
}
|
1702
|
+
if (object.layers !== undefined && object.layers !== null) {
|
1703
|
+
for (const e of object.layers) {
|
1704
|
+
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
1705
|
+
}
|
1706
|
+
}
|
1707
|
+
return message;
|
1708
|
+
},
|
1709
|
+
toJSON(message) {
|
1710
|
+
const obj = {};
|
1711
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
1712
|
+
if (message.layers) {
|
1713
|
+
obj.layers = message.layers.map((e) => e ? livekit_models_1.VideoLayer.toJSON(e) : undefined);
|
1714
|
+
}
|
1715
|
+
else {
|
1716
|
+
obj.layers = [];
|
1717
|
+
}
|
1718
|
+
return obj;
|
1719
|
+
},
|
1720
|
+
fromPartial(object) {
|
1721
|
+
var _a;
|
1722
|
+
const message = Object.assign({}, baseUpdateVideoLayers);
|
1723
|
+
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
1724
|
+
message.layers = [];
|
1725
|
+
if (object.layers !== undefined && object.layers !== null) {
|
1726
|
+
for (const e of object.layers) {
|
1727
|
+
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
1728
|
+
}
|
1729
|
+
}
|
1730
|
+
return message;
|
1731
|
+
},
|
1732
|
+
};
|
1448
1733
|
const baseICEServer = { urls: "", username: "", credential: "" };
|
1449
1734
|
exports.ICEServer = {
|
1450
1735
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -1640,7 +1925,11 @@ exports.RoomUpdate = {
|
|
1640
1925
|
return message;
|
1641
1926
|
},
|
1642
1927
|
};
|
1643
|
-
const baseConnectionQualityInfo = {
|
1928
|
+
const baseConnectionQualityInfo = {
|
1929
|
+
participantSid: "",
|
1930
|
+
quality: 0,
|
1931
|
+
score: 0,
|
1932
|
+
};
|
1644
1933
|
exports.ConnectionQualityInfo = {
|
1645
1934
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
1646
1935
|
if (message.participantSid !== "") {
|
@@ -1649,6 +1938,9 @@ exports.ConnectionQualityInfo = {
|
|
1649
1938
|
if (message.quality !== 0) {
|
1650
1939
|
writer.uint32(16).int32(message.quality);
|
1651
1940
|
}
|
1941
|
+
if (message.score !== 0) {
|
1942
|
+
writer.uint32(29).float(message.score);
|
1943
|
+
}
|
1652
1944
|
return writer;
|
1653
1945
|
},
|
1654
1946
|
decode(input, length) {
|
@@ -1664,6 +1956,9 @@ exports.ConnectionQualityInfo = {
|
|
1664
1956
|
case 2:
|
1665
1957
|
message.quality = reader.int32();
|
1666
1958
|
break;
|
1959
|
+
case 3:
|
1960
|
+
message.score = reader.float();
|
1961
|
+
break;
|
1667
1962
|
default:
|
1668
1963
|
reader.skipType(tag & 7);
|
1669
1964
|
break;
|
@@ -1685,6 +1980,12 @@ exports.ConnectionQualityInfo = {
|
|
1685
1980
|
else {
|
1686
1981
|
message.quality = 0;
|
1687
1982
|
}
|
1983
|
+
if (object.score !== undefined && object.score !== null) {
|
1984
|
+
message.score = Number(object.score);
|
1985
|
+
}
|
1986
|
+
else {
|
1987
|
+
message.score = 0;
|
1988
|
+
}
|
1688
1989
|
return message;
|
1689
1990
|
},
|
1690
1991
|
toJSON(message) {
|
@@ -1693,13 +1994,15 @@ exports.ConnectionQualityInfo = {
|
|
1693
1994
|
(obj.participantSid = message.participantSid);
|
1694
1995
|
message.quality !== undefined &&
|
1695
1996
|
(obj.quality = livekit_models_1.connectionQualityToJSON(message.quality));
|
1997
|
+
message.score !== undefined && (obj.score = message.score);
|
1696
1998
|
return obj;
|
1697
1999
|
},
|
1698
2000
|
fromPartial(object) {
|
1699
|
-
var _a, _b;
|
2001
|
+
var _a, _b, _c;
|
1700
2002
|
const message = Object.assign({}, baseConnectionQualityInfo);
|
1701
2003
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
1702
2004
|
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
2005
|
+
message.score = (_c = object.score) !== null && _c !== void 0 ? _c : 0;
|
1703
2006
|
return message;
|
1704
2007
|
},
|
1705
2008
|
};
|
@@ -1760,6 +2063,720 @@ exports.ConnectionQualityUpdate = {
|
|
1760
2063
|
return message;
|
1761
2064
|
},
|
1762
2065
|
};
|
2066
|
+
const baseStreamStateInfo = {
|
2067
|
+
participantSid: "",
|
2068
|
+
trackSid: "",
|
2069
|
+
state: 0,
|
2070
|
+
};
|
2071
|
+
exports.StreamStateInfo = {
|
2072
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2073
|
+
if (message.participantSid !== "") {
|
2074
|
+
writer.uint32(10).string(message.participantSid);
|
2075
|
+
}
|
2076
|
+
if (message.trackSid !== "") {
|
2077
|
+
writer.uint32(18).string(message.trackSid);
|
2078
|
+
}
|
2079
|
+
if (message.state !== 0) {
|
2080
|
+
writer.uint32(24).int32(message.state);
|
2081
|
+
}
|
2082
|
+
return writer;
|
2083
|
+
},
|
2084
|
+
decode(input, length) {
|
2085
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2086
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2087
|
+
const message = Object.assign({}, baseStreamStateInfo);
|
2088
|
+
while (reader.pos < end) {
|
2089
|
+
const tag = reader.uint32();
|
2090
|
+
switch (tag >>> 3) {
|
2091
|
+
case 1:
|
2092
|
+
message.participantSid = reader.string();
|
2093
|
+
break;
|
2094
|
+
case 2:
|
2095
|
+
message.trackSid = reader.string();
|
2096
|
+
break;
|
2097
|
+
case 3:
|
2098
|
+
message.state = reader.int32();
|
2099
|
+
break;
|
2100
|
+
default:
|
2101
|
+
reader.skipType(tag & 7);
|
2102
|
+
break;
|
2103
|
+
}
|
2104
|
+
}
|
2105
|
+
return message;
|
2106
|
+
},
|
2107
|
+
fromJSON(object) {
|
2108
|
+
const message = Object.assign({}, baseStreamStateInfo);
|
2109
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2110
|
+
message.participantSid = String(object.participantSid);
|
2111
|
+
}
|
2112
|
+
else {
|
2113
|
+
message.participantSid = "";
|
2114
|
+
}
|
2115
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2116
|
+
message.trackSid = String(object.trackSid);
|
2117
|
+
}
|
2118
|
+
else {
|
2119
|
+
message.trackSid = "";
|
2120
|
+
}
|
2121
|
+
if (object.state !== undefined && object.state !== null) {
|
2122
|
+
message.state = streamStateFromJSON(object.state);
|
2123
|
+
}
|
2124
|
+
else {
|
2125
|
+
message.state = 0;
|
2126
|
+
}
|
2127
|
+
return message;
|
2128
|
+
},
|
2129
|
+
toJSON(message) {
|
2130
|
+
const obj = {};
|
2131
|
+
message.participantSid !== undefined &&
|
2132
|
+
(obj.participantSid = message.participantSid);
|
2133
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2134
|
+
message.state !== undefined &&
|
2135
|
+
(obj.state = streamStateToJSON(message.state));
|
2136
|
+
return obj;
|
2137
|
+
},
|
2138
|
+
fromPartial(object) {
|
2139
|
+
var _a, _b, _c;
|
2140
|
+
const message = Object.assign({}, baseStreamStateInfo);
|
2141
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2142
|
+
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2143
|
+
message.state = (_c = object.state) !== null && _c !== void 0 ? _c : 0;
|
2144
|
+
return message;
|
2145
|
+
},
|
2146
|
+
};
|
2147
|
+
const baseStreamStateUpdate = {};
|
2148
|
+
exports.StreamStateUpdate = {
|
2149
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2150
|
+
for (const v of message.streamStates) {
|
2151
|
+
exports.StreamStateInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
2152
|
+
}
|
2153
|
+
return writer;
|
2154
|
+
},
|
2155
|
+
decode(input, length) {
|
2156
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2157
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2158
|
+
const message = Object.assign({}, baseStreamStateUpdate);
|
2159
|
+
message.streamStates = [];
|
2160
|
+
while (reader.pos < end) {
|
2161
|
+
const tag = reader.uint32();
|
2162
|
+
switch (tag >>> 3) {
|
2163
|
+
case 1:
|
2164
|
+
message.streamStates.push(exports.StreamStateInfo.decode(reader, reader.uint32()));
|
2165
|
+
break;
|
2166
|
+
default:
|
2167
|
+
reader.skipType(tag & 7);
|
2168
|
+
break;
|
2169
|
+
}
|
2170
|
+
}
|
2171
|
+
return message;
|
2172
|
+
},
|
2173
|
+
fromJSON(object) {
|
2174
|
+
const message = Object.assign({}, baseStreamStateUpdate);
|
2175
|
+
message.streamStates = [];
|
2176
|
+
if (object.streamStates !== undefined && object.streamStates !== null) {
|
2177
|
+
for (const e of object.streamStates) {
|
2178
|
+
message.streamStates.push(exports.StreamStateInfo.fromJSON(e));
|
2179
|
+
}
|
2180
|
+
}
|
2181
|
+
return message;
|
2182
|
+
},
|
2183
|
+
toJSON(message) {
|
2184
|
+
const obj = {};
|
2185
|
+
if (message.streamStates) {
|
2186
|
+
obj.streamStates = message.streamStates.map((e) => e ? exports.StreamStateInfo.toJSON(e) : undefined);
|
2187
|
+
}
|
2188
|
+
else {
|
2189
|
+
obj.streamStates = [];
|
2190
|
+
}
|
2191
|
+
return obj;
|
2192
|
+
},
|
2193
|
+
fromPartial(object) {
|
2194
|
+
const message = Object.assign({}, baseStreamStateUpdate);
|
2195
|
+
message.streamStates = [];
|
2196
|
+
if (object.streamStates !== undefined && object.streamStates !== null) {
|
2197
|
+
for (const e of object.streamStates) {
|
2198
|
+
message.streamStates.push(exports.StreamStateInfo.fromPartial(e));
|
2199
|
+
}
|
2200
|
+
}
|
2201
|
+
return message;
|
2202
|
+
},
|
2203
|
+
};
|
2204
|
+
const baseSubscribedQuality = { quality: 0, enabled: false };
|
2205
|
+
exports.SubscribedQuality = {
|
2206
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2207
|
+
if (message.quality !== 0) {
|
2208
|
+
writer.uint32(8).int32(message.quality);
|
2209
|
+
}
|
2210
|
+
if (message.enabled === true) {
|
2211
|
+
writer.uint32(16).bool(message.enabled);
|
2212
|
+
}
|
2213
|
+
return writer;
|
2214
|
+
},
|
2215
|
+
decode(input, length) {
|
2216
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2217
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2218
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2219
|
+
while (reader.pos < end) {
|
2220
|
+
const tag = reader.uint32();
|
2221
|
+
switch (tag >>> 3) {
|
2222
|
+
case 1:
|
2223
|
+
message.quality = reader.int32();
|
2224
|
+
break;
|
2225
|
+
case 2:
|
2226
|
+
message.enabled = reader.bool();
|
2227
|
+
break;
|
2228
|
+
default:
|
2229
|
+
reader.skipType(tag & 7);
|
2230
|
+
break;
|
2231
|
+
}
|
2232
|
+
}
|
2233
|
+
return message;
|
2234
|
+
},
|
2235
|
+
fromJSON(object) {
|
2236
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2237
|
+
if (object.quality !== undefined && object.quality !== null) {
|
2238
|
+
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
2239
|
+
}
|
2240
|
+
else {
|
2241
|
+
message.quality = 0;
|
2242
|
+
}
|
2243
|
+
if (object.enabled !== undefined && object.enabled !== null) {
|
2244
|
+
message.enabled = Boolean(object.enabled);
|
2245
|
+
}
|
2246
|
+
else {
|
2247
|
+
message.enabled = false;
|
2248
|
+
}
|
2249
|
+
return message;
|
2250
|
+
},
|
2251
|
+
toJSON(message) {
|
2252
|
+
const obj = {};
|
2253
|
+
message.quality !== undefined &&
|
2254
|
+
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
2255
|
+
message.enabled !== undefined && (obj.enabled = message.enabled);
|
2256
|
+
return obj;
|
2257
|
+
},
|
2258
|
+
fromPartial(object) {
|
2259
|
+
var _a, _b;
|
2260
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2261
|
+
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
2262
|
+
message.enabled = (_b = object.enabled) !== null && _b !== void 0 ? _b : false;
|
2263
|
+
return message;
|
2264
|
+
},
|
2265
|
+
};
|
2266
|
+
const baseSubscribedQualityUpdate = { trackSid: "" };
|
2267
|
+
exports.SubscribedQualityUpdate = {
|
2268
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2269
|
+
if (message.trackSid !== "") {
|
2270
|
+
writer.uint32(10).string(message.trackSid);
|
2271
|
+
}
|
2272
|
+
for (const v of message.subscribedQualities) {
|
2273
|
+
exports.SubscribedQuality.encode(v, writer.uint32(18).fork()).ldelim();
|
2274
|
+
}
|
2275
|
+
return writer;
|
2276
|
+
},
|
2277
|
+
decode(input, length) {
|
2278
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2279
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2280
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2281
|
+
message.subscribedQualities = [];
|
2282
|
+
while (reader.pos < end) {
|
2283
|
+
const tag = reader.uint32();
|
2284
|
+
switch (tag >>> 3) {
|
2285
|
+
case 1:
|
2286
|
+
message.trackSid = reader.string();
|
2287
|
+
break;
|
2288
|
+
case 2:
|
2289
|
+
message.subscribedQualities.push(exports.SubscribedQuality.decode(reader, reader.uint32()));
|
2290
|
+
break;
|
2291
|
+
default:
|
2292
|
+
reader.skipType(tag & 7);
|
2293
|
+
break;
|
2294
|
+
}
|
2295
|
+
}
|
2296
|
+
return message;
|
2297
|
+
},
|
2298
|
+
fromJSON(object) {
|
2299
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2300
|
+
message.subscribedQualities = [];
|
2301
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2302
|
+
message.trackSid = String(object.trackSid);
|
2303
|
+
}
|
2304
|
+
else {
|
2305
|
+
message.trackSid = "";
|
2306
|
+
}
|
2307
|
+
if (object.subscribedQualities !== undefined &&
|
2308
|
+
object.subscribedQualities !== null) {
|
2309
|
+
for (const e of object.subscribedQualities) {
|
2310
|
+
message.subscribedQualities.push(exports.SubscribedQuality.fromJSON(e));
|
2311
|
+
}
|
2312
|
+
}
|
2313
|
+
return message;
|
2314
|
+
},
|
2315
|
+
toJSON(message) {
|
2316
|
+
const obj = {};
|
2317
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2318
|
+
if (message.subscribedQualities) {
|
2319
|
+
obj.subscribedQualities = message.subscribedQualities.map((e) => e ? exports.SubscribedQuality.toJSON(e) : undefined);
|
2320
|
+
}
|
2321
|
+
else {
|
2322
|
+
obj.subscribedQualities = [];
|
2323
|
+
}
|
2324
|
+
return obj;
|
2325
|
+
},
|
2326
|
+
fromPartial(object) {
|
2327
|
+
var _a;
|
2328
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2329
|
+
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
2330
|
+
message.subscribedQualities = [];
|
2331
|
+
if (object.subscribedQualities !== undefined &&
|
2332
|
+
object.subscribedQualities !== null) {
|
2333
|
+
for (const e of object.subscribedQualities) {
|
2334
|
+
message.subscribedQualities.push(exports.SubscribedQuality.fromPartial(e));
|
2335
|
+
}
|
2336
|
+
}
|
2337
|
+
return message;
|
2338
|
+
},
|
2339
|
+
};
|
2340
|
+
const baseTrackPermission = {
|
2341
|
+
participantSid: "",
|
2342
|
+
allTracks: false,
|
2343
|
+
trackSids: "",
|
2344
|
+
};
|
2345
|
+
exports.TrackPermission = {
|
2346
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2347
|
+
if (message.participantSid !== "") {
|
2348
|
+
writer.uint32(10).string(message.participantSid);
|
2349
|
+
}
|
2350
|
+
if (message.allTracks === true) {
|
2351
|
+
writer.uint32(16).bool(message.allTracks);
|
2352
|
+
}
|
2353
|
+
for (const v of message.trackSids) {
|
2354
|
+
writer.uint32(26).string(v);
|
2355
|
+
}
|
2356
|
+
return writer;
|
2357
|
+
},
|
2358
|
+
decode(input, length) {
|
2359
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2360
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2361
|
+
const message = Object.assign({}, baseTrackPermission);
|
2362
|
+
message.trackSids = [];
|
2363
|
+
while (reader.pos < end) {
|
2364
|
+
const tag = reader.uint32();
|
2365
|
+
switch (tag >>> 3) {
|
2366
|
+
case 1:
|
2367
|
+
message.participantSid = reader.string();
|
2368
|
+
break;
|
2369
|
+
case 2:
|
2370
|
+
message.allTracks = reader.bool();
|
2371
|
+
break;
|
2372
|
+
case 3:
|
2373
|
+
message.trackSids.push(reader.string());
|
2374
|
+
break;
|
2375
|
+
default:
|
2376
|
+
reader.skipType(tag & 7);
|
2377
|
+
break;
|
2378
|
+
}
|
2379
|
+
}
|
2380
|
+
return message;
|
2381
|
+
},
|
2382
|
+
fromJSON(object) {
|
2383
|
+
const message = Object.assign({}, baseTrackPermission);
|
2384
|
+
message.trackSids = [];
|
2385
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2386
|
+
message.participantSid = String(object.participantSid);
|
2387
|
+
}
|
2388
|
+
else {
|
2389
|
+
message.participantSid = "";
|
2390
|
+
}
|
2391
|
+
if (object.allTracks !== undefined && object.allTracks !== null) {
|
2392
|
+
message.allTracks = Boolean(object.allTracks);
|
2393
|
+
}
|
2394
|
+
else {
|
2395
|
+
message.allTracks = false;
|
2396
|
+
}
|
2397
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2398
|
+
for (const e of object.trackSids) {
|
2399
|
+
message.trackSids.push(String(e));
|
2400
|
+
}
|
2401
|
+
}
|
2402
|
+
return message;
|
2403
|
+
},
|
2404
|
+
toJSON(message) {
|
2405
|
+
const obj = {};
|
2406
|
+
message.participantSid !== undefined &&
|
2407
|
+
(obj.participantSid = message.participantSid);
|
2408
|
+
message.allTracks !== undefined && (obj.allTracks = message.allTracks);
|
2409
|
+
if (message.trackSids) {
|
2410
|
+
obj.trackSids = message.trackSids.map((e) => e);
|
2411
|
+
}
|
2412
|
+
else {
|
2413
|
+
obj.trackSids = [];
|
2414
|
+
}
|
2415
|
+
return obj;
|
2416
|
+
},
|
2417
|
+
fromPartial(object) {
|
2418
|
+
var _a, _b;
|
2419
|
+
const message = Object.assign({}, baseTrackPermission);
|
2420
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2421
|
+
message.allTracks = (_b = object.allTracks) !== null && _b !== void 0 ? _b : false;
|
2422
|
+
message.trackSids = [];
|
2423
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2424
|
+
for (const e of object.trackSids) {
|
2425
|
+
message.trackSids.push(e);
|
2426
|
+
}
|
2427
|
+
}
|
2428
|
+
return message;
|
2429
|
+
},
|
2430
|
+
};
|
2431
|
+
const baseUpdateSubscriptionPermissions = { allParticipants: false };
|
2432
|
+
exports.UpdateSubscriptionPermissions = {
|
2433
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2434
|
+
if (message.allParticipants === true) {
|
2435
|
+
writer.uint32(8).bool(message.allParticipants);
|
2436
|
+
}
|
2437
|
+
for (const v of message.trackPermissions) {
|
2438
|
+
exports.TrackPermission.encode(v, writer.uint32(18).fork()).ldelim();
|
2439
|
+
}
|
2440
|
+
return writer;
|
2441
|
+
},
|
2442
|
+
decode(input, length) {
|
2443
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2444
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2445
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2446
|
+
message.trackPermissions = [];
|
2447
|
+
while (reader.pos < end) {
|
2448
|
+
const tag = reader.uint32();
|
2449
|
+
switch (tag >>> 3) {
|
2450
|
+
case 1:
|
2451
|
+
message.allParticipants = reader.bool();
|
2452
|
+
break;
|
2453
|
+
case 2:
|
2454
|
+
message.trackPermissions.push(exports.TrackPermission.decode(reader, reader.uint32()));
|
2455
|
+
break;
|
2456
|
+
default:
|
2457
|
+
reader.skipType(tag & 7);
|
2458
|
+
break;
|
2459
|
+
}
|
2460
|
+
}
|
2461
|
+
return message;
|
2462
|
+
},
|
2463
|
+
fromJSON(object) {
|
2464
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2465
|
+
message.trackPermissions = [];
|
2466
|
+
if (object.allParticipants !== undefined &&
|
2467
|
+
object.allParticipants !== null) {
|
2468
|
+
message.allParticipants = Boolean(object.allParticipants);
|
2469
|
+
}
|
2470
|
+
else {
|
2471
|
+
message.allParticipants = false;
|
2472
|
+
}
|
2473
|
+
if (object.trackPermissions !== undefined &&
|
2474
|
+
object.trackPermissions !== null) {
|
2475
|
+
for (const e of object.trackPermissions) {
|
2476
|
+
message.trackPermissions.push(exports.TrackPermission.fromJSON(e));
|
2477
|
+
}
|
2478
|
+
}
|
2479
|
+
return message;
|
2480
|
+
},
|
2481
|
+
toJSON(message) {
|
2482
|
+
const obj = {};
|
2483
|
+
message.allParticipants !== undefined &&
|
2484
|
+
(obj.allParticipants = message.allParticipants);
|
2485
|
+
if (message.trackPermissions) {
|
2486
|
+
obj.trackPermissions = message.trackPermissions.map((e) => e ? exports.TrackPermission.toJSON(e) : undefined);
|
2487
|
+
}
|
2488
|
+
else {
|
2489
|
+
obj.trackPermissions = [];
|
2490
|
+
}
|
2491
|
+
return obj;
|
2492
|
+
},
|
2493
|
+
fromPartial(object) {
|
2494
|
+
var _a;
|
2495
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2496
|
+
message.allParticipants = (_a = object.allParticipants) !== null && _a !== void 0 ? _a : false;
|
2497
|
+
message.trackPermissions = [];
|
2498
|
+
if (object.trackPermissions !== undefined &&
|
2499
|
+
object.trackPermissions !== null) {
|
2500
|
+
for (const e of object.trackPermissions) {
|
2501
|
+
message.trackPermissions.push(exports.TrackPermission.fromPartial(e));
|
2502
|
+
}
|
2503
|
+
}
|
2504
|
+
return message;
|
2505
|
+
},
|
2506
|
+
};
|
2507
|
+
const baseSubscriptionPermissionUpdate = {
|
2508
|
+
participantSid: "",
|
2509
|
+
trackSid: "",
|
2510
|
+
allowed: false,
|
2511
|
+
};
|
2512
|
+
exports.SubscriptionPermissionUpdate = {
|
2513
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2514
|
+
if (message.participantSid !== "") {
|
2515
|
+
writer.uint32(10).string(message.participantSid);
|
2516
|
+
}
|
2517
|
+
if (message.trackSid !== "") {
|
2518
|
+
writer.uint32(18).string(message.trackSid);
|
2519
|
+
}
|
2520
|
+
if (message.allowed === true) {
|
2521
|
+
writer.uint32(24).bool(message.allowed);
|
2522
|
+
}
|
2523
|
+
return writer;
|
2524
|
+
},
|
2525
|
+
decode(input, length) {
|
2526
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2527
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2528
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2529
|
+
while (reader.pos < end) {
|
2530
|
+
const tag = reader.uint32();
|
2531
|
+
switch (tag >>> 3) {
|
2532
|
+
case 1:
|
2533
|
+
message.participantSid = reader.string();
|
2534
|
+
break;
|
2535
|
+
case 2:
|
2536
|
+
message.trackSid = reader.string();
|
2537
|
+
break;
|
2538
|
+
case 3:
|
2539
|
+
message.allowed = reader.bool();
|
2540
|
+
break;
|
2541
|
+
default:
|
2542
|
+
reader.skipType(tag & 7);
|
2543
|
+
break;
|
2544
|
+
}
|
2545
|
+
}
|
2546
|
+
return message;
|
2547
|
+
},
|
2548
|
+
fromJSON(object) {
|
2549
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2550
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2551
|
+
message.participantSid = String(object.participantSid);
|
2552
|
+
}
|
2553
|
+
else {
|
2554
|
+
message.participantSid = "";
|
2555
|
+
}
|
2556
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2557
|
+
message.trackSid = String(object.trackSid);
|
2558
|
+
}
|
2559
|
+
else {
|
2560
|
+
message.trackSid = "";
|
2561
|
+
}
|
2562
|
+
if (object.allowed !== undefined && object.allowed !== null) {
|
2563
|
+
message.allowed = Boolean(object.allowed);
|
2564
|
+
}
|
2565
|
+
else {
|
2566
|
+
message.allowed = false;
|
2567
|
+
}
|
2568
|
+
return message;
|
2569
|
+
},
|
2570
|
+
toJSON(message) {
|
2571
|
+
const obj = {};
|
2572
|
+
message.participantSid !== undefined &&
|
2573
|
+
(obj.participantSid = message.participantSid);
|
2574
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2575
|
+
message.allowed !== undefined && (obj.allowed = message.allowed);
|
2576
|
+
return obj;
|
2577
|
+
},
|
2578
|
+
fromPartial(object) {
|
2579
|
+
var _a, _b, _c;
|
2580
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2581
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2582
|
+
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2583
|
+
message.allowed = (_c = object.allowed) !== null && _c !== void 0 ? _c : false;
|
2584
|
+
return message;
|
2585
|
+
},
|
2586
|
+
};
|
2587
|
+
const baseSyncState = {};
|
2588
|
+
exports.SyncState = {
|
2589
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2590
|
+
if (message.answer !== undefined) {
|
2591
|
+
exports.SessionDescription.encode(message.answer, writer.uint32(10).fork()).ldelim();
|
2592
|
+
}
|
2593
|
+
if (message.subscription !== undefined) {
|
2594
|
+
exports.UpdateSubscription.encode(message.subscription, writer.uint32(18).fork()).ldelim();
|
2595
|
+
}
|
2596
|
+
for (const v of message.publishTracks) {
|
2597
|
+
exports.TrackPublishedResponse.encode(v, writer.uint32(26).fork()).ldelim();
|
2598
|
+
}
|
2599
|
+
return writer;
|
2600
|
+
},
|
2601
|
+
decode(input, length) {
|
2602
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2603
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2604
|
+
const message = Object.assign({}, baseSyncState);
|
2605
|
+
message.publishTracks = [];
|
2606
|
+
while (reader.pos < end) {
|
2607
|
+
const tag = reader.uint32();
|
2608
|
+
switch (tag >>> 3) {
|
2609
|
+
case 1:
|
2610
|
+
message.answer = exports.SessionDescription.decode(reader, reader.uint32());
|
2611
|
+
break;
|
2612
|
+
case 2:
|
2613
|
+
message.subscription = exports.UpdateSubscription.decode(reader, reader.uint32());
|
2614
|
+
break;
|
2615
|
+
case 3:
|
2616
|
+
message.publishTracks.push(exports.TrackPublishedResponse.decode(reader, reader.uint32()));
|
2617
|
+
break;
|
2618
|
+
default:
|
2619
|
+
reader.skipType(tag & 7);
|
2620
|
+
break;
|
2621
|
+
}
|
2622
|
+
}
|
2623
|
+
return message;
|
2624
|
+
},
|
2625
|
+
fromJSON(object) {
|
2626
|
+
const message = Object.assign({}, baseSyncState);
|
2627
|
+
message.publishTracks = [];
|
2628
|
+
if (object.answer !== undefined && object.answer !== null) {
|
2629
|
+
message.answer = exports.SessionDescription.fromJSON(object.answer);
|
2630
|
+
}
|
2631
|
+
else {
|
2632
|
+
message.answer = undefined;
|
2633
|
+
}
|
2634
|
+
if (object.subscription !== undefined && object.subscription !== null) {
|
2635
|
+
message.subscription = exports.UpdateSubscription.fromJSON(object.subscription);
|
2636
|
+
}
|
2637
|
+
else {
|
2638
|
+
message.subscription = undefined;
|
2639
|
+
}
|
2640
|
+
if (object.publishTracks !== undefined && object.publishTracks !== null) {
|
2641
|
+
for (const e of object.publishTracks) {
|
2642
|
+
message.publishTracks.push(exports.TrackPublishedResponse.fromJSON(e));
|
2643
|
+
}
|
2644
|
+
}
|
2645
|
+
return message;
|
2646
|
+
},
|
2647
|
+
toJSON(message) {
|
2648
|
+
const obj = {};
|
2649
|
+
message.answer !== undefined &&
|
2650
|
+
(obj.answer = message.answer
|
2651
|
+
? exports.SessionDescription.toJSON(message.answer)
|
2652
|
+
: undefined);
|
2653
|
+
message.subscription !== undefined &&
|
2654
|
+
(obj.subscription = message.subscription
|
2655
|
+
? exports.UpdateSubscription.toJSON(message.subscription)
|
2656
|
+
: undefined);
|
2657
|
+
if (message.publishTracks) {
|
2658
|
+
obj.publishTracks = message.publishTracks.map((e) => e ? exports.TrackPublishedResponse.toJSON(e) : undefined);
|
2659
|
+
}
|
2660
|
+
else {
|
2661
|
+
obj.publishTracks = [];
|
2662
|
+
}
|
2663
|
+
return obj;
|
2664
|
+
},
|
2665
|
+
fromPartial(object) {
|
2666
|
+
const message = Object.assign({}, baseSyncState);
|
2667
|
+
if (object.answer !== undefined && object.answer !== null) {
|
2668
|
+
message.answer = exports.SessionDescription.fromPartial(object.answer);
|
2669
|
+
}
|
2670
|
+
else {
|
2671
|
+
message.answer = undefined;
|
2672
|
+
}
|
2673
|
+
if (object.subscription !== undefined && object.subscription !== null) {
|
2674
|
+
message.subscription = exports.UpdateSubscription.fromPartial(object.subscription);
|
2675
|
+
}
|
2676
|
+
else {
|
2677
|
+
message.subscription = undefined;
|
2678
|
+
}
|
2679
|
+
message.publishTracks = [];
|
2680
|
+
if (object.publishTracks !== undefined && object.publishTracks !== null) {
|
2681
|
+
for (const e of object.publishTracks) {
|
2682
|
+
message.publishTracks.push(exports.TrackPublishedResponse.fromPartial(e));
|
2683
|
+
}
|
2684
|
+
}
|
2685
|
+
return message;
|
2686
|
+
},
|
2687
|
+
};
|
2688
|
+
const baseSimulateScenario = {};
|
2689
|
+
exports.SimulateScenario = {
|
2690
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2691
|
+
if (message.speakerUpdate !== undefined) {
|
2692
|
+
writer.uint32(8).int32(message.speakerUpdate);
|
2693
|
+
}
|
2694
|
+
if (message.nodeFailure !== undefined) {
|
2695
|
+
writer.uint32(16).bool(message.nodeFailure);
|
2696
|
+
}
|
2697
|
+
if (message.migration !== undefined) {
|
2698
|
+
writer.uint32(24).bool(message.migration);
|
2699
|
+
}
|
2700
|
+
if (message.serverLeave !== undefined) {
|
2701
|
+
writer.uint32(32).bool(message.serverLeave);
|
2702
|
+
}
|
2703
|
+
return writer;
|
2704
|
+
},
|
2705
|
+
decode(input, length) {
|
2706
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2707
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2708
|
+
const message = Object.assign({}, baseSimulateScenario);
|
2709
|
+
while (reader.pos < end) {
|
2710
|
+
const tag = reader.uint32();
|
2711
|
+
switch (tag >>> 3) {
|
2712
|
+
case 1:
|
2713
|
+
message.speakerUpdate = reader.int32();
|
2714
|
+
break;
|
2715
|
+
case 2:
|
2716
|
+
message.nodeFailure = reader.bool();
|
2717
|
+
break;
|
2718
|
+
case 3:
|
2719
|
+
message.migration = reader.bool();
|
2720
|
+
break;
|
2721
|
+
case 4:
|
2722
|
+
message.serverLeave = reader.bool();
|
2723
|
+
break;
|
2724
|
+
default:
|
2725
|
+
reader.skipType(tag & 7);
|
2726
|
+
break;
|
2727
|
+
}
|
2728
|
+
}
|
2729
|
+
return message;
|
2730
|
+
},
|
2731
|
+
fromJSON(object) {
|
2732
|
+
const message = Object.assign({}, baseSimulateScenario);
|
2733
|
+
if (object.speakerUpdate !== undefined && object.speakerUpdate !== null) {
|
2734
|
+
message.speakerUpdate = Number(object.speakerUpdate);
|
2735
|
+
}
|
2736
|
+
else {
|
2737
|
+
message.speakerUpdate = undefined;
|
2738
|
+
}
|
2739
|
+
if (object.nodeFailure !== undefined && object.nodeFailure !== null) {
|
2740
|
+
message.nodeFailure = Boolean(object.nodeFailure);
|
2741
|
+
}
|
2742
|
+
else {
|
2743
|
+
message.nodeFailure = undefined;
|
2744
|
+
}
|
2745
|
+
if (object.migration !== undefined && object.migration !== null) {
|
2746
|
+
message.migration = Boolean(object.migration);
|
2747
|
+
}
|
2748
|
+
else {
|
2749
|
+
message.migration = undefined;
|
2750
|
+
}
|
2751
|
+
if (object.serverLeave !== undefined && object.serverLeave !== null) {
|
2752
|
+
message.serverLeave = Boolean(object.serverLeave);
|
2753
|
+
}
|
2754
|
+
else {
|
2755
|
+
message.serverLeave = undefined;
|
2756
|
+
}
|
2757
|
+
return message;
|
2758
|
+
},
|
2759
|
+
toJSON(message) {
|
2760
|
+
const obj = {};
|
2761
|
+
message.speakerUpdate !== undefined &&
|
2762
|
+
(obj.speakerUpdate = message.speakerUpdate);
|
2763
|
+
message.nodeFailure !== undefined &&
|
2764
|
+
(obj.nodeFailure = message.nodeFailure);
|
2765
|
+
message.migration !== undefined && (obj.migration = message.migration);
|
2766
|
+
message.serverLeave !== undefined &&
|
2767
|
+
(obj.serverLeave = message.serverLeave);
|
2768
|
+
return obj;
|
2769
|
+
},
|
2770
|
+
fromPartial(object) {
|
2771
|
+
var _a, _b, _c, _d;
|
2772
|
+
const message = Object.assign({}, baseSimulateScenario);
|
2773
|
+
message.speakerUpdate = (_a = object.speakerUpdate) !== null && _a !== void 0 ? _a : undefined;
|
2774
|
+
message.nodeFailure = (_b = object.nodeFailure) !== null && _b !== void 0 ? _b : undefined;
|
2775
|
+
message.migration = (_c = object.migration) !== null && _c !== void 0 ? _c : undefined;
|
2776
|
+
message.serverLeave = (_d = object.serverLeave) !== null && _d !== void 0 ? _d : undefined;
|
2777
|
+
return message;
|
2778
|
+
},
|
2779
|
+
};
|
1763
2780
|
if (minimal_1.default.util.Long !== long_1.default) {
|
1764
2781
|
minimal_1.default.util.Long = long_1.default;
|
1765
2782
|
minimal_1.default.configure();
|