livekit-client 0.15.0 → 0.15.1
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/.gitmodules +3 -0
- package/README.md +21 -4
- package/dist/api/SignalClient.d.ts +3 -1
- package/dist/api/SignalClient.js +12 -1
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/connect.js +3 -0
- package/dist/connect.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/logger.js +1 -0
- package/dist/logger.js.map +1 -1
- package/dist/options.d.ts +23 -14
- package/dist/proto/livekit_rtc.d.ts +65 -0
- package/dist/proto/livekit_rtc.js +481 -3
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/RTCEngine.d.ts +2 -0
- package/dist/room/RTCEngine.js +25 -31
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +7 -0
- package/dist/room/Room.js +72 -54
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +22 -6
- package/dist/room/events.js +21 -5
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +2 -0
- package/dist/room/participant/LocalParticipant.js +26 -5
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/RemoteParticipant.d.ts +1 -1
- package/dist/room/participant/RemoteParticipant.js +5 -3
- package/dist/room/participant/RemoteParticipant.js.map +1 -1
- package/dist/room/participant/publishUtils.d.ts +1 -1
- package/dist/room/participant/publishUtils.js +3 -3
- package/dist/room/participant/publishUtils.js.map +1 -1
- package/dist/room/participant/publishUtils.test.js +1 -1
- package/dist/room/participant/publishUtils.test.js.map +1 -1
- 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 +5 -1
- package/dist/room/track/LocalAudioTrack.js +45 -1
- package/dist/room/track/LocalAudioTrack.js.map +1 -1
- package/dist/room/track/LocalTrack.d.ts +3 -0
- package/dist/room/track/LocalTrack.js +5 -0
- package/dist/room/track/LocalTrack.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.d.ts +7 -0
- package/dist/room/track/LocalVideoTrack.js +111 -47
- package/dist/room/track/LocalVideoTrack.js.map +1 -1
- 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 +1 -1
- package/dist/room/track/RemoteTrackPublication.js +8 -8
- package/dist/room/track/RemoteTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.d.ts +9 -3
- package/dist/room/track/RemoteVideoTrack.js +71 -6
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.d.ts +9 -0
- package/dist/room/track/Track.js +28 -0
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/create.d.ts +23 -0
- package/dist/room/track/create.js +125 -0
- package/dist/room/track/create.js.map +1 -0
- 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/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 +14 -3
- package/example/sample.ts +52 -6
- package/package.json +2 -2
@@ -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.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;
|
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"));
|
@@ -103,6 +103,9 @@ exports.SignalRequest = {
|
|
103
103
|
if (message.updateLayers !== undefined) {
|
104
104
|
exports.UpdateVideoLayers.encode(message.updateLayers, writer.uint32(82).fork()).ldelim();
|
105
105
|
}
|
106
|
+
if (message.subscriptionPermissions !== undefined) {
|
107
|
+
exports.UpdateSubscriptionPermissions.encode(message.subscriptionPermissions, writer.uint32(90).fork()).ldelim();
|
108
|
+
}
|
106
109
|
return writer;
|
107
110
|
},
|
108
111
|
decode(input, length) {
|
@@ -139,6 +142,10 @@ exports.SignalRequest = {
|
|
139
142
|
case 10:
|
140
143
|
message.updateLayers = exports.UpdateVideoLayers.decode(reader, reader.uint32());
|
141
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;
|
@@ -202,6 +209,13 @@ exports.SignalRequest = {
|
|
202
209
|
else {
|
203
210
|
message.updateLayers = undefined;
|
204
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
|
+
}
|
205
219
|
return message;
|
206
220
|
},
|
207
221
|
toJSON(message) {
|
@@ -242,6 +256,10 @@ exports.SignalRequest = {
|
|
242
256
|
(obj.updateLayers = message.updateLayers
|
243
257
|
? exports.UpdateVideoLayers.toJSON(message.updateLayers)
|
244
258
|
: undefined);
|
259
|
+
message.subscriptionPermissions !== undefined &&
|
260
|
+
(obj.subscriptionPermissions = message.subscriptionPermissions
|
261
|
+
? exports.UpdateSubscriptionPermissions.toJSON(message.subscriptionPermissions)
|
262
|
+
: undefined);
|
245
263
|
return obj;
|
246
264
|
},
|
247
265
|
fromPartial(object) {
|
@@ -300,6 +318,14 @@ exports.SignalRequest = {
|
|
300
318
|
else {
|
301
319
|
message.updateLayers = undefined;
|
302
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
|
+
}
|
303
329
|
return message;
|
304
330
|
},
|
305
331
|
};
|
@@ -342,6 +368,12 @@ exports.SignalResponse = {
|
|
342
368
|
if (message.streamStateUpdate !== undefined) {
|
343
369
|
exports.StreamStateUpdate.encode(message.streamStateUpdate, writer.uint32(106).fork()).ldelim();
|
344
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
|
+
}
|
345
377
|
return writer;
|
346
378
|
},
|
347
379
|
decode(input, length) {
|
@@ -387,6 +419,13 @@ exports.SignalResponse = {
|
|
387
419
|
case 13:
|
388
420
|
message.streamStateUpdate = exports.StreamStateUpdate.decode(reader, reader.uint32());
|
389
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;
|
390
429
|
default:
|
391
430
|
reader.skipType(tag & 7);
|
392
431
|
break;
|
@@ -471,6 +510,21 @@ exports.SignalResponse = {
|
|
471
510
|
else {
|
472
511
|
message.streamStateUpdate = undefined;
|
473
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
|
+
}
|
474
528
|
return message;
|
475
529
|
},
|
476
530
|
toJSON(message) {
|
@@ -521,6 +575,14 @@ exports.SignalResponse = {
|
|
521
575
|
(obj.streamStateUpdate = message.streamStateUpdate
|
522
576
|
? exports.StreamStateUpdate.toJSON(message.streamStateUpdate)
|
523
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);
|
524
586
|
return obj;
|
525
587
|
},
|
526
588
|
fromPartial(object) {
|
@@ -600,6 +662,21 @@ exports.SignalResponse = {
|
|
600
662
|
else {
|
601
663
|
message.streamStateUpdate = undefined;
|
602
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
|
+
}
|
603
680
|
return message;
|
604
681
|
},
|
605
682
|
};
|
@@ -1777,7 +1854,11 @@ exports.RoomUpdate = {
|
|
1777
1854
|
return message;
|
1778
1855
|
},
|
1779
1856
|
};
|
1780
|
-
const baseConnectionQualityInfo = {
|
1857
|
+
const baseConnectionQualityInfo = {
|
1858
|
+
participantSid: "",
|
1859
|
+
quality: 0,
|
1860
|
+
score: 0,
|
1861
|
+
};
|
1781
1862
|
exports.ConnectionQualityInfo = {
|
1782
1863
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
1783
1864
|
if (message.participantSid !== "") {
|
@@ -1786,6 +1867,9 @@ exports.ConnectionQualityInfo = {
|
|
1786
1867
|
if (message.quality !== 0) {
|
1787
1868
|
writer.uint32(16).int32(message.quality);
|
1788
1869
|
}
|
1870
|
+
if (message.score !== 0) {
|
1871
|
+
writer.uint32(29).float(message.score);
|
1872
|
+
}
|
1789
1873
|
return writer;
|
1790
1874
|
},
|
1791
1875
|
decode(input, length) {
|
@@ -1801,6 +1885,9 @@ exports.ConnectionQualityInfo = {
|
|
1801
1885
|
case 2:
|
1802
1886
|
message.quality = reader.int32();
|
1803
1887
|
break;
|
1888
|
+
case 3:
|
1889
|
+
message.score = reader.float();
|
1890
|
+
break;
|
1804
1891
|
default:
|
1805
1892
|
reader.skipType(tag & 7);
|
1806
1893
|
break;
|
@@ -1822,6 +1909,12 @@ exports.ConnectionQualityInfo = {
|
|
1822
1909
|
else {
|
1823
1910
|
message.quality = 0;
|
1824
1911
|
}
|
1912
|
+
if (object.score !== undefined && object.score !== null) {
|
1913
|
+
message.score = Number(object.score);
|
1914
|
+
}
|
1915
|
+
else {
|
1916
|
+
message.score = 0;
|
1917
|
+
}
|
1825
1918
|
return message;
|
1826
1919
|
},
|
1827
1920
|
toJSON(message) {
|
@@ -1830,13 +1923,15 @@ exports.ConnectionQualityInfo = {
|
|
1830
1923
|
(obj.participantSid = message.participantSid);
|
1831
1924
|
message.quality !== undefined &&
|
1832
1925
|
(obj.quality = livekit_models_1.connectionQualityToJSON(message.quality));
|
1926
|
+
message.score !== undefined && (obj.score = message.score);
|
1833
1927
|
return obj;
|
1834
1928
|
},
|
1835
1929
|
fromPartial(object) {
|
1836
|
-
var _a, _b;
|
1930
|
+
var _a, _b, _c;
|
1837
1931
|
const message = Object.assign({}, baseConnectionQualityInfo);
|
1838
1932
|
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
1839
1933
|
message.quality = (_b = object.quality) !== null && _b !== void 0 ? _b : 0;
|
1934
|
+
message.score = (_c = object.score) !== null && _c !== void 0 ? _c : 0;
|
1840
1935
|
return message;
|
1841
1936
|
},
|
1842
1937
|
};
|
@@ -2035,6 +2130,389 @@ exports.StreamStateUpdate = {
|
|
2035
2130
|
return message;
|
2036
2131
|
},
|
2037
2132
|
};
|
2133
|
+
const baseSubscribedQuality = { quality: 0, enabled: false };
|
2134
|
+
exports.SubscribedQuality = {
|
2135
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2136
|
+
if (message.quality !== 0) {
|
2137
|
+
writer.uint32(8).int32(message.quality);
|
2138
|
+
}
|
2139
|
+
if (message.enabled === true) {
|
2140
|
+
writer.uint32(16).bool(message.enabled);
|
2141
|
+
}
|
2142
|
+
return writer;
|
2143
|
+
},
|
2144
|
+
decode(input, length) {
|
2145
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2146
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2147
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2148
|
+
while (reader.pos < end) {
|
2149
|
+
const tag = reader.uint32();
|
2150
|
+
switch (tag >>> 3) {
|
2151
|
+
case 1:
|
2152
|
+
message.quality = reader.int32();
|
2153
|
+
break;
|
2154
|
+
case 2:
|
2155
|
+
message.enabled = reader.bool();
|
2156
|
+
break;
|
2157
|
+
default:
|
2158
|
+
reader.skipType(tag & 7);
|
2159
|
+
break;
|
2160
|
+
}
|
2161
|
+
}
|
2162
|
+
return message;
|
2163
|
+
},
|
2164
|
+
fromJSON(object) {
|
2165
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2166
|
+
if (object.quality !== undefined && object.quality !== null) {
|
2167
|
+
message.quality = livekit_models_1.videoQualityFromJSON(object.quality);
|
2168
|
+
}
|
2169
|
+
else {
|
2170
|
+
message.quality = 0;
|
2171
|
+
}
|
2172
|
+
if (object.enabled !== undefined && object.enabled !== null) {
|
2173
|
+
message.enabled = Boolean(object.enabled);
|
2174
|
+
}
|
2175
|
+
else {
|
2176
|
+
message.enabled = false;
|
2177
|
+
}
|
2178
|
+
return message;
|
2179
|
+
},
|
2180
|
+
toJSON(message) {
|
2181
|
+
const obj = {};
|
2182
|
+
message.quality !== undefined &&
|
2183
|
+
(obj.quality = livekit_models_1.videoQualityToJSON(message.quality));
|
2184
|
+
message.enabled !== undefined && (obj.enabled = message.enabled);
|
2185
|
+
return obj;
|
2186
|
+
},
|
2187
|
+
fromPartial(object) {
|
2188
|
+
var _a, _b;
|
2189
|
+
const message = Object.assign({}, baseSubscribedQuality);
|
2190
|
+
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
2191
|
+
message.enabled = (_b = object.enabled) !== null && _b !== void 0 ? _b : false;
|
2192
|
+
return message;
|
2193
|
+
},
|
2194
|
+
};
|
2195
|
+
const baseSubscribedQualityUpdate = { trackSid: "" };
|
2196
|
+
exports.SubscribedQualityUpdate = {
|
2197
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2198
|
+
if (message.trackSid !== "") {
|
2199
|
+
writer.uint32(10).string(message.trackSid);
|
2200
|
+
}
|
2201
|
+
for (const v of message.subscribedQualities) {
|
2202
|
+
exports.SubscribedQuality.encode(v, writer.uint32(18).fork()).ldelim();
|
2203
|
+
}
|
2204
|
+
return writer;
|
2205
|
+
},
|
2206
|
+
decode(input, length) {
|
2207
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2208
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2209
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2210
|
+
message.subscribedQualities = [];
|
2211
|
+
while (reader.pos < end) {
|
2212
|
+
const tag = reader.uint32();
|
2213
|
+
switch (tag >>> 3) {
|
2214
|
+
case 1:
|
2215
|
+
message.trackSid = reader.string();
|
2216
|
+
break;
|
2217
|
+
case 2:
|
2218
|
+
message.subscribedQualities.push(exports.SubscribedQuality.decode(reader, reader.uint32()));
|
2219
|
+
break;
|
2220
|
+
default:
|
2221
|
+
reader.skipType(tag & 7);
|
2222
|
+
break;
|
2223
|
+
}
|
2224
|
+
}
|
2225
|
+
return message;
|
2226
|
+
},
|
2227
|
+
fromJSON(object) {
|
2228
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2229
|
+
message.subscribedQualities = [];
|
2230
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2231
|
+
message.trackSid = String(object.trackSid);
|
2232
|
+
}
|
2233
|
+
else {
|
2234
|
+
message.trackSid = "";
|
2235
|
+
}
|
2236
|
+
if (object.subscribedQualities !== undefined &&
|
2237
|
+
object.subscribedQualities !== null) {
|
2238
|
+
for (const e of object.subscribedQualities) {
|
2239
|
+
message.subscribedQualities.push(exports.SubscribedQuality.fromJSON(e));
|
2240
|
+
}
|
2241
|
+
}
|
2242
|
+
return message;
|
2243
|
+
},
|
2244
|
+
toJSON(message) {
|
2245
|
+
const obj = {};
|
2246
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2247
|
+
if (message.subscribedQualities) {
|
2248
|
+
obj.subscribedQualities = message.subscribedQualities.map((e) => e ? exports.SubscribedQuality.toJSON(e) : undefined);
|
2249
|
+
}
|
2250
|
+
else {
|
2251
|
+
obj.subscribedQualities = [];
|
2252
|
+
}
|
2253
|
+
return obj;
|
2254
|
+
},
|
2255
|
+
fromPartial(object) {
|
2256
|
+
var _a;
|
2257
|
+
const message = Object.assign({}, baseSubscribedQualityUpdate);
|
2258
|
+
message.trackSid = (_a = object.trackSid) !== null && _a !== void 0 ? _a : "";
|
2259
|
+
message.subscribedQualities = [];
|
2260
|
+
if (object.subscribedQualities !== undefined &&
|
2261
|
+
object.subscribedQualities !== null) {
|
2262
|
+
for (const e of object.subscribedQualities) {
|
2263
|
+
message.subscribedQualities.push(exports.SubscribedQuality.fromPartial(e));
|
2264
|
+
}
|
2265
|
+
}
|
2266
|
+
return message;
|
2267
|
+
},
|
2268
|
+
};
|
2269
|
+
const baseTrackPermission = {
|
2270
|
+
participantSid: "",
|
2271
|
+
allTracks: false,
|
2272
|
+
trackSids: "",
|
2273
|
+
};
|
2274
|
+
exports.TrackPermission = {
|
2275
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2276
|
+
if (message.participantSid !== "") {
|
2277
|
+
writer.uint32(10).string(message.participantSid);
|
2278
|
+
}
|
2279
|
+
if (message.allTracks === true) {
|
2280
|
+
writer.uint32(16).bool(message.allTracks);
|
2281
|
+
}
|
2282
|
+
for (const v of message.trackSids) {
|
2283
|
+
writer.uint32(26).string(v);
|
2284
|
+
}
|
2285
|
+
return writer;
|
2286
|
+
},
|
2287
|
+
decode(input, length) {
|
2288
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2289
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2290
|
+
const message = Object.assign({}, baseTrackPermission);
|
2291
|
+
message.trackSids = [];
|
2292
|
+
while (reader.pos < end) {
|
2293
|
+
const tag = reader.uint32();
|
2294
|
+
switch (tag >>> 3) {
|
2295
|
+
case 1:
|
2296
|
+
message.participantSid = reader.string();
|
2297
|
+
break;
|
2298
|
+
case 2:
|
2299
|
+
message.allTracks = reader.bool();
|
2300
|
+
break;
|
2301
|
+
case 3:
|
2302
|
+
message.trackSids.push(reader.string());
|
2303
|
+
break;
|
2304
|
+
default:
|
2305
|
+
reader.skipType(tag & 7);
|
2306
|
+
break;
|
2307
|
+
}
|
2308
|
+
}
|
2309
|
+
return message;
|
2310
|
+
},
|
2311
|
+
fromJSON(object) {
|
2312
|
+
const message = Object.assign({}, baseTrackPermission);
|
2313
|
+
message.trackSids = [];
|
2314
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2315
|
+
message.participantSid = String(object.participantSid);
|
2316
|
+
}
|
2317
|
+
else {
|
2318
|
+
message.participantSid = "";
|
2319
|
+
}
|
2320
|
+
if (object.allTracks !== undefined && object.allTracks !== null) {
|
2321
|
+
message.allTracks = Boolean(object.allTracks);
|
2322
|
+
}
|
2323
|
+
else {
|
2324
|
+
message.allTracks = false;
|
2325
|
+
}
|
2326
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2327
|
+
for (const e of object.trackSids) {
|
2328
|
+
message.trackSids.push(String(e));
|
2329
|
+
}
|
2330
|
+
}
|
2331
|
+
return message;
|
2332
|
+
},
|
2333
|
+
toJSON(message) {
|
2334
|
+
const obj = {};
|
2335
|
+
message.participantSid !== undefined &&
|
2336
|
+
(obj.participantSid = message.participantSid);
|
2337
|
+
message.allTracks !== undefined && (obj.allTracks = message.allTracks);
|
2338
|
+
if (message.trackSids) {
|
2339
|
+
obj.trackSids = message.trackSids.map((e) => e);
|
2340
|
+
}
|
2341
|
+
else {
|
2342
|
+
obj.trackSids = [];
|
2343
|
+
}
|
2344
|
+
return obj;
|
2345
|
+
},
|
2346
|
+
fromPartial(object) {
|
2347
|
+
var _a, _b;
|
2348
|
+
const message = Object.assign({}, baseTrackPermission);
|
2349
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2350
|
+
message.allTracks = (_b = object.allTracks) !== null && _b !== void 0 ? _b : false;
|
2351
|
+
message.trackSids = [];
|
2352
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
2353
|
+
for (const e of object.trackSids) {
|
2354
|
+
message.trackSids.push(e);
|
2355
|
+
}
|
2356
|
+
}
|
2357
|
+
return message;
|
2358
|
+
},
|
2359
|
+
};
|
2360
|
+
const baseUpdateSubscriptionPermissions = { allParticipants: false };
|
2361
|
+
exports.UpdateSubscriptionPermissions = {
|
2362
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2363
|
+
if (message.allParticipants === true) {
|
2364
|
+
writer.uint32(8).bool(message.allParticipants);
|
2365
|
+
}
|
2366
|
+
for (const v of message.trackPermissions) {
|
2367
|
+
exports.TrackPermission.encode(v, writer.uint32(18).fork()).ldelim();
|
2368
|
+
}
|
2369
|
+
return writer;
|
2370
|
+
},
|
2371
|
+
decode(input, length) {
|
2372
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2373
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2374
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2375
|
+
message.trackPermissions = [];
|
2376
|
+
while (reader.pos < end) {
|
2377
|
+
const tag = reader.uint32();
|
2378
|
+
switch (tag >>> 3) {
|
2379
|
+
case 1:
|
2380
|
+
message.allParticipants = reader.bool();
|
2381
|
+
break;
|
2382
|
+
case 2:
|
2383
|
+
message.trackPermissions.push(exports.TrackPermission.decode(reader, reader.uint32()));
|
2384
|
+
break;
|
2385
|
+
default:
|
2386
|
+
reader.skipType(tag & 7);
|
2387
|
+
break;
|
2388
|
+
}
|
2389
|
+
}
|
2390
|
+
return message;
|
2391
|
+
},
|
2392
|
+
fromJSON(object) {
|
2393
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2394
|
+
message.trackPermissions = [];
|
2395
|
+
if (object.allParticipants !== undefined &&
|
2396
|
+
object.allParticipants !== null) {
|
2397
|
+
message.allParticipants = Boolean(object.allParticipants);
|
2398
|
+
}
|
2399
|
+
else {
|
2400
|
+
message.allParticipants = false;
|
2401
|
+
}
|
2402
|
+
if (object.trackPermissions !== undefined &&
|
2403
|
+
object.trackPermissions !== null) {
|
2404
|
+
for (const e of object.trackPermissions) {
|
2405
|
+
message.trackPermissions.push(exports.TrackPermission.fromJSON(e));
|
2406
|
+
}
|
2407
|
+
}
|
2408
|
+
return message;
|
2409
|
+
},
|
2410
|
+
toJSON(message) {
|
2411
|
+
const obj = {};
|
2412
|
+
message.allParticipants !== undefined &&
|
2413
|
+
(obj.allParticipants = message.allParticipants);
|
2414
|
+
if (message.trackPermissions) {
|
2415
|
+
obj.trackPermissions = message.trackPermissions.map((e) => e ? exports.TrackPermission.toJSON(e) : undefined);
|
2416
|
+
}
|
2417
|
+
else {
|
2418
|
+
obj.trackPermissions = [];
|
2419
|
+
}
|
2420
|
+
return obj;
|
2421
|
+
},
|
2422
|
+
fromPartial(object) {
|
2423
|
+
var _a;
|
2424
|
+
const message = Object.assign({}, baseUpdateSubscriptionPermissions);
|
2425
|
+
message.allParticipants = (_a = object.allParticipants) !== null && _a !== void 0 ? _a : false;
|
2426
|
+
message.trackPermissions = [];
|
2427
|
+
if (object.trackPermissions !== undefined &&
|
2428
|
+
object.trackPermissions !== null) {
|
2429
|
+
for (const e of object.trackPermissions) {
|
2430
|
+
message.trackPermissions.push(exports.TrackPermission.fromPartial(e));
|
2431
|
+
}
|
2432
|
+
}
|
2433
|
+
return message;
|
2434
|
+
},
|
2435
|
+
};
|
2436
|
+
const baseSubscriptionPermissionUpdate = {
|
2437
|
+
participantSid: "",
|
2438
|
+
trackSid: "",
|
2439
|
+
allowed: false,
|
2440
|
+
};
|
2441
|
+
exports.SubscriptionPermissionUpdate = {
|
2442
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
2443
|
+
if (message.participantSid !== "") {
|
2444
|
+
writer.uint32(10).string(message.participantSid);
|
2445
|
+
}
|
2446
|
+
if (message.trackSid !== "") {
|
2447
|
+
writer.uint32(18).string(message.trackSid);
|
2448
|
+
}
|
2449
|
+
if (message.allowed === true) {
|
2450
|
+
writer.uint32(24).bool(message.allowed);
|
2451
|
+
}
|
2452
|
+
return writer;
|
2453
|
+
},
|
2454
|
+
decode(input, length) {
|
2455
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
2456
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2457
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2458
|
+
while (reader.pos < end) {
|
2459
|
+
const tag = reader.uint32();
|
2460
|
+
switch (tag >>> 3) {
|
2461
|
+
case 1:
|
2462
|
+
message.participantSid = reader.string();
|
2463
|
+
break;
|
2464
|
+
case 2:
|
2465
|
+
message.trackSid = reader.string();
|
2466
|
+
break;
|
2467
|
+
case 3:
|
2468
|
+
message.allowed = reader.bool();
|
2469
|
+
break;
|
2470
|
+
default:
|
2471
|
+
reader.skipType(tag & 7);
|
2472
|
+
break;
|
2473
|
+
}
|
2474
|
+
}
|
2475
|
+
return message;
|
2476
|
+
},
|
2477
|
+
fromJSON(object) {
|
2478
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2479
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
2480
|
+
message.participantSid = String(object.participantSid);
|
2481
|
+
}
|
2482
|
+
else {
|
2483
|
+
message.participantSid = "";
|
2484
|
+
}
|
2485
|
+
if (object.trackSid !== undefined && object.trackSid !== null) {
|
2486
|
+
message.trackSid = String(object.trackSid);
|
2487
|
+
}
|
2488
|
+
else {
|
2489
|
+
message.trackSid = "";
|
2490
|
+
}
|
2491
|
+
if (object.allowed !== undefined && object.allowed !== null) {
|
2492
|
+
message.allowed = Boolean(object.allowed);
|
2493
|
+
}
|
2494
|
+
else {
|
2495
|
+
message.allowed = false;
|
2496
|
+
}
|
2497
|
+
return message;
|
2498
|
+
},
|
2499
|
+
toJSON(message) {
|
2500
|
+
const obj = {};
|
2501
|
+
message.participantSid !== undefined &&
|
2502
|
+
(obj.participantSid = message.participantSid);
|
2503
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2504
|
+
message.allowed !== undefined && (obj.allowed = message.allowed);
|
2505
|
+
return obj;
|
2506
|
+
},
|
2507
|
+
fromPartial(object) {
|
2508
|
+
var _a, _b, _c;
|
2509
|
+
const message = Object.assign({}, baseSubscriptionPermissionUpdate);
|
2510
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
2511
|
+
message.trackSid = (_b = object.trackSid) !== null && _b !== void 0 ? _b : "";
|
2512
|
+
message.allowed = (_c = object.allowed) !== null && _c !== void 0 ? _c : false;
|
2513
|
+
return message;
|
2514
|
+
},
|
2515
|
+
};
|
2038
2516
|
if (minimal_1.default.util.Long !== long_1.default) {
|
2039
2517
|
minimal_1.default.util.Long = long_1.default;
|
2040
2518
|
minimal_1.default.configure();
|