livekit-server-sdk 0.5.7 → 0.5.10
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 +5 -1
- package/dist/AccessToken.d.ts +5 -0
- package/dist/AccessToken.js +6 -0
- package/dist/AccessToken.js.map +1 -1
- package/dist/AccessToken.test.js +4 -0
- package/dist/AccessToken.test.js.map +1 -1
- package/dist/EgressClient.d.ts +45 -0
- package/dist/EgressClient.js +132 -0
- package/dist/EgressClient.js.map +1 -0
- package/dist/RoomServiceClient.d.ts +8 -3
- package/dist/RoomServiceClient.js +9 -2
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/WebhookReceiver.d.ts +7 -0
- package/dist/WebhookReceiver.js +7 -0
- package/dist/WebhookReceiver.js.map +1 -1
- package/dist/grants.d.ts +4 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts +6 -2
- package/dist/proto/google/protobuf/empty.js +31 -11
- package/dist/proto/google/protobuf/empty.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +132 -0
- package/dist/proto/google/protobuf/timestamp.js +108 -0
- package/dist/proto/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto/livekit_egress.d.ts +1948 -0
- package/dist/proto/livekit_egress.js +1834 -0
- package/dist/proto/livekit_egress.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +697 -11
- package/dist/proto/livekit_models.js +1507 -573
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_recording.d.ts +200 -16
- package/dist/proto/livekit_recording.js +272 -502
- package/dist/proto/livekit_recording.js.map +1 -1
- package/dist/proto/livekit_room.d.ts +565 -37
- package/dist/proto/livekit_room.js +334 -603
- package/dist/proto/livekit_room.js.map +1 -1
- package/dist/proto/livekit_webhook.d.ts +930 -5
- package/dist/proto/livekit_webhook.js +133 -59
- package/dist/proto/livekit_webhook.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,22 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UpdateRoomMetadataRequest = exports.SendDataResponse = exports.SendDataRequest = exports.UpdateSubscriptionsResponse = exports.UpdateSubscriptionsRequest = exports.UpdateParticipantRequest = exports.
|
|
25
|
+
exports.UpdateRoomMetadataRequest = exports.SendDataResponse = exports.SendDataRequest = exports.UpdateSubscriptionsResponse = exports.UpdateSubscriptionsRequest = exports.UpdateParticipantRequest = exports.MuteRoomTrackResponse = exports.MuteRoomTrackRequest = exports.RemoveParticipantResponse = exports.RoomParticipantIdentity = exports.ListParticipantsResponse = exports.ListParticipantsRequest = exports.DeleteRoomResponse = exports.DeleteRoomRequest = exports.ListRoomsResponse = exports.ListRoomsRequest = exports.CreateRoomRequest = exports.protobufPackage = void 0;
|
|
7
26
|
/* eslint-disable */
|
|
8
27
|
const long_1 = __importDefault(require("long"));
|
|
9
|
-
const
|
|
28
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
10
29
|
const livekit_models_1 = require("./livekit_models");
|
|
11
30
|
exports.protobufPackage = "livekit";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
function createBaseCreateRoomRequest() {
|
|
32
|
+
return {
|
|
33
|
+
name: "",
|
|
34
|
+
emptyTimeout: 0,
|
|
35
|
+
maxParticipants: 0,
|
|
36
|
+
nodeId: "",
|
|
37
|
+
metadata: "",
|
|
38
|
+
};
|
|
39
|
+
}
|
|
18
40
|
exports.CreateRoomRequest = {
|
|
19
|
-
encode(message, writer =
|
|
41
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
20
42
|
if (message.name !== "") {
|
|
21
43
|
writer.uint32(10).string(message.name);
|
|
22
44
|
}
|
|
@@ -29,12 +51,15 @@ exports.CreateRoomRequest = {
|
|
|
29
51
|
if (message.nodeId !== "") {
|
|
30
52
|
writer.uint32(34).string(message.nodeId);
|
|
31
53
|
}
|
|
54
|
+
if (message.metadata !== "") {
|
|
55
|
+
writer.uint32(42).string(message.metadata);
|
|
56
|
+
}
|
|
32
57
|
return writer;
|
|
33
58
|
},
|
|
34
59
|
decode(input, length) {
|
|
35
|
-
const reader = input instanceof
|
|
60
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
36
61
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
-
const message =
|
|
62
|
+
const message = createBaseCreateRoomRequest();
|
|
38
63
|
while (reader.pos < end) {
|
|
39
64
|
const tag = reader.uint32();
|
|
40
65
|
switch (tag >>> 3) {
|
|
@@ -50,6 +75,9 @@ exports.CreateRoomRequest = {
|
|
|
50
75
|
case 4:
|
|
51
76
|
message.nodeId = reader.string();
|
|
52
77
|
break;
|
|
78
|
+
case 5:
|
|
79
|
+
message.metadata = reader.string();
|
|
80
|
+
break;
|
|
53
81
|
default:
|
|
54
82
|
reader.skipType(tag & 7);
|
|
55
83
|
break;
|
|
@@ -58,86 +86,60 @@ exports.CreateRoomRequest = {
|
|
|
58
86
|
return message;
|
|
59
87
|
},
|
|
60
88
|
fromJSON(object) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
message.emptyTimeout = 0;
|
|
73
|
-
}
|
|
74
|
-
if (object.maxParticipants !== undefined &&
|
|
75
|
-
object.maxParticipants !== null) {
|
|
76
|
-
message.maxParticipants = Number(object.maxParticipants);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
message.maxParticipants = 0;
|
|
80
|
-
}
|
|
81
|
-
if (object.nodeId !== undefined && object.nodeId !== null) {
|
|
82
|
-
message.nodeId = String(object.nodeId);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
message.nodeId = "";
|
|
86
|
-
}
|
|
87
|
-
return message;
|
|
89
|
+
return {
|
|
90
|
+
name: isSet(object.name) ? String(object.name) : "",
|
|
91
|
+
emptyTimeout: isSet(object.emptyTimeout)
|
|
92
|
+
? Number(object.emptyTimeout)
|
|
93
|
+
: 0,
|
|
94
|
+
maxParticipants: isSet(object.maxParticipants)
|
|
95
|
+
? Number(object.maxParticipants)
|
|
96
|
+
: 0,
|
|
97
|
+
nodeId: isSet(object.nodeId) ? String(object.nodeId) : "",
|
|
98
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
|
99
|
+
};
|
|
88
100
|
},
|
|
89
101
|
toJSON(message) {
|
|
90
102
|
const obj = {};
|
|
91
103
|
message.name !== undefined && (obj.name = message.name);
|
|
92
104
|
message.emptyTimeout !== undefined &&
|
|
93
|
-
(obj.emptyTimeout = message.emptyTimeout);
|
|
105
|
+
(obj.emptyTimeout = Math.round(message.emptyTimeout));
|
|
94
106
|
message.maxParticipants !== undefined &&
|
|
95
|
-
(obj.maxParticipants = message.maxParticipants);
|
|
107
|
+
(obj.maxParticipants = Math.round(message.maxParticipants));
|
|
96
108
|
message.nodeId !== undefined && (obj.nodeId = message.nodeId);
|
|
109
|
+
message.metadata !== undefined && (obj.metadata = message.metadata);
|
|
97
110
|
return obj;
|
|
98
111
|
},
|
|
99
112
|
fromPartial(object) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (object.emptyTimeout !== undefined && object.emptyTimeout !== null) {
|
|
108
|
-
message.emptyTimeout = object.emptyTimeout;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
message.emptyTimeout = 0;
|
|
112
|
-
}
|
|
113
|
-
if (object.maxParticipants !== undefined &&
|
|
114
|
-
object.maxParticipants !== null) {
|
|
115
|
-
message.maxParticipants = object.maxParticipants;
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
message.maxParticipants = 0;
|
|
119
|
-
}
|
|
120
|
-
if (object.nodeId !== undefined && object.nodeId !== null) {
|
|
121
|
-
message.nodeId = object.nodeId;
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
message.nodeId = "";
|
|
125
|
-
}
|
|
113
|
+
var _a, _b, _c, _d, _e;
|
|
114
|
+
const message = createBaseCreateRoomRequest();
|
|
115
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
116
|
+
message.emptyTimeout = (_b = object.emptyTimeout) !== null && _b !== void 0 ? _b : 0;
|
|
117
|
+
message.maxParticipants = (_c = object.maxParticipants) !== null && _c !== void 0 ? _c : 0;
|
|
118
|
+
message.nodeId = (_d = object.nodeId) !== null && _d !== void 0 ? _d : "";
|
|
119
|
+
message.metadata = (_e = object.metadata) !== null && _e !== void 0 ? _e : "";
|
|
126
120
|
return message;
|
|
127
121
|
},
|
|
128
122
|
};
|
|
129
|
-
|
|
123
|
+
function createBaseListRoomsRequest() {
|
|
124
|
+
return { names: [] };
|
|
125
|
+
}
|
|
130
126
|
exports.ListRoomsRequest = {
|
|
131
|
-
encode(
|
|
127
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
128
|
+
for (const v of message.names) {
|
|
129
|
+
writer.uint32(10).string(v);
|
|
130
|
+
}
|
|
132
131
|
return writer;
|
|
133
132
|
},
|
|
134
133
|
decode(input, length) {
|
|
135
|
-
const reader = input instanceof
|
|
134
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
136
135
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
137
|
-
const message =
|
|
136
|
+
const message = createBaseListRoomsRequest();
|
|
138
137
|
while (reader.pos < end) {
|
|
139
138
|
const tag = reader.uint32();
|
|
140
139
|
switch (tag >>> 3) {
|
|
140
|
+
case 1:
|
|
141
|
+
message.names.push(reader.string());
|
|
142
|
+
break;
|
|
141
143
|
default:
|
|
142
144
|
reader.skipType(tag & 7);
|
|
143
145
|
break;
|
|
@@ -145,32 +147,44 @@ exports.ListRoomsRequest = {
|
|
|
145
147
|
}
|
|
146
148
|
return message;
|
|
147
149
|
},
|
|
148
|
-
fromJSON(
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
fromJSON(object) {
|
|
151
|
+
return {
|
|
152
|
+
names: Array.isArray(object === null || object === void 0 ? void 0 : object.names)
|
|
153
|
+
? object.names.map((e) => String(e))
|
|
154
|
+
: [],
|
|
155
|
+
};
|
|
151
156
|
},
|
|
152
|
-
toJSON(
|
|
157
|
+
toJSON(message) {
|
|
153
158
|
const obj = {};
|
|
159
|
+
if (message.names) {
|
|
160
|
+
obj.names = message.names.map((e) => e);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
obj.names = [];
|
|
164
|
+
}
|
|
154
165
|
return obj;
|
|
155
166
|
},
|
|
156
|
-
fromPartial(
|
|
157
|
-
|
|
167
|
+
fromPartial(object) {
|
|
168
|
+
var _a;
|
|
169
|
+
const message = createBaseListRoomsRequest();
|
|
170
|
+
message.names = ((_a = object.names) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
158
171
|
return message;
|
|
159
172
|
},
|
|
160
173
|
};
|
|
161
|
-
|
|
174
|
+
function createBaseListRoomsResponse() {
|
|
175
|
+
return { rooms: [] };
|
|
176
|
+
}
|
|
162
177
|
exports.ListRoomsResponse = {
|
|
163
|
-
encode(message, writer =
|
|
178
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
164
179
|
for (const v of message.rooms) {
|
|
165
180
|
livekit_models_1.Room.encode(v, writer.uint32(10).fork()).ldelim();
|
|
166
181
|
}
|
|
167
182
|
return writer;
|
|
168
183
|
},
|
|
169
184
|
decode(input, length) {
|
|
170
|
-
const reader = input instanceof
|
|
185
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
171
186
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
172
|
-
const message =
|
|
173
|
-
message.rooms = [];
|
|
187
|
+
const message = createBaseListRoomsResponse();
|
|
174
188
|
while (reader.pos < end) {
|
|
175
189
|
const tag = reader.uint32();
|
|
176
190
|
switch (tag >>> 3) {
|
|
@@ -185,14 +199,11 @@ exports.ListRoomsResponse = {
|
|
|
185
199
|
return message;
|
|
186
200
|
},
|
|
187
201
|
fromJSON(object) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return message;
|
|
202
|
+
return {
|
|
203
|
+
rooms: Array.isArray(object === null || object === void 0 ? void 0 : object.rooms)
|
|
204
|
+
? object.rooms.map((e) => livekit_models_1.Room.fromJSON(e))
|
|
205
|
+
: [],
|
|
206
|
+
};
|
|
196
207
|
},
|
|
197
208
|
toJSON(message) {
|
|
198
209
|
const obj = {};
|
|
@@ -205,28 +216,26 @@ exports.ListRoomsResponse = {
|
|
|
205
216
|
return obj;
|
|
206
217
|
},
|
|
207
218
|
fromPartial(object) {
|
|
208
|
-
|
|
209
|
-
message
|
|
210
|
-
|
|
211
|
-
for (const e of object.rooms) {
|
|
212
|
-
message.rooms.push(livekit_models_1.Room.fromPartial(e));
|
|
213
|
-
}
|
|
214
|
-
}
|
|
219
|
+
var _a;
|
|
220
|
+
const message = createBaseListRoomsResponse();
|
|
221
|
+
message.rooms = ((_a = object.rooms) === null || _a === void 0 ? void 0 : _a.map((e) => livekit_models_1.Room.fromPartial(e))) || [];
|
|
215
222
|
return message;
|
|
216
223
|
},
|
|
217
224
|
};
|
|
218
|
-
|
|
225
|
+
function createBaseDeleteRoomRequest() {
|
|
226
|
+
return { room: "" };
|
|
227
|
+
}
|
|
219
228
|
exports.DeleteRoomRequest = {
|
|
220
|
-
encode(message, writer =
|
|
229
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
221
230
|
if (message.room !== "") {
|
|
222
231
|
writer.uint32(10).string(message.room);
|
|
223
232
|
}
|
|
224
233
|
return writer;
|
|
225
234
|
},
|
|
226
235
|
decode(input, length) {
|
|
227
|
-
const reader = input instanceof
|
|
236
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
228
237
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
229
|
-
const message =
|
|
238
|
+
const message = createBaseDeleteRoomRequest();
|
|
230
239
|
while (reader.pos < end) {
|
|
231
240
|
const tag = reader.uint32();
|
|
232
241
|
switch (tag >>> 3) {
|
|
@@ -241,14 +250,9 @@ exports.DeleteRoomRequest = {
|
|
|
241
250
|
return message;
|
|
242
251
|
},
|
|
243
252
|
fromJSON(object) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
message.room = "";
|
|
250
|
-
}
|
|
251
|
-
return message;
|
|
253
|
+
return {
|
|
254
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
255
|
+
};
|
|
252
256
|
},
|
|
253
257
|
toJSON(message) {
|
|
254
258
|
const obj = {};
|
|
@@ -256,25 +260,23 @@ exports.DeleteRoomRequest = {
|
|
|
256
260
|
return obj;
|
|
257
261
|
},
|
|
258
262
|
fromPartial(object) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
message.room = "";
|
|
265
|
-
}
|
|
263
|
+
var _a;
|
|
264
|
+
const message = createBaseDeleteRoomRequest();
|
|
265
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
266
266
|
return message;
|
|
267
267
|
},
|
|
268
268
|
};
|
|
269
|
-
|
|
269
|
+
function createBaseDeleteRoomResponse() {
|
|
270
|
+
return {};
|
|
271
|
+
}
|
|
270
272
|
exports.DeleteRoomResponse = {
|
|
271
|
-
encode(_, writer =
|
|
273
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
272
274
|
return writer;
|
|
273
275
|
},
|
|
274
276
|
decode(input, length) {
|
|
275
|
-
const reader = input instanceof
|
|
277
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
276
278
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
277
|
-
const message =
|
|
279
|
+
const message = createBaseDeleteRoomResponse();
|
|
278
280
|
while (reader.pos < end) {
|
|
279
281
|
const tag = reader.uint32();
|
|
280
282
|
switch (tag >>> 3) {
|
|
@@ -286,30 +288,31 @@ exports.DeleteRoomResponse = {
|
|
|
286
288
|
return message;
|
|
287
289
|
},
|
|
288
290
|
fromJSON(_) {
|
|
289
|
-
|
|
290
|
-
return message;
|
|
291
|
+
return {};
|
|
291
292
|
},
|
|
292
293
|
toJSON(_) {
|
|
293
294
|
const obj = {};
|
|
294
295
|
return obj;
|
|
295
296
|
},
|
|
296
297
|
fromPartial(_) {
|
|
297
|
-
const message =
|
|
298
|
+
const message = createBaseDeleteRoomResponse();
|
|
298
299
|
return message;
|
|
299
300
|
},
|
|
300
301
|
};
|
|
301
|
-
|
|
302
|
+
function createBaseListParticipantsRequest() {
|
|
303
|
+
return { room: "" };
|
|
304
|
+
}
|
|
302
305
|
exports.ListParticipantsRequest = {
|
|
303
|
-
encode(message, writer =
|
|
306
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
304
307
|
if (message.room !== "") {
|
|
305
308
|
writer.uint32(10).string(message.room);
|
|
306
309
|
}
|
|
307
310
|
return writer;
|
|
308
311
|
},
|
|
309
312
|
decode(input, length) {
|
|
310
|
-
const reader = input instanceof
|
|
313
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
311
314
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
312
|
-
const message =
|
|
315
|
+
const message = createBaseListParticipantsRequest();
|
|
313
316
|
while (reader.pos < end) {
|
|
314
317
|
const tag = reader.uint32();
|
|
315
318
|
switch (tag >>> 3) {
|
|
@@ -324,14 +327,9 @@ exports.ListParticipantsRequest = {
|
|
|
324
327
|
return message;
|
|
325
328
|
},
|
|
326
329
|
fromJSON(object) {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
else {
|
|
332
|
-
message.room = "";
|
|
333
|
-
}
|
|
334
|
-
return message;
|
|
330
|
+
return {
|
|
331
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
332
|
+
};
|
|
335
333
|
},
|
|
336
334
|
toJSON(message) {
|
|
337
335
|
const obj = {};
|
|
@@ -339,29 +337,26 @@ exports.ListParticipantsRequest = {
|
|
|
339
337
|
return obj;
|
|
340
338
|
},
|
|
341
339
|
fromPartial(object) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
message.room = "";
|
|
348
|
-
}
|
|
340
|
+
var _a;
|
|
341
|
+
const message = createBaseListParticipantsRequest();
|
|
342
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
349
343
|
return message;
|
|
350
344
|
},
|
|
351
345
|
};
|
|
352
|
-
|
|
346
|
+
function createBaseListParticipantsResponse() {
|
|
347
|
+
return { participants: [] };
|
|
348
|
+
}
|
|
353
349
|
exports.ListParticipantsResponse = {
|
|
354
|
-
encode(message, writer =
|
|
350
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
355
351
|
for (const v of message.participants) {
|
|
356
352
|
livekit_models_1.ParticipantInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
|
357
353
|
}
|
|
358
354
|
return writer;
|
|
359
355
|
},
|
|
360
356
|
decode(input, length) {
|
|
361
|
-
const reader = input instanceof
|
|
357
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
362
358
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
363
|
-
const message =
|
|
364
|
-
message.participants = [];
|
|
359
|
+
const message = createBaseListParticipantsResponse();
|
|
365
360
|
while (reader.pos < end) {
|
|
366
361
|
const tag = reader.uint32();
|
|
367
362
|
switch (tag >>> 3) {
|
|
@@ -376,14 +371,11 @@ exports.ListParticipantsResponse = {
|
|
|
376
371
|
return message;
|
|
377
372
|
},
|
|
378
373
|
fromJSON(object) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return message;
|
|
374
|
+
return {
|
|
375
|
+
participants: Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
376
|
+
? object.participants.map((e) => livekit_models_1.ParticipantInfo.fromJSON(e))
|
|
377
|
+
: [],
|
|
378
|
+
};
|
|
387
379
|
},
|
|
388
380
|
toJSON(message) {
|
|
389
381
|
const obj = {};
|
|
@@ -396,19 +388,18 @@ exports.ListParticipantsResponse = {
|
|
|
396
388
|
return obj;
|
|
397
389
|
},
|
|
398
390
|
fromPartial(object) {
|
|
399
|
-
|
|
400
|
-
message
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
message.participants.push(livekit_models_1.ParticipantInfo.fromPartial(e));
|
|
404
|
-
}
|
|
405
|
-
}
|
|
391
|
+
var _a;
|
|
392
|
+
const message = createBaseListParticipantsResponse();
|
|
393
|
+
message.participants =
|
|
394
|
+
((_a = object.participants) === null || _a === void 0 ? void 0 : _a.map((e) => livekit_models_1.ParticipantInfo.fromPartial(e))) || [];
|
|
406
395
|
return message;
|
|
407
396
|
},
|
|
408
397
|
};
|
|
409
|
-
|
|
398
|
+
function createBaseRoomParticipantIdentity() {
|
|
399
|
+
return { room: "", identity: "" };
|
|
400
|
+
}
|
|
410
401
|
exports.RoomParticipantIdentity = {
|
|
411
|
-
encode(message, writer =
|
|
402
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
412
403
|
if (message.room !== "") {
|
|
413
404
|
writer.uint32(10).string(message.room);
|
|
414
405
|
}
|
|
@@ -418,9 +409,9 @@ exports.RoomParticipantIdentity = {
|
|
|
418
409
|
return writer;
|
|
419
410
|
},
|
|
420
411
|
decode(input, length) {
|
|
421
|
-
const reader = input instanceof
|
|
412
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
422
413
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
423
|
-
const message =
|
|
414
|
+
const message = createBaseRoomParticipantIdentity();
|
|
424
415
|
while (reader.pos < end) {
|
|
425
416
|
const tag = reader.uint32();
|
|
426
417
|
switch (tag >>> 3) {
|
|
@@ -438,20 +429,10 @@ exports.RoomParticipantIdentity = {
|
|
|
438
429
|
return message;
|
|
439
430
|
},
|
|
440
431
|
fromJSON(object) {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
else {
|
|
446
|
-
message.room = "";
|
|
447
|
-
}
|
|
448
|
-
if (object.identity !== undefined && object.identity !== null) {
|
|
449
|
-
message.identity = String(object.identity);
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
message.identity = "";
|
|
453
|
-
}
|
|
454
|
-
return message;
|
|
432
|
+
return {
|
|
433
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
434
|
+
identity: isSet(object.identity) ? String(object.identity) : "",
|
|
435
|
+
};
|
|
455
436
|
},
|
|
456
437
|
toJSON(message) {
|
|
457
438
|
const obj = {};
|
|
@@ -460,31 +441,24 @@ exports.RoomParticipantIdentity = {
|
|
|
460
441
|
return obj;
|
|
461
442
|
},
|
|
462
443
|
fromPartial(object) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
else {
|
|
468
|
-
message.room = "";
|
|
469
|
-
}
|
|
470
|
-
if (object.identity !== undefined && object.identity !== null) {
|
|
471
|
-
message.identity = object.identity;
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
message.identity = "";
|
|
475
|
-
}
|
|
444
|
+
var _a, _b;
|
|
445
|
+
const message = createBaseRoomParticipantIdentity();
|
|
446
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
447
|
+
message.identity = (_b = object.identity) !== null && _b !== void 0 ? _b : "";
|
|
476
448
|
return message;
|
|
477
449
|
},
|
|
478
450
|
};
|
|
479
|
-
|
|
451
|
+
function createBaseRemoveParticipantResponse() {
|
|
452
|
+
return {};
|
|
453
|
+
}
|
|
480
454
|
exports.RemoveParticipantResponse = {
|
|
481
|
-
encode(_, writer =
|
|
455
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
482
456
|
return writer;
|
|
483
457
|
},
|
|
484
458
|
decode(input, length) {
|
|
485
|
-
const reader = input instanceof
|
|
459
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
486
460
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
487
|
-
const message =
|
|
461
|
+
const message = createBaseRemoveParticipantResponse();
|
|
488
462
|
while (reader.pos < end) {
|
|
489
463
|
const tag = reader.uint32();
|
|
490
464
|
switch (tag >>> 3) {
|
|
@@ -496,26 +470,22 @@ exports.RemoveParticipantResponse = {
|
|
|
496
470
|
return message;
|
|
497
471
|
},
|
|
498
472
|
fromJSON(_) {
|
|
499
|
-
|
|
500
|
-
return message;
|
|
473
|
+
return {};
|
|
501
474
|
},
|
|
502
475
|
toJSON(_) {
|
|
503
476
|
const obj = {};
|
|
504
477
|
return obj;
|
|
505
478
|
},
|
|
506
479
|
fromPartial(_) {
|
|
507
|
-
const message =
|
|
480
|
+
const message = createBaseRemoveParticipantResponse();
|
|
508
481
|
return message;
|
|
509
482
|
},
|
|
510
483
|
};
|
|
511
|
-
|
|
512
|
-
room: "",
|
|
513
|
-
|
|
514
|
-
trackSid: "",
|
|
515
|
-
muted: false,
|
|
516
|
-
};
|
|
484
|
+
function createBaseMuteRoomTrackRequest() {
|
|
485
|
+
return { room: "", identity: "", trackSid: "", muted: false };
|
|
486
|
+
}
|
|
517
487
|
exports.MuteRoomTrackRequest = {
|
|
518
|
-
encode(message, writer =
|
|
488
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
519
489
|
if (message.room !== "") {
|
|
520
490
|
writer.uint32(10).string(message.room);
|
|
521
491
|
}
|
|
@@ -531,9 +501,9 @@ exports.MuteRoomTrackRequest = {
|
|
|
531
501
|
return writer;
|
|
532
502
|
},
|
|
533
503
|
decode(input, length) {
|
|
534
|
-
const reader = input instanceof
|
|
504
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
535
505
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
536
|
-
const message =
|
|
506
|
+
const message = createBaseMuteRoomTrackRequest();
|
|
537
507
|
while (reader.pos < end) {
|
|
538
508
|
const tag = reader.uint32();
|
|
539
509
|
switch (tag >>> 3) {
|
|
@@ -557,32 +527,12 @@ exports.MuteRoomTrackRequest = {
|
|
|
557
527
|
return message;
|
|
558
528
|
},
|
|
559
529
|
fromJSON(object) {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
if (object.identity !== undefined && object.identity !== null) {
|
|
568
|
-
message.identity = String(object.identity);
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
message.identity = "";
|
|
572
|
-
}
|
|
573
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
|
574
|
-
message.trackSid = String(object.trackSid);
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
message.trackSid = "";
|
|
578
|
-
}
|
|
579
|
-
if (object.muted !== undefined && object.muted !== null) {
|
|
580
|
-
message.muted = Boolean(object.muted);
|
|
581
|
-
}
|
|
582
|
-
else {
|
|
583
|
-
message.muted = false;
|
|
584
|
-
}
|
|
585
|
-
return message;
|
|
530
|
+
return {
|
|
531
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
532
|
+
identity: isSet(object.identity) ? String(object.identity) : "",
|
|
533
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
|
534
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
|
535
|
+
};
|
|
586
536
|
},
|
|
587
537
|
toJSON(message) {
|
|
588
538
|
const obj = {};
|
|
@@ -593,46 +543,29 @@ exports.MuteRoomTrackRequest = {
|
|
|
593
543
|
return obj;
|
|
594
544
|
},
|
|
595
545
|
fromPartial(object) {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
if (object.identity !== undefined && object.identity !== null) {
|
|
604
|
-
message.identity = object.identity;
|
|
605
|
-
}
|
|
606
|
-
else {
|
|
607
|
-
message.identity = "";
|
|
608
|
-
}
|
|
609
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
|
610
|
-
message.trackSid = object.trackSid;
|
|
611
|
-
}
|
|
612
|
-
else {
|
|
613
|
-
message.trackSid = "";
|
|
614
|
-
}
|
|
615
|
-
if (object.muted !== undefined && object.muted !== null) {
|
|
616
|
-
message.muted = object.muted;
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
-
message.muted = false;
|
|
620
|
-
}
|
|
546
|
+
var _a, _b, _c, _d;
|
|
547
|
+
const message = createBaseMuteRoomTrackRequest();
|
|
548
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
549
|
+
message.identity = (_b = object.identity) !== null && _b !== void 0 ? _b : "";
|
|
550
|
+
message.trackSid = (_c = object.trackSid) !== null && _c !== void 0 ? _c : "";
|
|
551
|
+
message.muted = (_d = object.muted) !== null && _d !== void 0 ? _d : false;
|
|
621
552
|
return message;
|
|
622
553
|
},
|
|
623
554
|
};
|
|
624
|
-
|
|
555
|
+
function createBaseMuteRoomTrackResponse() {
|
|
556
|
+
return { track: undefined };
|
|
557
|
+
}
|
|
625
558
|
exports.MuteRoomTrackResponse = {
|
|
626
|
-
encode(message, writer =
|
|
559
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
627
560
|
if (message.track !== undefined) {
|
|
628
561
|
livekit_models_1.TrackInfo.encode(message.track, writer.uint32(10).fork()).ldelim();
|
|
629
562
|
}
|
|
630
563
|
return writer;
|
|
631
564
|
},
|
|
632
565
|
decode(input, length) {
|
|
633
|
-
const reader = input instanceof
|
|
566
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
634
567
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
635
|
-
const message =
|
|
568
|
+
const message = createBaseMuteRoomTrackResponse();
|
|
636
569
|
while (reader.pos < end) {
|
|
637
570
|
const tag = reader.uint32();
|
|
638
571
|
switch (tag >>> 3) {
|
|
@@ -647,14 +580,9 @@ exports.MuteRoomTrackResponse = {
|
|
|
647
580
|
return message;
|
|
648
581
|
},
|
|
649
582
|
fromJSON(object) {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
message.track = undefined;
|
|
656
|
-
}
|
|
657
|
-
return message;
|
|
583
|
+
return {
|
|
584
|
+
track: isSet(object.track) ? livekit_models_1.TrackInfo.fromJSON(object.track) : undefined,
|
|
585
|
+
};
|
|
658
586
|
},
|
|
659
587
|
toJSON(message) {
|
|
660
588
|
const obj = {};
|
|
@@ -663,118 +591,19 @@ exports.MuteRoomTrackResponse = {
|
|
|
663
591
|
return obj;
|
|
664
592
|
},
|
|
665
593
|
fromPartial(object) {
|
|
666
|
-
const message =
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
message.track = undefined;
|
|
672
|
-
}
|
|
594
|
+
const message = createBaseMuteRoomTrackResponse();
|
|
595
|
+
message.track =
|
|
596
|
+
object.track !== undefined && object.track !== null
|
|
597
|
+
? livekit_models_1.TrackInfo.fromPartial(object.track)
|
|
598
|
+
: undefined;
|
|
673
599
|
return message;
|
|
674
600
|
},
|
|
675
601
|
};
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
canPublishData: false,
|
|
680
|
-
};
|
|
681
|
-
exports.ParticipantPermission = {
|
|
682
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
683
|
-
if (message.canSubscribe === true) {
|
|
684
|
-
writer.uint32(8).bool(message.canSubscribe);
|
|
685
|
-
}
|
|
686
|
-
if (message.canPublish === true) {
|
|
687
|
-
writer.uint32(16).bool(message.canPublish);
|
|
688
|
-
}
|
|
689
|
-
if (message.canPublishData === true) {
|
|
690
|
-
writer.uint32(24).bool(message.canPublishData);
|
|
691
|
-
}
|
|
692
|
-
return writer;
|
|
693
|
-
},
|
|
694
|
-
decode(input, length) {
|
|
695
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
696
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
697
|
-
const message = Object.assign({}, baseParticipantPermission);
|
|
698
|
-
while (reader.pos < end) {
|
|
699
|
-
const tag = reader.uint32();
|
|
700
|
-
switch (tag >>> 3) {
|
|
701
|
-
case 1:
|
|
702
|
-
message.canSubscribe = reader.bool();
|
|
703
|
-
break;
|
|
704
|
-
case 2:
|
|
705
|
-
message.canPublish = reader.bool();
|
|
706
|
-
break;
|
|
707
|
-
case 3:
|
|
708
|
-
message.canPublishData = reader.bool();
|
|
709
|
-
break;
|
|
710
|
-
default:
|
|
711
|
-
reader.skipType(tag & 7);
|
|
712
|
-
break;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
return message;
|
|
716
|
-
},
|
|
717
|
-
fromJSON(object) {
|
|
718
|
-
const message = Object.assign({}, baseParticipantPermission);
|
|
719
|
-
if (object.canSubscribe !== undefined && object.canSubscribe !== null) {
|
|
720
|
-
message.canSubscribe = Boolean(object.canSubscribe);
|
|
721
|
-
}
|
|
722
|
-
else {
|
|
723
|
-
message.canSubscribe = false;
|
|
724
|
-
}
|
|
725
|
-
if (object.canPublish !== undefined && object.canPublish !== null) {
|
|
726
|
-
message.canPublish = Boolean(object.canPublish);
|
|
727
|
-
}
|
|
728
|
-
else {
|
|
729
|
-
message.canPublish = false;
|
|
730
|
-
}
|
|
731
|
-
if (object.canPublishData !== undefined && object.canPublishData !== null) {
|
|
732
|
-
message.canPublishData = Boolean(object.canPublishData);
|
|
733
|
-
}
|
|
734
|
-
else {
|
|
735
|
-
message.canPublishData = false;
|
|
736
|
-
}
|
|
737
|
-
return message;
|
|
738
|
-
},
|
|
739
|
-
toJSON(message) {
|
|
740
|
-
const obj = {};
|
|
741
|
-
message.canSubscribe !== undefined &&
|
|
742
|
-
(obj.canSubscribe = message.canSubscribe);
|
|
743
|
-
message.canPublish !== undefined && (obj.canPublish = message.canPublish);
|
|
744
|
-
message.canPublishData !== undefined &&
|
|
745
|
-
(obj.canPublishData = message.canPublishData);
|
|
746
|
-
return obj;
|
|
747
|
-
},
|
|
748
|
-
fromPartial(object) {
|
|
749
|
-
const message = Object.assign({}, baseParticipantPermission);
|
|
750
|
-
if (object.canSubscribe !== undefined && object.canSubscribe !== null) {
|
|
751
|
-
message.canSubscribe = object.canSubscribe;
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
message.canSubscribe = false;
|
|
755
|
-
}
|
|
756
|
-
if (object.canPublish !== undefined && object.canPublish !== null) {
|
|
757
|
-
message.canPublish = object.canPublish;
|
|
758
|
-
}
|
|
759
|
-
else {
|
|
760
|
-
message.canPublish = false;
|
|
761
|
-
}
|
|
762
|
-
if (object.canPublishData !== undefined && object.canPublishData !== null) {
|
|
763
|
-
message.canPublishData = object.canPublishData;
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
766
|
-
message.canPublishData = false;
|
|
767
|
-
}
|
|
768
|
-
return message;
|
|
769
|
-
},
|
|
770
|
-
};
|
|
771
|
-
const baseUpdateParticipantRequest = {
|
|
772
|
-
room: "",
|
|
773
|
-
identity: "",
|
|
774
|
-
metadata: "",
|
|
775
|
-
};
|
|
602
|
+
function createBaseUpdateParticipantRequest() {
|
|
603
|
+
return { room: "", identity: "", metadata: "", permission: undefined };
|
|
604
|
+
}
|
|
776
605
|
exports.UpdateParticipantRequest = {
|
|
777
|
-
encode(message, writer =
|
|
606
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
778
607
|
if (message.room !== "") {
|
|
779
608
|
writer.uint32(10).string(message.room);
|
|
780
609
|
}
|
|
@@ -785,14 +614,14 @@ exports.UpdateParticipantRequest = {
|
|
|
785
614
|
writer.uint32(26).string(message.metadata);
|
|
786
615
|
}
|
|
787
616
|
if (message.permission !== undefined) {
|
|
788
|
-
|
|
617
|
+
livekit_models_1.ParticipantPermission.encode(message.permission, writer.uint32(34).fork()).ldelim();
|
|
789
618
|
}
|
|
790
619
|
return writer;
|
|
791
620
|
},
|
|
792
621
|
decode(input, length) {
|
|
793
|
-
const reader = input instanceof
|
|
622
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
794
623
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
795
|
-
const message =
|
|
624
|
+
const message = createBaseUpdateParticipantRequest();
|
|
796
625
|
while (reader.pos < end) {
|
|
797
626
|
const tag = reader.uint32();
|
|
798
627
|
switch (tag >>> 3) {
|
|
@@ -806,7 +635,7 @@ exports.UpdateParticipantRequest = {
|
|
|
806
635
|
message.metadata = reader.string();
|
|
807
636
|
break;
|
|
808
637
|
case 4:
|
|
809
|
-
message.permission =
|
|
638
|
+
message.permission = livekit_models_1.ParticipantPermission.decode(reader, reader.uint32());
|
|
810
639
|
break;
|
|
811
640
|
default:
|
|
812
641
|
reader.skipType(tag & 7);
|
|
@@ -816,32 +645,14 @@ exports.UpdateParticipantRequest = {
|
|
|
816
645
|
return message;
|
|
817
646
|
},
|
|
818
647
|
fromJSON(object) {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
message.identity = String(object.identity);
|
|
828
|
-
}
|
|
829
|
-
else {
|
|
830
|
-
message.identity = "";
|
|
831
|
-
}
|
|
832
|
-
if (object.metadata !== undefined && object.metadata !== null) {
|
|
833
|
-
message.metadata = String(object.metadata);
|
|
834
|
-
}
|
|
835
|
-
else {
|
|
836
|
-
message.metadata = "";
|
|
837
|
-
}
|
|
838
|
-
if (object.permission !== undefined && object.permission !== null) {
|
|
839
|
-
message.permission = exports.ParticipantPermission.fromJSON(object.permission);
|
|
840
|
-
}
|
|
841
|
-
else {
|
|
842
|
-
message.permission = undefined;
|
|
843
|
-
}
|
|
844
|
-
return message;
|
|
648
|
+
return {
|
|
649
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
650
|
+
identity: isSet(object.identity) ? String(object.identity) : "",
|
|
651
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
|
652
|
+
permission: isSet(object.permission)
|
|
653
|
+
? livekit_models_1.ParticipantPermission.fromJSON(object.permission)
|
|
654
|
+
: undefined,
|
|
655
|
+
};
|
|
845
656
|
},
|
|
846
657
|
toJSON(message) {
|
|
847
658
|
const obj = {};
|
|
@@ -850,47 +661,34 @@ exports.UpdateParticipantRequest = {
|
|
|
850
661
|
message.metadata !== undefined && (obj.metadata = message.metadata);
|
|
851
662
|
message.permission !== undefined &&
|
|
852
663
|
(obj.permission = message.permission
|
|
853
|
-
?
|
|
664
|
+
? livekit_models_1.ParticipantPermission.toJSON(message.permission)
|
|
854
665
|
: undefined);
|
|
855
666
|
return obj;
|
|
856
667
|
},
|
|
857
668
|
fromPartial(object) {
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
else {
|
|
869
|
-
message.identity = "";
|
|
870
|
-
}
|
|
871
|
-
if (object.metadata !== undefined && object.metadata !== null) {
|
|
872
|
-
message.metadata = object.metadata;
|
|
873
|
-
}
|
|
874
|
-
else {
|
|
875
|
-
message.metadata = "";
|
|
876
|
-
}
|
|
877
|
-
if (object.permission !== undefined && object.permission !== null) {
|
|
878
|
-
message.permission = exports.ParticipantPermission.fromPartial(object.permission);
|
|
879
|
-
}
|
|
880
|
-
else {
|
|
881
|
-
message.permission = undefined;
|
|
882
|
-
}
|
|
669
|
+
var _a, _b, _c;
|
|
670
|
+
const message = createBaseUpdateParticipantRequest();
|
|
671
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
672
|
+
message.identity = (_b = object.identity) !== null && _b !== void 0 ? _b : "";
|
|
673
|
+
message.metadata = (_c = object.metadata) !== null && _c !== void 0 ? _c : "";
|
|
674
|
+
message.permission =
|
|
675
|
+
object.permission !== undefined && object.permission !== null
|
|
676
|
+
? livekit_models_1.ParticipantPermission.fromPartial(object.permission)
|
|
677
|
+
: undefined;
|
|
883
678
|
return message;
|
|
884
679
|
},
|
|
885
680
|
};
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
681
|
+
function createBaseUpdateSubscriptionsRequest() {
|
|
682
|
+
return {
|
|
683
|
+
room: "",
|
|
684
|
+
identity: "",
|
|
685
|
+
trackSids: [],
|
|
686
|
+
subscribe: false,
|
|
687
|
+
participantTracks: [],
|
|
688
|
+
};
|
|
689
|
+
}
|
|
892
690
|
exports.UpdateSubscriptionsRequest = {
|
|
893
|
-
encode(message, writer =
|
|
691
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
894
692
|
if (message.room !== "") {
|
|
895
693
|
writer.uint32(10).string(message.room);
|
|
896
694
|
}
|
|
@@ -903,13 +701,15 @@ exports.UpdateSubscriptionsRequest = {
|
|
|
903
701
|
if (message.subscribe === true) {
|
|
904
702
|
writer.uint32(32).bool(message.subscribe);
|
|
905
703
|
}
|
|
704
|
+
for (const v of message.participantTracks) {
|
|
705
|
+
livekit_models_1.ParticipantTracks.encode(v, writer.uint32(42).fork()).ldelim();
|
|
706
|
+
}
|
|
906
707
|
return writer;
|
|
907
708
|
},
|
|
908
709
|
decode(input, length) {
|
|
909
|
-
const reader = input instanceof
|
|
710
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
910
711
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
911
|
-
const message =
|
|
912
|
-
message.trackSids = [];
|
|
712
|
+
const message = createBaseUpdateSubscriptionsRequest();
|
|
913
713
|
while (reader.pos < end) {
|
|
914
714
|
const tag = reader.uint32();
|
|
915
715
|
switch (tag >>> 3) {
|
|
@@ -925,6 +725,9 @@ exports.UpdateSubscriptionsRequest = {
|
|
|
925
725
|
case 4:
|
|
926
726
|
message.subscribe = reader.bool();
|
|
927
727
|
break;
|
|
728
|
+
case 5:
|
|
729
|
+
message.participantTracks.push(livekit_models_1.ParticipantTracks.decode(reader, reader.uint32()));
|
|
730
|
+
break;
|
|
928
731
|
default:
|
|
929
732
|
reader.skipType(tag & 7);
|
|
930
733
|
break;
|
|
@@ -933,32 +736,17 @@ exports.UpdateSubscriptionsRequest = {
|
|
|
933
736
|
return message;
|
|
934
737
|
},
|
|
935
738
|
fromJSON(object) {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
}
|
|
947
|
-
else {
|
|
948
|
-
message.identity = "";
|
|
949
|
-
}
|
|
950
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
|
951
|
-
for (const e of object.trackSids) {
|
|
952
|
-
message.trackSids.push(String(e));
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
if (object.subscribe !== undefined && object.subscribe !== null) {
|
|
956
|
-
message.subscribe = Boolean(object.subscribe);
|
|
957
|
-
}
|
|
958
|
-
else {
|
|
959
|
-
message.subscribe = false;
|
|
960
|
-
}
|
|
961
|
-
return message;
|
|
739
|
+
return {
|
|
740
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
741
|
+
identity: isSet(object.identity) ? String(object.identity) : "",
|
|
742
|
+
trackSids: Array.isArray(object === null || object === void 0 ? void 0 : object.trackSids)
|
|
743
|
+
? object.trackSids.map((e) => String(e))
|
|
744
|
+
: [],
|
|
745
|
+
subscribe: isSet(object.subscribe) ? Boolean(object.subscribe) : false,
|
|
746
|
+
participantTracks: Array.isArray(object === null || object === void 0 ? void 0 : object.participantTracks)
|
|
747
|
+
? object.participantTracks.map((e) => livekit_models_1.ParticipantTracks.fromJSON(e))
|
|
748
|
+
: [],
|
|
749
|
+
};
|
|
962
750
|
},
|
|
963
751
|
toJSON(message) {
|
|
964
752
|
const obj = {};
|
|
@@ -971,46 +759,38 @@ exports.UpdateSubscriptionsRequest = {
|
|
|
971
759
|
obj.trackSids = [];
|
|
972
760
|
}
|
|
973
761
|
message.subscribe !== undefined && (obj.subscribe = message.subscribe);
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
fromPartial(object) {
|
|
977
|
-
const message = Object.assign({}, baseUpdateSubscriptionsRequest);
|
|
978
|
-
message.trackSids = [];
|
|
979
|
-
if (object.room !== undefined && object.room !== null) {
|
|
980
|
-
message.room = object.room;
|
|
762
|
+
if (message.participantTracks) {
|
|
763
|
+
obj.participantTracks = message.participantTracks.map((e) => e ? livekit_models_1.ParticipantTracks.toJSON(e) : undefined);
|
|
981
764
|
}
|
|
982
765
|
else {
|
|
983
|
-
|
|
984
|
-
}
|
|
985
|
-
if (object.identity !== undefined && object.identity !== null) {
|
|
986
|
-
message.identity = object.identity;
|
|
987
|
-
}
|
|
988
|
-
else {
|
|
989
|
-
message.identity = "";
|
|
990
|
-
}
|
|
991
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
|
992
|
-
for (const e of object.trackSids) {
|
|
993
|
-
message.trackSids.push(e);
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
if (object.subscribe !== undefined && object.subscribe !== null) {
|
|
997
|
-
message.subscribe = object.subscribe;
|
|
998
|
-
}
|
|
999
|
-
else {
|
|
1000
|
-
message.subscribe = false;
|
|
766
|
+
obj.participantTracks = [];
|
|
1001
767
|
}
|
|
768
|
+
return obj;
|
|
769
|
+
},
|
|
770
|
+
fromPartial(object) {
|
|
771
|
+
var _a, _b, _c, _d, _e;
|
|
772
|
+
const message = createBaseUpdateSubscriptionsRequest();
|
|
773
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
774
|
+
message.identity = (_b = object.identity) !== null && _b !== void 0 ? _b : "";
|
|
775
|
+
message.trackSids = ((_c = object.trackSids) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
776
|
+
message.subscribe = (_d = object.subscribe) !== null && _d !== void 0 ? _d : false;
|
|
777
|
+
message.participantTracks =
|
|
778
|
+
((_e = object.participantTracks) === null || _e === void 0 ? void 0 : _e.map((e) => livekit_models_1.ParticipantTracks.fromPartial(e))) ||
|
|
779
|
+
[];
|
|
1002
780
|
return message;
|
|
1003
781
|
},
|
|
1004
782
|
};
|
|
1005
|
-
|
|
783
|
+
function createBaseUpdateSubscriptionsResponse() {
|
|
784
|
+
return {};
|
|
785
|
+
}
|
|
1006
786
|
exports.UpdateSubscriptionsResponse = {
|
|
1007
|
-
encode(_, writer =
|
|
787
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
1008
788
|
return writer;
|
|
1009
789
|
},
|
|
1010
790
|
decode(input, length) {
|
|
1011
|
-
const reader = input instanceof
|
|
791
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1012
792
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1013
|
-
const message =
|
|
793
|
+
const message = createBaseUpdateSubscriptionsResponse();
|
|
1014
794
|
while (reader.pos < end) {
|
|
1015
795
|
const tag = reader.uint32();
|
|
1016
796
|
switch (tag >>> 3) {
|
|
@@ -1022,21 +802,22 @@ exports.UpdateSubscriptionsResponse = {
|
|
|
1022
802
|
return message;
|
|
1023
803
|
},
|
|
1024
804
|
fromJSON(_) {
|
|
1025
|
-
|
|
1026
|
-
return message;
|
|
805
|
+
return {};
|
|
1027
806
|
},
|
|
1028
807
|
toJSON(_) {
|
|
1029
808
|
const obj = {};
|
|
1030
809
|
return obj;
|
|
1031
810
|
},
|
|
1032
811
|
fromPartial(_) {
|
|
1033
|
-
const message =
|
|
812
|
+
const message = createBaseUpdateSubscriptionsResponse();
|
|
1034
813
|
return message;
|
|
1035
814
|
},
|
|
1036
815
|
};
|
|
1037
|
-
|
|
816
|
+
function createBaseSendDataRequest() {
|
|
817
|
+
return { room: "", data: new Uint8Array(), kind: 0, destinationSids: [] };
|
|
818
|
+
}
|
|
1038
819
|
exports.SendDataRequest = {
|
|
1039
|
-
encode(message, writer =
|
|
820
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1040
821
|
if (message.room !== "") {
|
|
1041
822
|
writer.uint32(10).string(message.room);
|
|
1042
823
|
}
|
|
@@ -1052,11 +833,9 @@ exports.SendDataRequest = {
|
|
|
1052
833
|
return writer;
|
|
1053
834
|
},
|
|
1054
835
|
decode(input, length) {
|
|
1055
|
-
const reader = input instanceof
|
|
836
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1056
837
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1057
|
-
const message =
|
|
1058
|
-
message.destinationSids = [];
|
|
1059
|
-
message.data = new Uint8Array();
|
|
838
|
+
const message = createBaseSendDataRequest();
|
|
1060
839
|
while (reader.pos < end) {
|
|
1061
840
|
const tag = reader.uint32();
|
|
1062
841
|
switch (tag >>> 3) {
|
|
@@ -1080,31 +859,16 @@ exports.SendDataRequest = {
|
|
|
1080
859
|
return message;
|
|
1081
860
|
},
|
|
1082
861
|
fromJSON(object) {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
message.data = bytesFromBase64(object.data);
|
|
1094
|
-
}
|
|
1095
|
-
if (object.kind !== undefined && object.kind !== null) {
|
|
1096
|
-
message.kind = livekit_models_1.dataPacket_KindFromJSON(object.kind);
|
|
1097
|
-
}
|
|
1098
|
-
else {
|
|
1099
|
-
message.kind = 0;
|
|
1100
|
-
}
|
|
1101
|
-
if (object.destinationSids !== undefined &&
|
|
1102
|
-
object.destinationSids !== null) {
|
|
1103
|
-
for (const e of object.destinationSids) {
|
|
1104
|
-
message.destinationSids.push(String(e));
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
return message;
|
|
862
|
+
return {
|
|
863
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
864
|
+
data: isSet(object.data)
|
|
865
|
+
? bytesFromBase64(object.data)
|
|
866
|
+
: new Uint8Array(),
|
|
867
|
+
kind: isSet(object.kind) ? livekit_models_1.dataPacket_KindFromJSON(object.kind) : 0,
|
|
868
|
+
destinationSids: Array.isArray(object === null || object === void 0 ? void 0 : object.destinationSids)
|
|
869
|
+
? object.destinationSids.map((e) => String(e))
|
|
870
|
+
: [],
|
|
871
|
+
};
|
|
1108
872
|
},
|
|
1109
873
|
toJSON(message) {
|
|
1110
874
|
const obj = {};
|
|
@@ -1122,44 +886,26 @@ exports.SendDataRequest = {
|
|
|
1122
886
|
return obj;
|
|
1123
887
|
},
|
|
1124
888
|
fromPartial(object) {
|
|
1125
|
-
|
|
1126
|
-
message
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
message.room = "";
|
|
1132
|
-
}
|
|
1133
|
-
if (object.data !== undefined && object.data !== null) {
|
|
1134
|
-
message.data = object.data;
|
|
1135
|
-
}
|
|
1136
|
-
else {
|
|
1137
|
-
message.data = new Uint8Array();
|
|
1138
|
-
}
|
|
1139
|
-
if (object.kind !== undefined && object.kind !== null) {
|
|
1140
|
-
message.kind = object.kind;
|
|
1141
|
-
}
|
|
1142
|
-
else {
|
|
1143
|
-
message.kind = 0;
|
|
1144
|
-
}
|
|
1145
|
-
if (object.destinationSids !== undefined &&
|
|
1146
|
-
object.destinationSids !== null) {
|
|
1147
|
-
for (const e of object.destinationSids) {
|
|
1148
|
-
message.destinationSids.push(e);
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
889
|
+
var _a, _b, _c, _d;
|
|
890
|
+
const message = createBaseSendDataRequest();
|
|
891
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
892
|
+
message.data = (_b = object.data) !== null && _b !== void 0 ? _b : new Uint8Array();
|
|
893
|
+
message.kind = (_c = object.kind) !== null && _c !== void 0 ? _c : 0;
|
|
894
|
+
message.destinationSids = ((_d = object.destinationSids) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
|
|
1151
895
|
return message;
|
|
1152
896
|
},
|
|
1153
897
|
};
|
|
1154
|
-
|
|
898
|
+
function createBaseSendDataResponse() {
|
|
899
|
+
return {};
|
|
900
|
+
}
|
|
1155
901
|
exports.SendDataResponse = {
|
|
1156
|
-
encode(_, writer =
|
|
902
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
1157
903
|
return writer;
|
|
1158
904
|
},
|
|
1159
905
|
decode(input, length) {
|
|
1160
|
-
const reader = input instanceof
|
|
906
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1161
907
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1162
|
-
const message =
|
|
908
|
+
const message = createBaseSendDataResponse();
|
|
1163
909
|
while (reader.pos < end) {
|
|
1164
910
|
const tag = reader.uint32();
|
|
1165
911
|
switch (tag >>> 3) {
|
|
@@ -1171,21 +917,22 @@ exports.SendDataResponse = {
|
|
|
1171
917
|
return message;
|
|
1172
918
|
},
|
|
1173
919
|
fromJSON(_) {
|
|
1174
|
-
|
|
1175
|
-
return message;
|
|
920
|
+
return {};
|
|
1176
921
|
},
|
|
1177
922
|
toJSON(_) {
|
|
1178
923
|
const obj = {};
|
|
1179
924
|
return obj;
|
|
1180
925
|
},
|
|
1181
926
|
fromPartial(_) {
|
|
1182
|
-
const message =
|
|
927
|
+
const message = createBaseSendDataResponse();
|
|
1183
928
|
return message;
|
|
1184
929
|
},
|
|
1185
930
|
};
|
|
1186
|
-
|
|
931
|
+
function createBaseUpdateRoomMetadataRequest() {
|
|
932
|
+
return { room: "", metadata: "" };
|
|
933
|
+
}
|
|
1187
934
|
exports.UpdateRoomMetadataRequest = {
|
|
1188
|
-
encode(message, writer =
|
|
935
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
1189
936
|
if (message.room !== "") {
|
|
1190
937
|
writer.uint32(10).string(message.room);
|
|
1191
938
|
}
|
|
@@ -1195,9 +942,9 @@ exports.UpdateRoomMetadataRequest = {
|
|
|
1195
942
|
return writer;
|
|
1196
943
|
},
|
|
1197
944
|
decode(input, length) {
|
|
1198
|
-
const reader = input instanceof
|
|
945
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1199
946
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1200
|
-
const message =
|
|
947
|
+
const message = createBaseUpdateRoomMetadataRequest();
|
|
1201
948
|
while (reader.pos < end) {
|
|
1202
949
|
const tag = reader.uint32();
|
|
1203
950
|
switch (tag >>> 3) {
|
|
@@ -1215,20 +962,10 @@ exports.UpdateRoomMetadataRequest = {
|
|
|
1215
962
|
return message;
|
|
1216
963
|
},
|
|
1217
964
|
fromJSON(object) {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
}
|
|
1222
|
-
else {
|
|
1223
|
-
message.room = "";
|
|
1224
|
-
}
|
|
1225
|
-
if (object.metadata !== undefined && object.metadata !== null) {
|
|
1226
|
-
message.metadata = String(object.metadata);
|
|
1227
|
-
}
|
|
1228
|
-
else {
|
|
1229
|
-
message.metadata = "";
|
|
1230
|
-
}
|
|
1231
|
-
return message;
|
|
965
|
+
return {
|
|
966
|
+
room: isSet(object.room) ? String(object.room) : "",
|
|
967
|
+
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
|
968
|
+
};
|
|
1232
969
|
},
|
|
1233
970
|
toJSON(message) {
|
|
1234
971
|
const obj = {};
|
|
@@ -1237,19 +974,10 @@ exports.UpdateRoomMetadataRequest = {
|
|
|
1237
974
|
return obj;
|
|
1238
975
|
},
|
|
1239
976
|
fromPartial(object) {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
else {
|
|
1245
|
-
message.room = "";
|
|
1246
|
-
}
|
|
1247
|
-
if (object.metadata !== undefined && object.metadata !== null) {
|
|
1248
|
-
message.metadata = object.metadata;
|
|
1249
|
-
}
|
|
1250
|
-
else {
|
|
1251
|
-
message.metadata = "";
|
|
1252
|
-
}
|
|
977
|
+
var _a, _b;
|
|
978
|
+
const message = createBaseUpdateRoomMetadataRequest();
|
|
979
|
+
message.room = (_a = object.room) !== null && _a !== void 0 ? _a : "";
|
|
980
|
+
message.metadata = (_b = object.metadata) !== null && _b !== void 0 ? _b : "";
|
|
1253
981
|
return message;
|
|
1254
982
|
},
|
|
1255
983
|
};
|
|
@@ -1278,13 +1006,16 @@ const btoa = globalThis.btoa ||
|
|
|
1278
1006
|
((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
1279
1007
|
function base64FromBytes(arr) {
|
|
1280
1008
|
const bin = [];
|
|
1281
|
-
for (
|
|
1282
|
-
bin.push(String.fromCharCode(
|
|
1009
|
+
for (const byte of arr) {
|
|
1010
|
+
bin.push(String.fromCharCode(byte));
|
|
1283
1011
|
}
|
|
1284
1012
|
return btoa(bin.join(""));
|
|
1285
1013
|
}
|
|
1286
|
-
if (
|
|
1287
|
-
|
|
1288
|
-
|
|
1014
|
+
if (_m0.util.Long !== long_1.default) {
|
|
1015
|
+
_m0.util.Long = long_1.default;
|
|
1016
|
+
_m0.configure();
|
|
1017
|
+
}
|
|
1018
|
+
function isSet(value) {
|
|
1019
|
+
return value !== null && value !== undefined;
|
|
1289
1020
|
}
|
|
1290
1021
|
//# sourceMappingURL=livekit_room.js.map
|