livekit-client 0.14.2 → 0.15.2
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 +7 -32
- package/dist/api/SignalClient.js +37 -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 +3 -3
- package/dist/index.js +4 -3
- 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 +42 -1
- package/dist/proto/livekit_models.js +292 -4
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +115 -7
- package/dist/proto/livekit_rtc.js +810 -30
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/RTCEngine.d.ts +4 -2
- package/dist/room/RTCEngine.js +31 -35
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +16 -17
- package/dist/room/Room.js +125 -77
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +115 -6
- package/dist/room/events.js +114 -5
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +29 -11
- package/dist/room/participant/LocalParticipant.js +209 -160
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +2 -0
- package/dist/room/participant/Participant.js +3 -1
- package/dist/room/participant/Participant.js.map +1 -1
- package/dist/room/participant/RemoteParticipant.d.ts +1 -1
- package/dist/room/participant/RemoteParticipant.js +6 -5
- 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 +4 -3
- package/dist/room/track/LocalTrack.js +6 -48
- package/dist/room/track/LocalTrack.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.d.ts +14 -5
- package/dist/room/track/LocalVideoTrack.js +154 -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 +7 -0
- package/dist/room/track/RemoteAudioTrack.js +61 -0
- package/dist/room/track/RemoteAudioTrack.js.map +1 -1
- package/dist/room/track/RemoteTrackPublication.d.ts +2 -3
- package/dist/room/track/RemoteTrackPublication.js +12 -10
- package/dist/room/track/RemoteTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.d.ts +10 -6
- package/dist/room/track/RemoteVideoTrack.js +97 -44
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.d.ts +10 -2
- package/dist/room/track/Track.js +29 -2
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/TrackPublication.d.ts +2 -0
- package/dist/room/track/TrackPublication.js +1 -0
- 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 +7 -1
- package/dist/room/utils.js +29 -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 +194 -178
- package/example/sample.ts +454 -325
- 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.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,12 @@ 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
109
|
return writer;
|
110
110
|
},
|
111
111
|
decode(input, length) {
|
@@ -139,6 +139,13 @@ exports.SignalRequest = {
|
|
139
139
|
case 8:
|
140
140
|
message.leave = exports.LeaveRequest.decode(reader, reader.uint32());
|
141
141
|
break;
|
142
|
+
case 10:
|
143
|
+
message.updateLayers = exports.UpdateVideoLayers.decode(reader, reader.uint32());
|
144
|
+
break;
|
145
|
+
case 11:
|
146
|
+
message.subscriptionPermissions =
|
147
|
+
exports.UpdateSubscriptionPermissions.decode(reader, reader.uint32());
|
148
|
+
break;
|
142
149
|
default:
|
143
150
|
reader.skipType(tag & 7);
|
144
151
|
break;
|
@@ -196,6 +203,19 @@ exports.SignalRequest = {
|
|
196
203
|
else {
|
197
204
|
message.leave = undefined;
|
198
205
|
}
|
206
|
+
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
207
|
+
message.updateLayers = exports.UpdateVideoLayers.fromJSON(object.updateLayers);
|
208
|
+
}
|
209
|
+
else {
|
210
|
+
message.updateLayers = undefined;
|
211
|
+
}
|
212
|
+
if (object.subscriptionPermissions !== undefined &&
|
213
|
+
object.subscriptionPermissions !== null) {
|
214
|
+
message.subscriptionPermissions = exports.UpdateSubscriptionPermissions.fromJSON(object.subscriptionPermissions);
|
215
|
+
}
|
216
|
+
else {
|
217
|
+
message.subscriptionPermissions = undefined;
|
218
|
+
}
|
199
219
|
return message;
|
200
220
|
},
|
201
221
|
toJSON(message) {
|
@@ -232,6 +252,14 @@ exports.SignalRequest = {
|
|
232
252
|
(obj.leave = message.leave
|
233
253
|
? exports.LeaveRequest.toJSON(message.leave)
|
234
254
|
: undefined);
|
255
|
+
message.updateLayers !== undefined &&
|
256
|
+
(obj.updateLayers = message.updateLayers
|
257
|
+
? exports.UpdateVideoLayers.toJSON(message.updateLayers)
|
258
|
+
: undefined);
|
259
|
+
message.subscriptionPermissions !== undefined &&
|
260
|
+
(obj.subscriptionPermissions = message.subscriptionPermissions
|
261
|
+
? exports.UpdateSubscriptionPermissions.toJSON(message.subscriptionPermissions)
|
262
|
+
: undefined);
|
235
263
|
return obj;
|
236
264
|
},
|
237
265
|
fromPartial(object) {
|
@@ -284,6 +312,20 @@ exports.SignalRequest = {
|
|
284
312
|
else {
|
285
313
|
message.leave = undefined;
|
286
314
|
}
|
315
|
+
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
316
|
+
message.updateLayers = exports.UpdateVideoLayers.fromPartial(object.updateLayers);
|
317
|
+
}
|
318
|
+
else {
|
319
|
+
message.updateLayers = undefined;
|
320
|
+
}
|
321
|
+
if (object.subscriptionPermissions !== undefined &&
|
322
|
+
object.subscriptionPermissions !== null) {
|
323
|
+
message.subscriptionPermissions =
|
324
|
+
exports.UpdateSubscriptionPermissions.fromPartial(object.subscriptionPermissions);
|
325
|
+
}
|
326
|
+
else {
|
327
|
+
message.subscriptionPermissions = undefined;
|
328
|
+
}
|
287
329
|
return message;
|
288
330
|
},
|
289
331
|
};
|
@@ -323,6 +365,15 @@ exports.SignalResponse = {
|
|
323
365
|
if (message.connectionQuality !== undefined) {
|
324
366
|
exports.ConnectionQualityUpdate.encode(message.connectionQuality, writer.uint32(98).fork()).ldelim();
|
325
367
|
}
|
368
|
+
if (message.streamStateUpdate !== undefined) {
|
369
|
+
exports.StreamStateUpdate.encode(message.streamStateUpdate, writer.uint32(106).fork()).ldelim();
|
370
|
+
}
|
371
|
+
if (message.subscribedQualityUpdate !== undefined) {
|
372
|
+
exports.SubscribedQualityUpdate.encode(message.subscribedQualityUpdate, writer.uint32(114).fork()).ldelim();
|
373
|
+
}
|
374
|
+
if (message.subscriptionPermissionUpdate !== undefined) {
|
375
|
+
exports.SubscriptionPermissionUpdate.encode(message.subscriptionPermissionUpdate, writer.uint32(122).fork()).ldelim();
|
376
|
+
}
|
326
377
|
return writer;
|
327
378
|
},
|
328
379
|
decode(input, length) {
|
@@ -365,6 +416,16 @@ exports.SignalResponse = {
|
|
365
416
|
case 12:
|
366
417
|
message.connectionQuality = exports.ConnectionQualityUpdate.decode(reader, reader.uint32());
|
367
418
|
break;
|
419
|
+
case 13:
|
420
|
+
message.streamStateUpdate = exports.StreamStateUpdate.decode(reader, reader.uint32());
|
421
|
+
break;
|
422
|
+
case 14:
|
423
|
+
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.decode(reader, reader.uint32());
|
424
|
+
break;
|
425
|
+
case 15:
|
426
|
+
message.subscriptionPermissionUpdate =
|
427
|
+
exports.SubscriptionPermissionUpdate.decode(reader, reader.uint32());
|
428
|
+
break;
|
368
429
|
default:
|
369
430
|
reader.skipType(tag & 7);
|
370
431
|
break;
|
@@ -442,6 +503,28 @@ exports.SignalResponse = {
|
|
442
503
|
else {
|
443
504
|
message.connectionQuality = undefined;
|
444
505
|
}
|
506
|
+
if (object.streamStateUpdate !== undefined &&
|
507
|
+
object.streamStateUpdate !== null) {
|
508
|
+
message.streamStateUpdate = exports.StreamStateUpdate.fromJSON(object.streamStateUpdate);
|
509
|
+
}
|
510
|
+
else {
|
511
|
+
message.streamStateUpdate = undefined;
|
512
|
+
}
|
513
|
+
if (object.subscribedQualityUpdate !== undefined &&
|
514
|
+
object.subscribedQualityUpdate !== null) {
|
515
|
+
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate);
|
516
|
+
}
|
517
|
+
else {
|
518
|
+
message.subscribedQualityUpdate = undefined;
|
519
|
+
}
|
520
|
+
if (object.subscriptionPermissionUpdate !== undefined &&
|
521
|
+
object.subscriptionPermissionUpdate !== null) {
|
522
|
+
message.subscriptionPermissionUpdate =
|
523
|
+
exports.SubscriptionPermissionUpdate.fromJSON(object.subscriptionPermissionUpdate);
|
524
|
+
}
|
525
|
+
else {
|
526
|
+
message.subscriptionPermissionUpdate = undefined;
|
527
|
+
}
|
445
528
|
return message;
|
446
529
|
},
|
447
530
|
toJSON(message) {
|
@@ -488,6 +571,18 @@ exports.SignalResponse = {
|
|
488
571
|
(obj.connectionQuality = message.connectionQuality
|
489
572
|
? exports.ConnectionQualityUpdate.toJSON(message.connectionQuality)
|
490
573
|
: undefined);
|
574
|
+
message.streamStateUpdate !== undefined &&
|
575
|
+
(obj.streamStateUpdate = message.streamStateUpdate
|
576
|
+
? exports.StreamStateUpdate.toJSON(message.streamStateUpdate)
|
577
|
+
: undefined);
|
578
|
+
message.subscribedQualityUpdate !== undefined &&
|
579
|
+
(obj.subscribedQualityUpdate = message.subscribedQualityUpdate
|
580
|
+
? exports.SubscribedQualityUpdate.toJSON(message.subscribedQualityUpdate)
|
581
|
+
: undefined);
|
582
|
+
message.subscriptionPermissionUpdate !== undefined &&
|
583
|
+
(obj.subscriptionPermissionUpdate = message.subscriptionPermissionUpdate
|
584
|
+
? exports.SubscriptionPermissionUpdate.toJSON(message.subscriptionPermissionUpdate)
|
585
|
+
: undefined);
|
491
586
|
return obj;
|
492
587
|
},
|
493
588
|
fromPartial(object) {
|
@@ -560,6 +655,28 @@ exports.SignalResponse = {
|
|
560
655
|
else {
|
561
656
|
message.connectionQuality = undefined;
|
562
657
|
}
|
658
|
+
if (object.streamStateUpdate !== undefined &&
|
659
|
+
object.streamStateUpdate !== null) {
|
660
|
+
message.streamStateUpdate = exports.StreamStateUpdate.fromPartial(object.streamStateUpdate);
|
661
|
+
}
|
662
|
+
else {
|
663
|
+
message.streamStateUpdate = undefined;
|
664
|
+
}
|
665
|
+
if (object.subscribedQualityUpdate !== undefined &&
|
666
|
+
object.subscribedQualityUpdate !== null) {
|
667
|
+
message.subscribedQualityUpdate = exports.SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate);
|
668
|
+
}
|
669
|
+
else {
|
670
|
+
message.subscribedQualityUpdate = undefined;
|
671
|
+
}
|
672
|
+
if (object.subscriptionPermissionUpdate !== undefined &&
|
673
|
+
object.subscriptionPermissionUpdate !== null) {
|
674
|
+
message.subscriptionPermissionUpdate =
|
675
|
+
exports.SubscriptionPermissionUpdate.fromPartial(object.subscriptionPermissionUpdate);
|
676
|
+
}
|
677
|
+
else {
|
678
|
+
message.subscriptionPermissionUpdate = undefined;
|
679
|
+
}
|
563
680
|
return message;
|
564
681
|
},
|
565
682
|
};
|
@@ -599,12 +716,16 @@ exports.AddTrackRequest = {
|
|
599
716
|
if (message.source !== 0) {
|
600
717
|
writer.uint32(64).int32(message.source);
|
601
718
|
}
|
719
|
+
for (const v of message.layers) {
|
720
|
+
livekit_models_1.VideoLayer.encode(v, writer.uint32(74).fork()).ldelim();
|
721
|
+
}
|
602
722
|
return writer;
|
603
723
|
},
|
604
724
|
decode(input, length) {
|
605
725
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
606
726
|
let end = length === undefined ? reader.len : reader.pos + length;
|
607
727
|
const message = Object.assign({}, baseAddTrackRequest);
|
728
|
+
message.layers = [];
|
608
729
|
while (reader.pos < end) {
|
609
730
|
const tag = reader.uint32();
|
610
731
|
switch (tag >>> 3) {
|
@@ -632,6 +753,9 @@ exports.AddTrackRequest = {
|
|
632
753
|
case 8:
|
633
754
|
message.source = reader.int32();
|
634
755
|
break;
|
756
|
+
case 9:
|
757
|
+
message.layers.push(livekit_models_1.VideoLayer.decode(reader, reader.uint32()));
|
758
|
+
break;
|
635
759
|
default:
|
636
760
|
reader.skipType(tag & 7);
|
637
761
|
break;
|
@@ -641,6 +765,7 @@ exports.AddTrackRequest = {
|
|
641
765
|
},
|
642
766
|
fromJSON(object) {
|
643
767
|
const message = Object.assign({}, baseAddTrackRequest);
|
768
|
+
message.layers = [];
|
644
769
|
if (object.cid !== undefined && object.cid !== null) {
|
645
770
|
message.cid = String(object.cid);
|
646
771
|
}
|
@@ -689,6 +814,11 @@ exports.AddTrackRequest = {
|
|
689
814
|
else {
|
690
815
|
message.source = 0;
|
691
816
|
}
|
817
|
+
if (object.layers !== undefined && object.layers !== null) {
|
818
|
+
for (const e of object.layers) {
|
819
|
+
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
820
|
+
}
|
821
|
+
}
|
692
822
|
return message;
|
693
823
|
},
|
694
824
|
toJSON(message) {
|
@@ -702,6 +832,12 @@ exports.AddTrackRequest = {
|
|
702
832
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
703
833
|
message.source !== undefined &&
|
704
834
|
(obj.source = livekit_models_1.trackSourceToJSON(message.source));
|
835
|
+
if (message.layers) {
|
836
|
+
obj.layers = message.layers.map((e) => e ? livekit_models_1.VideoLayer.toJSON(e) : undefined);
|
837
|
+
}
|
838
|
+
else {
|
839
|
+
obj.layers = [];
|
840
|
+
}
|
705
841
|
return obj;
|
706
842
|
},
|
707
843
|
fromPartial(object) {
|
@@ -715,6 +851,12 @@ exports.AddTrackRequest = {
|
|
715
851
|
message.muted = (_f = object.muted) !== null && _f !== void 0 ? _f : false;
|
716
852
|
message.disableDtx = (_g = object.disableDtx) !== null && _g !== void 0 ? _g : false;
|
717
853
|
message.source = (_h = object.source) !== null && _h !== void 0 ? _h : 0;
|
854
|
+
message.layers = [];
|
855
|
+
if (object.layers !== undefined && object.layers !== null) {
|
856
|
+
for (const e of object.layers) {
|
857
|
+
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
858
|
+
}
|
859
|
+
}
|
718
860
|
return message;
|
719
861
|
},
|
720
862
|
};
|
@@ -1213,6 +1355,9 @@ exports.UpdateSubscription = {
|
|
1213
1355
|
if (message.subscribe === true) {
|
1214
1356
|
writer.uint32(16).bool(message.subscribe);
|
1215
1357
|
}
|
1358
|
+
for (const v of message.participantTracks) {
|
1359
|
+
livekit_models_1.ParticipantTracks.encode(v, writer.uint32(26).fork()).ldelim();
|
1360
|
+
}
|
1216
1361
|
return writer;
|
1217
1362
|
},
|
1218
1363
|
decode(input, length) {
|
@@ -1220,6 +1365,7 @@ exports.UpdateSubscription = {
|
|
1220
1365
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1221
1366
|
const message = Object.assign({}, baseUpdateSubscription);
|
1222
1367
|
message.trackSids = [];
|
1368
|
+
message.participantTracks = [];
|
1223
1369
|
while (reader.pos < end) {
|
1224
1370
|
const tag = reader.uint32();
|
1225
1371
|
switch (tag >>> 3) {
|
@@ -1229,6 +1375,9 @@ exports.UpdateSubscription = {
|
|
1229
1375
|
case 2:
|
1230
1376
|
message.subscribe = reader.bool();
|
1231
1377
|
break;
|
1378
|
+
case 3:
|
1379
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.decode(reader, reader.uint32()));
|
1380
|
+
break;
|
1232
1381
|
default:
|
1233
1382
|
reader.skipType(tag & 7);
|
1234
1383
|
break;
|
@@ -1239,6 +1388,7 @@ exports.UpdateSubscription = {
|
|
1239
1388
|
fromJSON(object) {
|
1240
1389
|
const message = Object.assign({}, baseUpdateSubscription);
|
1241
1390
|
message.trackSids = [];
|
1391
|
+
message.participantTracks = [];
|
1242
1392
|
if (object.trackSids !== undefined && object.trackSids !== null) {
|
1243
1393
|
for (const e of object.trackSids) {
|
1244
1394
|
message.trackSids.push(String(e));
|
@@ -1250,6 +1400,12 @@ exports.UpdateSubscription = {
|
|
1250
1400
|
else {
|
1251
1401
|
message.subscribe = false;
|
1252
1402
|
}
|
1403
|
+
if (object.participantTracks !== undefined &&
|
1404
|
+
object.participantTracks !== null) {
|
1405
|
+
for (const e of object.participantTracks) {
|
1406
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromJSON(e));
|
1407
|
+
}
|
1408
|
+
}
|
1253
1409
|
return message;
|
1254
1410
|
},
|
1255
1411
|
toJSON(message) {
|
@@ -1261,6 +1417,12 @@ exports.UpdateSubscription = {
|
|
1261
1417
|
obj.trackSids = [];
|
1262
1418
|
}
|
1263
1419
|
message.subscribe !== undefined && (obj.subscribe = message.subscribe);
|
1420
|
+
if (message.participantTracks) {
|
1421
|
+
obj.participantTracks = message.participantTracks.map((e) => e ? livekit_models_1.ParticipantTracks.toJSON(e) : undefined);
|
1422
|
+
}
|
1423
|
+
else {
|
1424
|
+
obj.participantTracks = [];
|
1425
|
+
}
|
1264
1426
|
return obj;
|
1265
1427
|
},
|
1266
1428
|
fromPartial(object) {
|
@@ -1273,6 +1435,13 @@ exports.UpdateSubscription = {
|
|
1273
1435
|
}
|
1274
1436
|
}
|
1275
1437
|
message.subscribe = (_a = object.subscribe) !== null && _a !== void 0 ? _a : false;
|
1438
|
+
message.participantTracks = [];
|
1439
|
+
if (object.participantTracks !== undefined &&
|
1440
|
+
object.participantTracks !== null) {
|
1441
|
+
for (const e of object.participantTracks) {
|
1442
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.fromPartial(e));
|
1443
|
+
}
|
1444
|
+
}
|
1276
1445
|
return message;
|
1277
1446
|
},
|
1278
1447
|
};
|
@@ -1347,7 +1516,7 @@ exports.UpdateTrackSettings = {
|
|
1347
1516
|
message.disabled = false;
|
1348
1517
|
}
|
1349
1518
|
if (object.quality !== undefined && object.quality !== null) {
|
1350
|
-
message.quality = videoQualityFromJSON(object.quality);
|
1519
|
+
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
1351
1520
|
}
|
1352
1521
|
else {
|
1353
1522
|
message.quality = 0;
|
@@ -1376,7 +1545,7 @@ exports.UpdateTrackSettings = {
|
|
1376
1545
|
}
|
1377
1546
|
message.disabled !== undefined && (obj.disabled = message.disabled);
|
1378
1547
|
message.quality !== undefined &&
|
1379
|
-
(obj.quality = videoQualityToJSON(message.quality));
|
1548
|
+
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
1380
1549
|
message.width !== undefined && (obj.width = message.width);
|
1381
1550
|
message.height !== undefined && (obj.height = message.height);
|
1382
1551
|
return obj;
|
@@ -1445,6 +1614,78 @@ exports.LeaveRequest = {
|
|
1445
1614
|
return message;
|
1446
1615
|
},
|
1447
1616
|
};
|
1617
|
+
const baseUpdateVideoLayers = { trackSid: "" };
|
1618
|
+
exports.UpdateVideoLayers = {
|
1619
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
1620
|
+
if (message.trackSid !== "") {
|
1621
|
+
writer.uint32(10).string(message.trackSid);
|
1622
|
+
}
|
1623
|
+
for (const v of message.layers) {
|
1624
|
+
livekit_models_1.VideoLayer.encode(v, writer.uint32(18).fork()).ldelim();
|
1625
|
+
}
|
1626
|
+
return writer;
|
1627
|
+
},
|
1628
|
+
decode(input, length) {
|
1629
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
1630
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1631
|
+
const message = Object.assign({}, baseUpdateVideoLayers);
|
1632
|
+
message.layers = [];
|
1633
|
+
while (reader.pos < end) {
|
1634
|
+
const tag = reader.uint32();
|
1635
|
+
switch (tag >>> 3) {
|
1636
|
+
case 1:
|
1637
|
+
message.trackSid = reader.string();
|
1638
|
+
break;
|
1639
|
+
case 2:
|
1640
|
+
message.layers.push(livekit_models_1.VideoLayer.decode(reader, reader.uint32()));
|
1641
|
+
break;
|
1642
|
+
default:
|
1643
|
+
reader.skipType(tag & 7);
|
1644
|
+
break;
|
1645
|
+
}
|
1646
|
+
}
|
1647
|
+
return message;
|
1648
|
+
},
|
1649
|
+
fromJSON(object) {
|
1650
|
+
const message = Object.assign({}, baseUpdateVideoLayers);
|
1651
|
+
message.layers = [];
|
1652
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
1653
|
+
message.trackSid = String(object.trackSid);
|
1654
|
+
}
|
1655
|
+
else {
|
1656
|
+
message.trackSid = "";
|
1657
|
+
}
|
1658
|
+
if (object.layers !== undefined && object.layers !== null) {
|
1659
|
+
for (const e of object.layers) {
|
1660
|
+
message.layers.push(livekit_models_1.VideoLayer.fromJSON(e));
|
1661
|
+
}
|
1662
|
+
}
|
1663
|
+
return message;
|
1664
|
+
},
|
1665
|
+
toJSON(message) {
|
1666
|
+
const obj = {};
|
1667
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
1668
|
+
if (message.layers) {
|
1669
|
+
obj.layers = message.layers.map((e) => e ? livekit_models_1.VideoLayer.toJSON(e) : undefined);
|
1670
|
+
}
|
1671
|
+
else {
|
1672
|
+
obj.layers = [];
|
1673
|
+
}
|
1674
|
+
return obj;
|
1675
|
+
},
|
1676
|
+
fromPartial(object) {
|
1677
|
+
var _a;
|
1678
|
+
const message = Object.assign({}, baseUpdateVideoLayers);
|
1679
|
+
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
1680
|
+
message.layers = [];
|
1681
|
+
if (object.layers !== undefined && object.layers !== null) {
|
1682
|
+
for (const e of object.layers) {
|
1683
|
+
message.layers.push(livekit_models_1.VideoLayer.fromPartial(e));
|
1684
|
+
}
|
1685
|
+
}
|
1686
|
+
return message;
|
1687
|
+
},
|
1688
|
+
};
|
1448
1689
|
const baseICEServer = { urls: "", username: "", credential: "" };
|
1449
1690
|
exports.ICEServer = {
|
1450
1691
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -1640,7 +1881,11 @@ exports.RoomUpdate = {
|
|
1640
1881
|
return message;
|
1641
1882
|
},
|
1642
1883
|
};
|
1643
|
-
const baseConnectionQualityInfo = {
|
1884
|
+
const baseConnectionQualityInfo = {
|
1885
|
+
participantSid: "",
|
1886
|
+
quality: 0,
|
1887
|
+
score: 0,
|
1888
|
+
};
|
1644
1889
|
exports.ConnectionQualityInfo = {
|
1645
1890
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
1646
1891
|
if (message.participantSid !== "") {
|
@@ -1649,6 +1894,9 @@ exports.ConnectionQualityInfo = {
|
|
1649
1894
|
if (message.quality !== 0) {
|
1650
1895
|
writer.uint32(16).int32(message.quality);
|
1651
1896
|
}
|
1897
|
+
if (message.score !== 0) {
|
1898
|
+
writer.uint32(29).float(message.score);
|
1899
|
+
}
|
1652
1900
|
return writer;
|
1653
1901
|
},
|
1654
1902
|
decode(input, length) {
|
@@ -1664,6 +1912,9 @@ exports.ConnectionQualityInfo = {
|
|
1664
1912
|
case 2:
|
1665
1913
|
message.quality = reader.int32();
|
1666
1914
|
break;
|
1915
|
+
case 3:
|
1916
|
+
message.score = reader.float();
|
1917
|
+
break;
|
1667
1918
|
default:
|
1668
1919
|
reader.skipType(tag & 7);
|
1669
1920
|
break;
|
@@ -1685,6 +1936,12 @@ exports.ConnectionQualityInfo = {
|
|
1685
1936
|
else {
|
1686
1937
|
message.quality = 0;
|
1687
1938
|
}
|
1939
|
+
if (object.score !== undefined && object.score !== null) {
|
1940
|
+
message.score = Number(object.score);
|
1941
|
+
}
|
1942
|
+
else {
|
1943
|
+
message.score = 0;
|
1944
|
+
}
|
1688
1945
|
return message;
|
1689
1946
|
},
|
1690
1947
|
toJSON(message) {
|
@@ -1693,13 +1950,15 @@ exports.ConnectionQualityInfo = {
|
|
1693
1950
|
(obj.participantSid = message.participantSid);
|
1694
1951
|
message.quality !== undefined &&
|
1695
1952
|
(obj.quality = livekit_models_1.connectionQualityToJSON(message.quality));
|
1953
|
+
message.score !== undefined && (obj.score = message.score);
|
1696
1954
|
return obj;
|
1697
1955
|
},
|
1698
1956
|
fromPartial(object) {
|
1699
|
-
var _a, _b;
|
1957
|
+
var _a, _b, _c;
|
1700
1958
|
const message = Object.assign({}, baseConnectionQualityInfo);
|
1701
1959
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
1702
1960
|
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
1961
|
+
message.score = (_c = object.score) !== null && _c !== void 0 ? _c : 0;
|
1703
1962
|
return message;
|
1704
1963
|
},
|
1705
1964
|
};
|
@@ -1760,6 +2019,527 @@ exports.ConnectionQualityUpdate = {
|
|
1760
2019
|
return message;
|
1761
2020
|
},
|
1762
2021
|
};
|
2022
|
+
const baseStreamStateInfo = {
|
2023
|
+
participantSid: "",
|
2024
|
+
trackSid: "",
|
2025
|
+
state: 0,
|
2026
|
+
};
|
2027
|
+
exports.StreamStateInfo = {
|
2028
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2029
|
+
if (message.participantSid !== "") {
|
2030
|
+
writer.uint32(10).string(message.participantSid);
|
2031
|
+
}
|
2032
|
+
if (message.trackSid !== "") {
|
2033
|
+
writer.uint32(18).string(message.trackSid);
|
2034
|
+
}
|
2035
|
+
if (message.state !== 0) {
|
2036
|
+
writer.uint32(24).int32(message.state);
|
2037
|
+
}
|
2038
|
+
return writer;
|
2039
|
+
},
|
2040
|
+
decode(input, length) {
|
2041
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2042
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2043
|
+
const message = Object.assign({}, baseStreamStateInfo);
|
2044
|
+
while (reader.pos < end) {
|
2045
|
+
const tag = reader.uint32();
|
2046
|
+
switch (tag >>> 3) {
|
2047
|
+
case 1:
|
2048
|
+
message.participantSid = reader.string();
|
2049
|
+
break;
|
2050
|
+
case 2:
|
2051
|
+
message.trackSid = reader.string();
|
2052
|
+
break;
|
2053
|
+
case 3:
|
2054
|
+
message.state = reader.int32();
|
2055
|
+
break;
|
2056
|
+
default:
|
2057
|
+
reader.skipType(tag & 7);
|
2058
|
+
break;
|
2059
|
+
}
|
2060
|
+
}
|
2061
|
+
return message;
|
2062
|
+
},
|
2063
|
+
fromJSON(object) {
|
2064
|
+
const message = Object.assign({}, baseStreamStateInfo);
|
2065
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2066
|
+
message.participantSid = String(object.participantSid);
|
2067
|
+
}
|
2068
|
+
else {
|
2069
|
+
message.participantSid = "";
|
2070
|
+
}
|
2071
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2072
|
+
message.trackSid = String(object.trackSid);
|
2073
|
+
}
|
2074
|
+
else {
|
2075
|
+
message.trackSid = "";
|
2076
|
+
}
|
2077
|
+
if (object.state !== undefined && object.state !== null) {
|
2078
|
+
message.state = streamStateFromJSON(object.state);
|
2079
|
+
}
|
2080
|
+
else {
|
2081
|
+
message.state = 0;
|
2082
|
+
}
|
2083
|
+
return message;
|
2084
|
+
},
|
2085
|
+
toJSON(message) {
|
2086
|
+
const obj = {};
|
2087
|
+
message.participantSid !== undefined &&
|
2088
|
+
(obj.participantSid = message.participantSid);
|
2089
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2090
|
+
message.state !== undefined &&
|
2091
|
+
(obj.state = streamStateToJSON(message.state));
|
2092
|
+
return obj;
|
2093
|
+
},
|
2094
|
+
fromPartial(object) {
|
2095
|
+
var _a, _b, _c;
|
2096
|
+
const message = Object.assign({}, baseStreamStateInfo);
|
2097
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2098
|
+
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2099
|
+
message.state = (_c = object.state) !== null && _c !== void 0 ? _c : 0;
|
2100
|
+
return message;
|
2101
|
+
},
|
2102
|
+
};
|
2103
|
+
const baseStreamStateUpdate = {};
|
2104
|
+
exports.StreamStateUpdate = {
|
2105
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2106
|
+
for (const v of message.streamStates) {
|
2107
|
+
exports.StreamStateInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
2108
|
+
}
|
2109
|
+
return writer;
|
2110
|
+
},
|
2111
|
+
decode(input, length) {
|
2112
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2113
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2114
|
+
const message = Object.assign({}, baseStreamStateUpdate);
|
2115
|
+
message.streamStates = [];
|
2116
|
+
while (reader.pos < end) {
|
2117
|
+
const tag = reader.uint32();
|
2118
|
+
switch (tag >>> 3) {
|
2119
|
+
case 1:
|
2120
|
+
message.streamStates.push(exports.StreamStateInfo.decode(reader, reader.uint32()));
|
2121
|
+
break;
|
2122
|
+
default:
|
2123
|
+
reader.skipType(tag & 7);
|
2124
|
+
break;
|
2125
|
+
}
|
2126
|
+
}
|
2127
|
+
return message;
|
2128
|
+
},
|
2129
|
+
fromJSON(object) {
|
2130
|
+
const message = Object.assign({}, baseStreamStateUpdate);
|
2131
|
+
message.streamStates = [];
|
2132
|
+
if (object.streamStates !== undefined && object.streamStates !== null) {
|
2133
|
+
for (const e of object.streamStates) {
|
2134
|
+
message.streamStates.push(exports.StreamStateInfo.fromJSON(e));
|
2135
|
+
}
|
2136
|
+
}
|
2137
|
+
return message;
|
2138
|
+
},
|
2139
|
+
toJSON(message) {
|
2140
|
+
const obj = {};
|
2141
|
+
if (message.streamStates) {
|
2142
|
+
obj.streamStates = message.streamStates.map((e) => e ? exports.StreamStateInfo.toJSON(e) : undefined);
|
2143
|
+
}
|
2144
|
+
else {
|
2145
|
+
obj.streamStates = [];
|
2146
|
+
}
|
2147
|
+
return obj;
|
2148
|
+
},
|
2149
|
+
fromPartial(object) {
|
2150
|
+
const message = Object.assign({}, baseStreamStateUpdate);
|
2151
|
+
message.streamStates = [];
|
2152
|
+
if (object.streamStates !== undefined && object.streamStates !== null) {
|
2153
|
+
for (const e of object.streamStates) {
|
2154
|
+
message.streamStates.push(exports.StreamStateInfo.fromPartial(e));
|
2155
|
+
}
|
2156
|
+
}
|
2157
|
+
return message;
|
2158
|
+
},
|
2159
|
+
};
|
2160
|
+
const baseSubscribedQuality = { quality: 0, enabled: false };
|
2161
|
+
exports.SubscribedQuality = {
|
2162
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2163
|
+
if (message.quality !== 0) {
|
2164
|
+
writer.uint32(8).int32(message.quality);
|
2165
|
+
}
|
2166
|
+
if (message.enabled === true) {
|
2167
|
+
writer.uint32(16).bool(message.enabled);
|
2168
|
+
}
|
2169
|
+
return writer;
|
2170
|
+
},
|
2171
|
+
decode(input, length) {
|
2172
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2173
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2174
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2175
|
+
while (reader.pos < end) {
|
2176
|
+
const tag = reader.uint32();
|
2177
|
+
switch (tag >>> 3) {
|
2178
|
+
case 1:
|
2179
|
+
message.quality = reader.int32();
|
2180
|
+
break;
|
2181
|
+
case 2:
|
2182
|
+
message.enabled = reader.bool();
|
2183
|
+
break;
|
2184
|
+
default:
|
2185
|
+
reader.skipType(tag & 7);
|
2186
|
+
break;
|
2187
|
+
}
|
2188
|
+
}
|
2189
|
+
return message;
|
2190
|
+
},
|
2191
|
+
fromJSON(object) {
|
2192
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2193
|
+
if (object.quality !== undefined && object.quality !== null) {
|
2194
|
+
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
2195
|
+
}
|
2196
|
+
else {
|
2197
|
+
message.quality = 0;
|
2198
|
+
}
|
2199
|
+
if (object.enabled !== undefined && object.enabled !== null) {
|
2200
|
+
message.enabled = Boolean(object.enabled);
|
2201
|
+
}
|
2202
|
+
else {
|
2203
|
+
message.enabled = false;
|
2204
|
+
}
|
2205
|
+
return message;
|
2206
|
+
},
|
2207
|
+
toJSON(message) {
|
2208
|
+
const obj = {};
|
2209
|
+
message.quality !== undefined &&
|
2210
|
+
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
2211
|
+
message.enabled !== undefined && (obj.enabled = message.enabled);
|
2212
|
+
return obj;
|
2213
|
+
},
|
2214
|
+
fromPartial(object) {
|
2215
|
+
var _a, _b;
|
2216
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2217
|
+
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
2218
|
+
message.enabled = (_b = object.enabled) !== null && _b !== void 0 ? _b : false;
|
2219
|
+
return message;
|
2220
|
+
},
|
2221
|
+
};
|
2222
|
+
const baseSubscribedQualityUpdate = { trackSid: "" };
|
2223
|
+
exports.SubscribedQualityUpdate = {
|
2224
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2225
|
+
if (message.trackSid !== "") {
|
2226
|
+
writer.uint32(10).string(message.trackSid);
|
2227
|
+
}
|
2228
|
+
for (const v of message.subscribedQualities) {
|
2229
|
+
exports.SubscribedQuality.encode(v, writer.uint32(18).fork()).ldelim();
|
2230
|
+
}
|
2231
|
+
return writer;
|
2232
|
+
},
|
2233
|
+
decode(input, length) {
|
2234
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2235
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2236
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2237
|
+
message.subscribedQualities = [];
|
2238
|
+
while (reader.pos < end) {
|
2239
|
+
const tag = reader.uint32();
|
2240
|
+
switch (tag >>> 3) {
|
2241
|
+
case 1:
|
2242
|
+
message.trackSid = reader.string();
|
2243
|
+
break;
|
2244
|
+
case 2:
|
2245
|
+
message.subscribedQualities.push(exports.SubscribedQuality.decode(reader, reader.uint32()));
|
2246
|
+
break;
|
2247
|
+
default:
|
2248
|
+
reader.skipType(tag & 7);
|
2249
|
+
break;
|
2250
|
+
}
|
2251
|
+
}
|
2252
|
+
return message;
|
2253
|
+
},
|
2254
|
+
fromJSON(object) {
|
2255
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2256
|
+
message.subscribedQualities = [];
|
2257
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2258
|
+
message.trackSid = String(object.trackSid);
|
2259
|
+
}
|
2260
|
+
else {
|
2261
|
+
message.trackSid = "";
|
2262
|
+
}
|
2263
|
+
if (object.subscribedQualities !== undefined &&
|
2264
|
+
object.subscribedQualities !== null) {
|
2265
|
+
for (const e of object.subscribedQualities) {
|
2266
|
+
message.subscribedQualities.push(exports.SubscribedQuality.fromJSON(e));
|
2267
|
+
}
|
2268
|
+
}
|
2269
|
+
return message;
|
2270
|
+
},
|
2271
|
+
toJSON(message) {
|
2272
|
+
const obj = {};
|
2273
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2274
|
+
if (message.subscribedQualities) {
|
2275
|
+
obj.subscribedQualities = message.subscribedQualities.map((e) => e ? exports.SubscribedQuality.toJSON(e) : undefined);
|
2276
|
+
}
|
2277
|
+
else {
|
2278
|
+
obj.subscribedQualities = [];
|
2279
|
+
}
|
2280
|
+
return obj;
|
2281
|
+
},
|
2282
|
+
fromPartial(object) {
|
2283
|
+
var _a;
|
2284
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2285
|
+
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
2286
|
+
message.subscribedQualities = [];
|
2287
|
+
if (object.subscribedQualities !== undefined &&
|
2288
|
+
object.subscribedQualities !== null) {
|
2289
|
+
for (const e of object.subscribedQualities) {
|
2290
|
+
message.subscribedQualities.push(exports.SubscribedQuality.fromPartial(e));
|
2291
|
+
}
|
2292
|
+
}
|
2293
|
+
return message;
|
2294
|
+
},
|
2295
|
+
};
|
2296
|
+
const baseTrackPermission = {
|
2297
|
+
participantSid: "",
|
2298
|
+
allTracks: false,
|
2299
|
+
trackSids: "",
|
2300
|
+
};
|
2301
|
+
exports.TrackPermission = {
|
2302
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2303
|
+
if (message.participantSid !== "") {
|
2304
|
+
writer.uint32(10).string(message.participantSid);
|
2305
|
+
}
|
2306
|
+
if (message.allTracks === true) {
|
2307
|
+
writer.uint32(16).bool(message.allTracks);
|
2308
|
+
}
|
2309
|
+
for (const v of message.trackSids) {
|
2310
|
+
writer.uint32(26).string(v);
|
2311
|
+
}
|
2312
|
+
return writer;
|
2313
|
+
},
|
2314
|
+
decode(input, length) {
|
2315
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2316
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2317
|
+
const message = Object.assign({}, baseTrackPermission);
|
2318
|
+
message.trackSids = [];
|
2319
|
+
while (reader.pos < end) {
|
2320
|
+
const tag = reader.uint32();
|
2321
|
+
switch (tag >>> 3) {
|
2322
|
+
case 1:
|
2323
|
+
message.participantSid = reader.string();
|
2324
|
+
break;
|
2325
|
+
case 2:
|
2326
|
+
message.allTracks = reader.bool();
|
2327
|
+
break;
|
2328
|
+
case 3:
|
2329
|
+
message.trackSids.push(reader.string());
|
2330
|
+
break;
|
2331
|
+
default:
|
2332
|
+
reader.skipType(tag & 7);
|
2333
|
+
break;
|
2334
|
+
}
|
2335
|
+
}
|
2336
|
+
return message;
|
2337
|
+
},
|
2338
|
+
fromJSON(object) {
|
2339
|
+
const message = Object.assign({}, baseTrackPermission);
|
2340
|
+
message.trackSids = [];
|
2341
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2342
|
+
message.participantSid = String(object.participantSid);
|
2343
|
+
}
|
2344
|
+
else {
|
2345
|
+
message.participantSid = "";
|
2346
|
+
}
|
2347
|
+
if (object.allTracks !== undefined && object.allTracks !== null) {
|
2348
|
+
message.allTracks = Boolean(object.allTracks);
|
2349
|
+
}
|
2350
|
+
else {
|
2351
|
+
message.allTracks = false;
|
2352
|
+
}
|
2353
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2354
|
+
for (const e of object.trackSids) {
|
2355
|
+
message.trackSids.push(String(e));
|
2356
|
+
}
|
2357
|
+
}
|
2358
|
+
return message;
|
2359
|
+
},
|
2360
|
+
toJSON(message) {
|
2361
|
+
const obj = {};
|
2362
|
+
message.participantSid !== undefined &&
|
2363
|
+
(obj.participantSid = message.participantSid);
|
2364
|
+
message.allTracks !== undefined && (obj.allTracks = message.allTracks);
|
2365
|
+
if (message.trackSids) {
|
2366
|
+
obj.trackSids = message.trackSids.map((e) => e);
|
2367
|
+
}
|
2368
|
+
else {
|
2369
|
+
obj.trackSids = [];
|
2370
|
+
}
|
2371
|
+
return obj;
|
2372
|
+
},
|
2373
|
+
fromPartial(object) {
|
2374
|
+
var _a, _b;
|
2375
|
+
const message = Object.assign({}, baseTrackPermission);
|
2376
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2377
|
+
message.allTracks = (_b = object.allTracks) !== null && _b !== void 0 ? _b : false;
|
2378
|
+
message.trackSids = [];
|
2379
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2380
|
+
for (const e of object.trackSids) {
|
2381
|
+
message.trackSids.push(e);
|
2382
|
+
}
|
2383
|
+
}
|
2384
|
+
return message;
|
2385
|
+
},
|
2386
|
+
};
|
2387
|
+
const baseUpdateSubscriptionPermissions = { allParticipants: false };
|
2388
|
+
exports.UpdateSubscriptionPermissions = {
|
2389
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2390
|
+
if (message.allParticipants === true) {
|
2391
|
+
writer.uint32(8).bool(message.allParticipants);
|
2392
|
+
}
|
2393
|
+
for (const v of message.trackPermissions) {
|
2394
|
+
exports.TrackPermission.encode(v, writer.uint32(18).fork()).ldelim();
|
2395
|
+
}
|
2396
|
+
return writer;
|
2397
|
+
},
|
2398
|
+
decode(input, length) {
|
2399
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2400
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2401
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2402
|
+
message.trackPermissions = [];
|
2403
|
+
while (reader.pos < end) {
|
2404
|
+
const tag = reader.uint32();
|
2405
|
+
switch (tag >>> 3) {
|
2406
|
+
case 1:
|
2407
|
+
message.allParticipants = reader.bool();
|
2408
|
+
break;
|
2409
|
+
case 2:
|
2410
|
+
message.trackPermissions.push(exports.TrackPermission.decode(reader, reader.uint32()));
|
2411
|
+
break;
|
2412
|
+
default:
|
2413
|
+
reader.skipType(tag & 7);
|
2414
|
+
break;
|
2415
|
+
}
|
2416
|
+
}
|
2417
|
+
return message;
|
2418
|
+
},
|
2419
|
+
fromJSON(object) {
|
2420
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2421
|
+
message.trackPermissions = [];
|
2422
|
+
if (object.allParticipants !== undefined &&
|
2423
|
+
object.allParticipants !== null) {
|
2424
|
+
message.allParticipants = Boolean(object.allParticipants);
|
2425
|
+
}
|
2426
|
+
else {
|
2427
|
+
message.allParticipants = false;
|
2428
|
+
}
|
2429
|
+
if (object.trackPermissions !== undefined &&
|
2430
|
+
object.trackPermissions !== null) {
|
2431
|
+
for (const e of object.trackPermissions) {
|
2432
|
+
message.trackPermissions.push(exports.TrackPermission.fromJSON(e));
|
2433
|
+
}
|
2434
|
+
}
|
2435
|
+
return message;
|
2436
|
+
},
|
2437
|
+
toJSON(message) {
|
2438
|
+
const obj = {};
|
2439
|
+
message.allParticipants !== undefined &&
|
2440
|
+
(obj.allParticipants = message.allParticipants);
|
2441
|
+
if (message.trackPermissions) {
|
2442
|
+
obj.trackPermissions = message.trackPermissions.map((e) => e ? exports.TrackPermission.toJSON(e) : undefined);
|
2443
|
+
}
|
2444
|
+
else {
|
2445
|
+
obj.trackPermissions = [];
|
2446
|
+
}
|
2447
|
+
return obj;
|
2448
|
+
},
|
2449
|
+
fromPartial(object) {
|
2450
|
+
var _a;
|
2451
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2452
|
+
message.allParticipants = (_a = object.allParticipants) !== null && _a !== void 0 ? _a : false;
|
2453
|
+
message.trackPermissions = [];
|
2454
|
+
if (object.trackPermissions !== undefined &&
|
2455
|
+
object.trackPermissions !== null) {
|
2456
|
+
for (const e of object.trackPermissions) {
|
2457
|
+
message.trackPermissions.push(exports.TrackPermission.fromPartial(e));
|
2458
|
+
}
|
2459
|
+
}
|
2460
|
+
return message;
|
2461
|
+
},
|
2462
|
+
};
|
2463
|
+
const baseSubscriptionPermissionUpdate = {
|
2464
|
+
participantSid: "",
|
2465
|
+
trackSid: "",
|
2466
|
+
allowed: false,
|
2467
|
+
};
|
2468
|
+
exports.SubscriptionPermissionUpdate = {
|
2469
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2470
|
+
if (message.participantSid !== "") {
|
2471
|
+
writer.uint32(10).string(message.participantSid);
|
2472
|
+
}
|
2473
|
+
if (message.trackSid !== "") {
|
2474
|
+
writer.uint32(18).string(message.trackSid);
|
2475
|
+
}
|
2476
|
+
if (message.allowed === true) {
|
2477
|
+
writer.uint32(24).bool(message.allowed);
|
2478
|
+
}
|
2479
|
+
return writer;
|
2480
|
+
},
|
2481
|
+
decode(input, length) {
|
2482
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2483
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2484
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2485
|
+
while (reader.pos < end) {
|
2486
|
+
const tag = reader.uint32();
|
2487
|
+
switch (tag >>> 3) {
|
2488
|
+
case 1:
|
2489
|
+
message.participantSid = reader.string();
|
2490
|
+
break;
|
2491
|
+
case 2:
|
2492
|
+
message.trackSid = reader.string();
|
2493
|
+
break;
|
2494
|
+
case 3:
|
2495
|
+
message.allowed = reader.bool();
|
2496
|
+
break;
|
2497
|
+
default:
|
2498
|
+
reader.skipType(tag & 7);
|
2499
|
+
break;
|
2500
|
+
}
|
2501
|
+
}
|
2502
|
+
return message;
|
2503
|
+
},
|
2504
|
+
fromJSON(object) {
|
2505
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2506
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2507
|
+
message.participantSid = String(object.participantSid);
|
2508
|
+
}
|
2509
|
+
else {
|
2510
|
+
message.participantSid = "";
|
2511
|
+
}
|
2512
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2513
|
+
message.trackSid = String(object.trackSid);
|
2514
|
+
}
|
2515
|
+
else {
|
2516
|
+
message.trackSid = "";
|
2517
|
+
}
|
2518
|
+
if (object.allowed !== undefined && object.allowed !== null) {
|
2519
|
+
message.allowed = Boolean(object.allowed);
|
2520
|
+
}
|
2521
|
+
else {
|
2522
|
+
message.allowed = false;
|
2523
|
+
}
|
2524
|
+
return message;
|
2525
|
+
},
|
2526
|
+
toJSON(message) {
|
2527
|
+
const obj = {};
|
2528
|
+
message.participantSid !== undefined &&
|
2529
|
+
(obj.participantSid = message.participantSid);
|
2530
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2531
|
+
message.allowed !== undefined && (obj.allowed = message.allowed);
|
2532
|
+
return obj;
|
2533
|
+
},
|
2534
|
+
fromPartial(object) {
|
2535
|
+
var _a, _b, _c;
|
2536
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2537
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2538
|
+
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2539
|
+
message.allowed = (_c = object.allowed) !== null && _c !== void 0 ? _c : false;
|
2540
|
+
return message;
|
2541
|
+
},
|
2542
|
+
};
|
1763
2543
|
if (minimal_1.default.util.Long !== long_1.default) {
|
1764
2544
|
minimal_1.default.util.Long = long_1.default;
|
1765
2545
|
minimal_1.default.configure();
|