livekit-client 0.15.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/SignalClient.d.ts +11 -3
- package/dist/api/SignalClient.js +92 -28
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/options.d.ts +5 -0
- package/dist/proto/livekit_models.d.ts +48 -0
- package/dist/proto/livekit_models.js +367 -5
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +50 -11
- package/dist/proto/livekit_rtc.js +300 -22
- 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 +10 -2
- package/dist/room/RTCEngine.js +182 -42
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +15 -0
- package/dist/room/Room.js +165 -20
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +42 -20
- package/dist/room/events.js +41 -19
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +25 -4
- package/dist/room/participant/LocalParticipant.js +50 -23
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +3 -1
- package/dist/room/participant/Participant.js +1 -0
- 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 +11 -16
- package/dist/room/participant/RemoteParticipant.js.map +1 -1
- package/dist/room/participant/publishUtils.js +1 -1
- package/dist/room/participant/publishUtils.js.map +1 -1
- package/dist/room/participant/publishUtils.test.js +9 -0
- package/dist/room/participant/publishUtils.test.js.map +1 -1
- package/dist/room/track/LocalTrack.d.ts +0 -3
- package/dist/room/track/LocalTrack.js +1 -6
- package/dist/room/track/LocalTrack.js.map +1 -1
- package/dist/room/track/LocalTrackPublication.d.ts +5 -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 +1 -1
- package/dist/room/track/LocalVideoTrack.js +7 -6
- package/dist/room/track/LocalVideoTrack.js.map +1 -1
- package/dist/room/track/RemoteAudioTrack.d.ts +5 -14
- package/dist/room/track/RemoteAudioTrack.js +7 -32
- 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 -2
- package/dist/room/track/RemoteTrackPublication.js +51 -12
- package/dist/room/track/RemoteTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.d.ts +3 -9
- package/dist/room/track/RemoteVideoTrack.js +8 -29
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.d.ts +3 -0
- package/dist/room/track/Track.js +14 -5
- 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.js +5 -0
- package/dist/room/track/create.js.map +1 -1
- package/dist/room/utils.d.ts +2 -0
- package/dist/room/utils.js +32 -1
- package/dist/room/utils.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +5 -3
- package/src/api/SignalClient.ts +444 -0
- package/src/connect.ts +100 -0
- package/src/index.ts +47 -0
- package/src/logger.ts +22 -0
- package/src/options.ts +152 -0
- package/src/proto/livekit_models.ts +1863 -0
- package/src/proto/livekit_rtc.ts +3415 -0
- package/src/room/DeviceManager.ts +57 -0
- package/src/room/PCTransport.ts +86 -0
- package/src/room/RTCEngine.ts +582 -0
- package/src/room/Room.ts +840 -0
- package/src/room/errors.ts +65 -0
- package/src/room/events.ts +398 -0
- package/src/room/participant/LocalParticipant.ts +685 -0
- package/src/room/participant/Participant.ts +214 -0
- package/src/room/participant/ParticipantTrackPermission.ts +32 -0
- package/src/room/participant/RemoteParticipant.ts +241 -0
- package/src/room/participant/publishUtils.test.ts +105 -0
- package/src/room/participant/publishUtils.ts +180 -0
- package/src/room/stats.ts +130 -0
- package/src/room/track/LocalAudioTrack.ts +112 -0
- package/src/room/track/LocalTrack.ts +124 -0
- package/src/room/track/LocalTrackPublication.ts +66 -0
- package/src/room/track/LocalVideoTrack.test.ts +70 -0
- package/src/room/track/LocalVideoTrack.ts +416 -0
- package/src/room/track/RemoteAudioTrack.ts +58 -0
- package/src/room/track/RemoteTrack.ts +59 -0
- package/src/room/track/RemoteTrackPublication.ts +198 -0
- package/src/room/track/RemoteVideoTrack.ts +213 -0
- package/src/room/track/Track.ts +307 -0
- package/src/room/track/TrackPublication.ts +120 -0
- package/src/room/track/create.ts +120 -0
- package/src/room/track/defaults.ts +23 -0
- package/src/room/track/options.ts +229 -0
- package/src/room/track/types.ts +8 -0
- package/src/room/track/utils.test.ts +93 -0
- package/src/room/track/utils.ts +76 -0
- package/src/room/utils.ts +74 -0
- package/src/version.ts +2 -0
- package/.github/workflows/publish.yaml +0 -55
- package/.github/workflows/test.yaml +0 -36
- package/example/index.html +0 -248
- package/example/sample.ts +0 -621
- package/example/styles.css +0 -144
- package/example/webpack.config.js +0 -33
@@ -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.UserPacket = exports.SpeakerInfo = exports.ActiveSpeakerUpdate = exports.DataPacket = exports.VideoLayer = exports.TrackInfo = exports.ParticipantInfo = exports.Codec = exports.Room = exports.dataPacket_KindToJSON = exports.dataPacket_KindFromJSON = exports.DataPacket_Kind = exports.participantInfo_StateToJSON = exports.participantInfo_StateFromJSON = exports.ParticipantInfo_State = exports.connectionQualityToJSON = exports.connectionQualityFromJSON = exports.ConnectionQuality = exports.videoQualityToJSON = exports.videoQualityFromJSON = exports.VideoQuality = exports.trackSourceToJSON = exports.trackSourceFromJSON = exports.TrackSource = exports.trackTypeToJSON = exports.trackTypeFromJSON = exports.TrackType = exports.protobufPackage = void 0;
|
6
|
+
exports.ClientInfo = exports.ParticipantTracks = exports.UserPacket = exports.SpeakerInfo = exports.ActiveSpeakerUpdate = exports.DataPacket = exports.VideoLayer = exports.TrackInfo = exports.ParticipantInfo = exports.Codec = exports.Room = exports.clientInfo_SDKToJSON = exports.clientInfo_SDKFromJSON = exports.ClientInfo_SDK = exports.dataPacket_KindToJSON = exports.dataPacket_KindFromJSON = exports.DataPacket_Kind = exports.participantInfo_StateToJSON = exports.participantInfo_StateFromJSON = exports.ParticipantInfo_State = exports.connectionQualityToJSON = exports.connectionQualityFromJSON = exports.ConnectionQuality = exports.videoQualityToJSON = exports.videoQualityFromJSON = exports.VideoQuality = exports.trackSourceToJSON = exports.trackSourceFromJSON = exports.TrackSource = exports.trackTypeToJSON = exports.trackTypeFromJSON = exports.TrackType = 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"));
|
@@ -101,6 +101,7 @@ var VideoQuality;
|
|
101
101
|
VideoQuality[VideoQuality["LOW"] = 0] = "LOW";
|
102
102
|
VideoQuality[VideoQuality["MEDIUM"] = 1] = "MEDIUM";
|
103
103
|
VideoQuality[VideoQuality["HIGH"] = 2] = "HIGH";
|
104
|
+
VideoQuality[VideoQuality["OFF"] = 3] = "OFF";
|
104
105
|
VideoQuality[VideoQuality["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
105
106
|
})(VideoQuality = exports.VideoQuality || (exports.VideoQuality = {}));
|
106
107
|
function videoQualityFromJSON(object) {
|
@@ -114,6 +115,9 @@ function videoQualityFromJSON(object) {
|
|
114
115
|
case 2:
|
115
116
|
case "HIGH":
|
116
117
|
return VideoQuality.HIGH;
|
118
|
+
case 3:
|
119
|
+
case "OFF":
|
120
|
+
return VideoQuality.OFF;
|
117
121
|
case -1:
|
118
122
|
case "UNRECOGNIZED":
|
119
123
|
default:
|
@@ -129,6 +133,8 @@ function videoQualityToJSON(object) {
|
|
129
133
|
return "MEDIUM";
|
130
134
|
case VideoQuality.HIGH:
|
131
135
|
return "HIGH";
|
136
|
+
case VideoQuality.OFF:
|
137
|
+
return "OFF";
|
132
138
|
default:
|
133
139
|
return "UNKNOWN";
|
134
140
|
}
|
@@ -252,6 +258,68 @@ function dataPacket_KindToJSON(object) {
|
|
252
258
|
}
|
253
259
|
}
|
254
260
|
exports.dataPacket_KindToJSON = dataPacket_KindToJSON;
|
261
|
+
var ClientInfo_SDK;
|
262
|
+
(function (ClientInfo_SDK) {
|
263
|
+
ClientInfo_SDK[ClientInfo_SDK["UNKNOWN"] = 0] = "UNKNOWN";
|
264
|
+
ClientInfo_SDK[ClientInfo_SDK["JS"] = 1] = "JS";
|
265
|
+
ClientInfo_SDK[ClientInfo_SDK["SWIFT"] = 2] = "SWIFT";
|
266
|
+
ClientInfo_SDK[ClientInfo_SDK["ANDROID"] = 3] = "ANDROID";
|
267
|
+
ClientInfo_SDK[ClientInfo_SDK["FLUTTER"] = 4] = "FLUTTER";
|
268
|
+
ClientInfo_SDK[ClientInfo_SDK["GO"] = 5] = "GO";
|
269
|
+
ClientInfo_SDK[ClientInfo_SDK["UNITY"] = 6] = "UNITY";
|
270
|
+
ClientInfo_SDK[ClientInfo_SDK["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
271
|
+
})(ClientInfo_SDK = exports.ClientInfo_SDK || (exports.ClientInfo_SDK = {}));
|
272
|
+
function clientInfo_SDKFromJSON(object) {
|
273
|
+
switch (object) {
|
274
|
+
case 0:
|
275
|
+
case "UNKNOWN":
|
276
|
+
return ClientInfo_SDK.UNKNOWN;
|
277
|
+
case 1:
|
278
|
+
case "JS":
|
279
|
+
return ClientInfo_SDK.JS;
|
280
|
+
case 2:
|
281
|
+
case "SWIFT":
|
282
|
+
return ClientInfo_SDK.SWIFT;
|
283
|
+
case 3:
|
284
|
+
case "ANDROID":
|
285
|
+
return ClientInfo_SDK.ANDROID;
|
286
|
+
case 4:
|
287
|
+
case "FLUTTER":
|
288
|
+
return ClientInfo_SDK.FLUTTER;
|
289
|
+
case 5:
|
290
|
+
case "GO":
|
291
|
+
return ClientInfo_SDK.GO;
|
292
|
+
case 6:
|
293
|
+
case "UNITY":
|
294
|
+
return ClientInfo_SDK.UNITY;
|
295
|
+
case -1:
|
296
|
+
case "UNRECOGNIZED":
|
297
|
+
default:
|
298
|
+
return ClientInfo_SDK.UNRECOGNIZED;
|
299
|
+
}
|
300
|
+
}
|
301
|
+
exports.clientInfo_SDKFromJSON = clientInfo_SDKFromJSON;
|
302
|
+
function clientInfo_SDKToJSON(object) {
|
303
|
+
switch (object) {
|
304
|
+
case ClientInfo_SDK.UNKNOWN:
|
305
|
+
return "UNKNOWN";
|
306
|
+
case ClientInfo_SDK.JS:
|
307
|
+
return "JS";
|
308
|
+
case ClientInfo_SDK.SWIFT:
|
309
|
+
return "SWIFT";
|
310
|
+
case ClientInfo_SDK.ANDROID:
|
311
|
+
return "ANDROID";
|
312
|
+
case ClientInfo_SDK.FLUTTER:
|
313
|
+
return "FLUTTER";
|
314
|
+
case ClientInfo_SDK.GO:
|
315
|
+
return "GO";
|
316
|
+
case ClientInfo_SDK.UNITY:
|
317
|
+
return "UNITY";
|
318
|
+
default:
|
319
|
+
return "UNKNOWN";
|
320
|
+
}
|
321
|
+
}
|
322
|
+
exports.clientInfo_SDKToJSON = clientInfo_SDKToJSON;
|
255
323
|
const baseRoom = {
|
256
324
|
sid: "",
|
257
325
|
name: "",
|
@@ -524,6 +592,7 @@ const baseParticipantInfo = {
|
|
524
592
|
joinedAt: 0,
|
525
593
|
hidden: false,
|
526
594
|
recorder: false,
|
595
|
+
name: "",
|
527
596
|
};
|
528
597
|
exports.ParticipantInfo = {
|
529
598
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -551,6 +620,9 @@ exports.ParticipantInfo = {
|
|
551
620
|
if (message.recorder === true) {
|
552
621
|
writer.uint32(64).bool(message.recorder);
|
553
622
|
}
|
623
|
+
if (message.name !== "") {
|
624
|
+
writer.uint32(74).string(message.name);
|
625
|
+
}
|
554
626
|
return writer;
|
555
627
|
},
|
556
628
|
decode(input, length) {
|
@@ -585,6 +657,9 @@ exports.ParticipantInfo = {
|
|
585
657
|
case 8:
|
586
658
|
message.recorder = reader.bool();
|
587
659
|
break;
|
660
|
+
case 9:
|
661
|
+
message.name = reader.string();
|
662
|
+
break;
|
588
663
|
default:
|
589
664
|
reader.skipType(tag & 7);
|
590
665
|
break;
|
@@ -642,6 +717,12 @@ exports.ParticipantInfo = {
|
|
642
717
|
else {
|
643
718
|
message.recorder = false;
|
644
719
|
}
|
720
|
+
if (object.name !== undefined && object.name !== null) {
|
721
|
+
message.name = String(object.name);
|
722
|
+
}
|
723
|
+
else {
|
724
|
+
message.name = "";
|
725
|
+
}
|
645
726
|
return message;
|
646
727
|
},
|
647
728
|
toJSON(message) {
|
@@ -660,10 +741,11 @@ exports.ParticipantInfo = {
|
|
660
741
|
message.joinedAt !== undefined && (obj.joinedAt = message.joinedAt);
|
661
742
|
message.hidden !== undefined && (obj.hidden = message.hidden);
|
662
743
|
message.recorder !== undefined && (obj.recorder = message.recorder);
|
744
|
+
message.name !== undefined && (obj.name = message.name);
|
663
745
|
return obj;
|
664
746
|
},
|
665
747
|
fromPartial(object) {
|
666
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
748
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
667
749
|
const message = Object.assign({}, baseParticipantInfo);
|
668
750
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
669
751
|
message.identity = (_b = object.identity) !== null && _b !== void 0 ? _b : "";
|
@@ -678,6 +760,7 @@ exports.ParticipantInfo = {
|
|
678
760
|
message.joinedAt = (_e = object.joinedAt) !== null && _e !== void 0 ? _e : 0;
|
679
761
|
message.hidden = (_f = object.hidden) !== null && _f !== void 0 ? _f : false;
|
680
762
|
message.recorder = (_g = object.recorder) !== null && _g !== void 0 ? _g : false;
|
763
|
+
message.name = (_h = object.name) !== null && _h !== void 0 ? _h : "";
|
681
764
|
return message;
|
682
765
|
},
|
683
766
|
};
|
@@ -691,6 +774,8 @@ const baseTrackInfo = {
|
|
691
774
|
simulcast: false,
|
692
775
|
disableDtx: false,
|
693
776
|
source: 0,
|
777
|
+
mimeType: "",
|
778
|
+
mid: "",
|
694
779
|
};
|
695
780
|
exports.TrackInfo = {
|
696
781
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -724,6 +809,12 @@ exports.TrackInfo = {
|
|
724
809
|
for (const v of message.layers) {
|
725
810
|
exports.VideoLayer.encode(v, writer.uint32(82).fork()).ldelim();
|
726
811
|
}
|
812
|
+
if (message.mimeType !== "") {
|
813
|
+
writer.uint32(90).string(message.mimeType);
|
814
|
+
}
|
815
|
+
if (message.mid !== "") {
|
816
|
+
writer.uint32(98).string(message.mid);
|
817
|
+
}
|
727
818
|
return writer;
|
728
819
|
},
|
729
820
|
decode(input, length) {
|
@@ -764,6 +855,12 @@ exports.TrackInfo = {
|
|
764
855
|
case 10:
|
765
856
|
message.layers.push(exports.VideoLayer.decode(reader, reader.uint32()));
|
766
857
|
break;
|
858
|
+
case 11:
|
859
|
+
message.mimeType = reader.string();
|
860
|
+
break;
|
861
|
+
case 12:
|
862
|
+
message.mid = reader.string();
|
863
|
+
break;
|
767
864
|
default:
|
768
865
|
reader.skipType(tag & 7);
|
769
866
|
break;
|
@@ -833,6 +930,18 @@ exports.TrackInfo = {
|
|
833
930
|
message.layers.push(exports.VideoLayer.fromJSON(e));
|
834
931
|
}
|
835
932
|
}
|
933
|
+
if (object.mimeType !== undefined && object.mimeType !== null) {
|
934
|
+
message.mimeType = String(object.mimeType);
|
935
|
+
}
|
936
|
+
else {
|
937
|
+
message.mimeType = "";
|
938
|
+
}
|
939
|
+
if (object.mid !== undefined && object.mid !== null) {
|
940
|
+
message.mid = String(object.mid);
|
941
|
+
}
|
942
|
+
else {
|
943
|
+
message.mid = "";
|
944
|
+
}
|
836
945
|
return message;
|
837
946
|
},
|
838
947
|
toJSON(message) {
|
@@ -853,10 +962,12 @@ exports.TrackInfo = {
|
|
853
962
|
else {
|
854
963
|
obj.layers = [];
|
855
964
|
}
|
965
|
+
message.mimeType !== undefined && (obj.mimeType = message.mimeType);
|
966
|
+
message.mid !== undefined && (obj.mid = message.mid);
|
856
967
|
return obj;
|
857
968
|
},
|
858
969
|
fromPartial(object) {
|
859
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
970
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
860
971
|
const message = Object.assign({}, baseTrackInfo);
|
861
972
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
862
973
|
message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
|
@@ -873,10 +984,18 @@ exports.TrackInfo = {
|
|
873
984
|
message.layers.push(exports.VideoLayer.fromPartial(e));
|
874
985
|
}
|
875
986
|
}
|
987
|
+
message.mimeType = (_k = object.mimeType) !== null && _k !== void 0 ? _k : "";
|
988
|
+
message.mid = (_l = object.mid) !== null && _l !== void 0 ? _l : "";
|
876
989
|
return message;
|
877
990
|
},
|
878
991
|
};
|
879
|
-
const baseVideoLayer = {
|
992
|
+
const baseVideoLayer = {
|
993
|
+
quality: 0,
|
994
|
+
width: 0,
|
995
|
+
height: 0,
|
996
|
+
bitrate: 0,
|
997
|
+
ssrc: 0,
|
998
|
+
};
|
880
999
|
exports.VideoLayer = {
|
881
1000
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
882
1001
|
if (message.quality !== 0) {
|
@@ -891,6 +1010,9 @@ exports.VideoLayer = {
|
|
891
1010
|
if (message.bitrate !== 0) {
|
892
1011
|
writer.uint32(32).uint32(message.bitrate);
|
893
1012
|
}
|
1013
|
+
if (message.ssrc !== 0) {
|
1014
|
+
writer.uint32(40).uint32(message.ssrc);
|
1015
|
+
}
|
894
1016
|
return writer;
|
895
1017
|
},
|
896
1018
|
decode(input, length) {
|
@@ -912,6 +1034,9 @@ exports.VideoLayer = {
|
|
912
1034
|
case 4:
|
913
1035
|
message.bitrate = reader.uint32();
|
914
1036
|
break;
|
1037
|
+
case 5:
|
1038
|
+
message.ssrc = reader.uint32();
|
1039
|
+
break;
|
915
1040
|
default:
|
916
1041
|
reader.skipType(tag & 7);
|
917
1042
|
break;
|
@@ -945,6 +1070,12 @@ exports.VideoLayer = {
|
|
945
1070
|
else {
|
946
1071
|
message.bitrate = 0;
|
947
1072
|
}
|
1073
|
+
if (object.ssrc !== undefined && object.ssrc !== null) {
|
1074
|
+
message.ssrc = Number(object.ssrc);
|
1075
|
+
}
|
1076
|
+
else {
|
1077
|
+
message.ssrc = 0;
|
1078
|
+
}
|
948
1079
|
return message;
|
949
1080
|
},
|
950
1081
|
toJSON(message) {
|
@@ -954,15 +1085,17 @@ exports.VideoLayer = {
|
|
954
1085
|
message.width !== undefined && (obj.width = message.width);
|
955
1086
|
message.height !== undefined && (obj.height = message.height);
|
956
1087
|
message.bitrate !== undefined && (obj.bitrate = message.bitrate);
|
1088
|
+
message.ssrc !== undefined && (obj.ssrc = message.ssrc);
|
957
1089
|
return obj;
|
958
1090
|
},
|
959
1091
|
fromPartial(object) {
|
960
|
-
var _a, _b, _c, _d;
|
1092
|
+
var _a, _b, _c, _d, _e;
|
961
1093
|
const message = Object.assign({}, baseVideoLayer);
|
962
1094
|
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
963
1095
|
message.width = (_b = object.width) !== null && _b !== void 0 ? _b : 0;
|
964
1096
|
message.height = (_c = object.height) !== null && _c !== void 0 ? _c : 0;
|
965
1097
|
message.bitrate = (_d = object.bitrate) !== null && _d !== void 0 ? _d : 0;
|
1098
|
+
message.ssrc = (_e = object.ssrc) !== null && _e !== void 0 ? _e : 0;
|
966
1099
|
return message;
|
967
1100
|
},
|
968
1101
|
};
|
@@ -1277,6 +1410,235 @@ exports.UserPacket = {
|
|
1277
1410
|
return message;
|
1278
1411
|
},
|
1279
1412
|
};
|
1413
|
+
const baseParticipantTracks = { participantSid: "", trackSids: "" };
|
1414
|
+
exports.ParticipantTracks = {
|
1415
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
1416
|
+
if (message.participantSid !== "") {
|
1417
|
+
writer.uint32(10).string(message.participantSid);
|
1418
|
+
}
|
1419
|
+
for (const v of message.trackSids) {
|
1420
|
+
writer.uint32(18).string(v);
|
1421
|
+
}
|
1422
|
+
return writer;
|
1423
|
+
},
|
1424
|
+
decode(input, length) {
|
1425
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
1426
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1427
|
+
const message = Object.assign({}, baseParticipantTracks);
|
1428
|
+
message.trackSids = [];
|
1429
|
+
while (reader.pos < end) {
|
1430
|
+
const tag = reader.uint32();
|
1431
|
+
switch (tag >>> 3) {
|
1432
|
+
case 1:
|
1433
|
+
message.participantSid = reader.string();
|
1434
|
+
break;
|
1435
|
+
case 2:
|
1436
|
+
message.trackSids.push(reader.string());
|
1437
|
+
break;
|
1438
|
+
default:
|
1439
|
+
reader.skipType(tag & 7);
|
1440
|
+
break;
|
1441
|
+
}
|
1442
|
+
}
|
1443
|
+
return message;
|
1444
|
+
},
|
1445
|
+
fromJSON(object) {
|
1446
|
+
const message = Object.assign({}, baseParticipantTracks);
|
1447
|
+
message.trackSids = [];
|
1448
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
1449
|
+
message.participantSid = String(object.participantSid);
|
1450
|
+
}
|
1451
|
+
else {
|
1452
|
+
message.participantSid = "";
|
1453
|
+
}
|
1454
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
1455
|
+
for (const e of object.trackSids) {
|
1456
|
+
message.trackSids.push(String(e));
|
1457
|
+
}
|
1458
|
+
}
|
1459
|
+
return message;
|
1460
|
+
},
|
1461
|
+
toJSON(message) {
|
1462
|
+
const obj = {};
|
1463
|
+
message.participantSid !== undefined &&
|
1464
|
+
(obj.participantSid = message.participantSid);
|
1465
|
+
if (message.trackSids) {
|
1466
|
+
obj.trackSids = message.trackSids.map((e) => e);
|
1467
|
+
}
|
1468
|
+
else {
|
1469
|
+
obj.trackSids = [];
|
1470
|
+
}
|
1471
|
+
return obj;
|
1472
|
+
},
|
1473
|
+
fromPartial(object) {
|
1474
|
+
var _a;
|
1475
|
+
const message = Object.assign({}, baseParticipantTracks);
|
1476
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
1477
|
+
message.trackSids = [];
|
1478
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
1479
|
+
for (const e of object.trackSids) {
|
1480
|
+
message.trackSids.push(e);
|
1481
|
+
}
|
1482
|
+
}
|
1483
|
+
return message;
|
1484
|
+
},
|
1485
|
+
};
|
1486
|
+
const baseClientInfo = {
|
1487
|
+
sdk: 0,
|
1488
|
+
version: "",
|
1489
|
+
protocol: 0,
|
1490
|
+
os: "",
|
1491
|
+
osVersion: "",
|
1492
|
+
deviceModel: "",
|
1493
|
+
browser: "",
|
1494
|
+
browserVersion: "",
|
1495
|
+
};
|
1496
|
+
exports.ClientInfo = {
|
1497
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
1498
|
+
if (message.sdk !== 0) {
|
1499
|
+
writer.uint32(8).int32(message.sdk);
|
1500
|
+
}
|
1501
|
+
if (message.version !== "") {
|
1502
|
+
writer.uint32(18).string(message.version);
|
1503
|
+
}
|
1504
|
+
if (message.protocol !== 0) {
|
1505
|
+
writer.uint32(24).int32(message.protocol);
|
1506
|
+
}
|
1507
|
+
if (message.os !== "") {
|
1508
|
+
writer.uint32(34).string(message.os);
|
1509
|
+
}
|
1510
|
+
if (message.osVersion !== "") {
|
1511
|
+
writer.uint32(42).string(message.osVersion);
|
1512
|
+
}
|
1513
|
+
if (message.deviceModel !== "") {
|
1514
|
+
writer.uint32(50).string(message.deviceModel);
|
1515
|
+
}
|
1516
|
+
if (message.browser !== "") {
|
1517
|
+
writer.uint32(58).string(message.browser);
|
1518
|
+
}
|
1519
|
+
if (message.browserVersion !== "") {
|
1520
|
+
writer.uint32(66).string(message.browserVersion);
|
1521
|
+
}
|
1522
|
+
return writer;
|
1523
|
+
},
|
1524
|
+
decode(input, length) {
|
1525
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
1526
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1527
|
+
const message = Object.assign({}, baseClientInfo);
|
1528
|
+
while (reader.pos < end) {
|
1529
|
+
const tag = reader.uint32();
|
1530
|
+
switch (tag >>> 3) {
|
1531
|
+
case 1:
|
1532
|
+
message.sdk = reader.int32();
|
1533
|
+
break;
|
1534
|
+
case 2:
|
1535
|
+
message.version = reader.string();
|
1536
|
+
break;
|
1537
|
+
case 3:
|
1538
|
+
message.protocol = reader.int32();
|
1539
|
+
break;
|
1540
|
+
case 4:
|
1541
|
+
message.os = reader.string();
|
1542
|
+
break;
|
1543
|
+
case 5:
|
1544
|
+
message.osVersion = reader.string();
|
1545
|
+
break;
|
1546
|
+
case 6:
|
1547
|
+
message.deviceModel = reader.string();
|
1548
|
+
break;
|
1549
|
+
case 7:
|
1550
|
+
message.browser = reader.string();
|
1551
|
+
break;
|
1552
|
+
case 8:
|
1553
|
+
message.browserVersion = reader.string();
|
1554
|
+
break;
|
1555
|
+
default:
|
1556
|
+
reader.skipType(tag & 7);
|
1557
|
+
break;
|
1558
|
+
}
|
1559
|
+
}
|
1560
|
+
return message;
|
1561
|
+
},
|
1562
|
+
fromJSON(object) {
|
1563
|
+
const message = Object.assign({}, baseClientInfo);
|
1564
|
+
if (object.sdk !== undefined && object.sdk !== null) {
|
1565
|
+
message.sdk = clientInfo_SDKFromJSON(object.sdk);
|
1566
|
+
}
|
1567
|
+
else {
|
1568
|
+
message.sdk = 0;
|
1569
|
+
}
|
1570
|
+
if (object.version !== undefined && object.version !== null) {
|
1571
|
+
message.version = String(object.version);
|
1572
|
+
}
|
1573
|
+
else {
|
1574
|
+
message.version = "";
|
1575
|
+
}
|
1576
|
+
if (object.protocol !== undefined && object.protocol !== null) {
|
1577
|
+
message.protocol = Number(object.protocol);
|
1578
|
+
}
|
1579
|
+
else {
|
1580
|
+
message.protocol = 0;
|
1581
|
+
}
|
1582
|
+
if (object.os !== undefined && object.os !== null) {
|
1583
|
+
message.os = String(object.os);
|
1584
|
+
}
|
1585
|
+
else {
|
1586
|
+
message.os = "";
|
1587
|
+
}
|
1588
|
+
if (object.osVersion !== undefined && object.osVersion !== null) {
|
1589
|
+
message.osVersion = String(object.osVersion);
|
1590
|
+
}
|
1591
|
+
else {
|
1592
|
+
message.osVersion = "";
|
1593
|
+
}
|
1594
|
+
if (object.deviceModel !== undefined && object.deviceModel !== null) {
|
1595
|
+
message.deviceModel = String(object.deviceModel);
|
1596
|
+
}
|
1597
|
+
else {
|
1598
|
+
message.deviceModel = "";
|
1599
|
+
}
|
1600
|
+
if (object.browser !== undefined && object.browser !== null) {
|
1601
|
+
message.browser = String(object.browser);
|
1602
|
+
}
|
1603
|
+
else {
|
1604
|
+
message.browser = "";
|
1605
|
+
}
|
1606
|
+
if (object.browserVersion !== undefined && object.browserVersion !== null) {
|
1607
|
+
message.browserVersion = String(object.browserVersion);
|
1608
|
+
}
|
1609
|
+
else {
|
1610
|
+
message.browserVersion = "";
|
1611
|
+
}
|
1612
|
+
return message;
|
1613
|
+
},
|
1614
|
+
toJSON(message) {
|
1615
|
+
const obj = {};
|
1616
|
+
message.sdk !== undefined && (obj.sdk = clientInfo_SDKToJSON(message.sdk));
|
1617
|
+
message.version !== undefined && (obj.version = message.version);
|
1618
|
+
message.protocol !== undefined && (obj.protocol = message.protocol);
|
1619
|
+
message.os !== undefined && (obj.os = message.os);
|
1620
|
+
message.osVersion !== undefined && (obj.osVersion = message.osVersion);
|
1621
|
+
message.deviceModel !== undefined &&
|
1622
|
+
(obj.deviceModel = message.deviceModel);
|
1623
|
+
message.browser !== undefined && (obj.browser = message.browser);
|
1624
|
+
message.browserVersion !== undefined &&
|
1625
|
+
(obj.browserVersion = message.browserVersion);
|
1626
|
+
return obj;
|
1627
|
+
},
|
1628
|
+
fromPartial(object) {
|
1629
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
1630
|
+
const message = Object.assign({}, baseClientInfo);
|
1631
|
+
message.sdk = (_a = object.sdk) !== null && _a !== void 0 ? _a : 0;
|
1632
|
+
message.version = (_b = object.version) !== null && _b !== void 0 ? _b : "";
|
1633
|
+
message.protocol = (_c = object.protocol) !== null && _c !== void 0 ? _c : 0;
|
1634
|
+
message.os = (_d = object.os) !== null && _d !== void 0 ? _d : "";
|
1635
|
+
message.osVersion = (_e = object.osVersion) !== null && _e !== void 0 ? _e : "";
|
1636
|
+
message.deviceModel = (_f = object.deviceModel) !== null && _f !== void 0 ? _f : "";
|
1637
|
+
message.browser = (_g = object.browser) !== null && _g !== void 0 ? _g : "";
|
1638
|
+
message.browserVersion = (_h = object.browserVersion) !== null && _h !== void 0 ? _h : "";
|
1639
|
+
return message;
|
1640
|
+
},
|
1641
|
+
};
|
1280
1642
|
var globalThis = (() => {
|
1281
1643
|
if (typeof globalThis !== "undefined")
|
1282
1644
|
return globalThis;
|