@livekit/rtc-node 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/Cargo.toml +21 -0
  2. package/build.rs +5 -0
  3. package/dist/audio_frame.d.ts +13 -0
  4. package/dist/audio_frame.js +36 -0
  5. package/dist/audio_frame.js.map +1 -0
  6. package/dist/audio_source.d.ts +13 -0
  7. package/dist/audio_source.js +42 -0
  8. package/dist/audio_source.js.map +1 -0
  9. package/dist/audio_stream.d.ts +23 -0
  10. package/dist/audio_stream.js +54 -0
  11. package/dist/audio_stream.js.map +1 -0
  12. package/dist/e2ee.d.ts +43 -0
  13. package/dist/e2ee.js +232 -0
  14. package/dist/e2ee.js.map +1 -0
  15. package/dist/ffi_client.d.ts +22 -0
  16. package/dist/ffi_client.js +57 -0
  17. package/dist/ffi_client.js.map +1 -0
  18. package/dist/index.d.ts +15 -0
  19. package/dist/index.js +71 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/native.d.ts +5 -0
  22. package/dist/native.js +297 -0
  23. package/dist/native.js.map +1 -0
  24. package/dist/participant.d.ts +29 -0
  25. package/dist/participant.js +120 -0
  26. package/dist/participant.js.map +1 -0
  27. package/dist/proto/audio_frame_pb.d.ts +555 -0
  28. package/dist/proto/audio_frame_pb.js +861 -0
  29. package/dist/proto/audio_frame_pb.js.map +1 -0
  30. package/dist/proto/e2ee_pb.d.ts +651 -0
  31. package/dist/proto/e2ee_pb.js +906 -0
  32. package/dist/proto/e2ee_pb.js.map +1 -0
  33. package/dist/proto/ffi_pb.d.ts +671 -0
  34. package/dist/proto/ffi_pb.js +459 -0
  35. package/dist/proto/ffi_pb.js.map +1 -0
  36. package/dist/proto/handle_pb.d.ts +29 -0
  37. package/dist/proto/handle_pb.js +59 -0
  38. package/dist/proto/handle_pb.js.map +1 -0
  39. package/dist/proto/participant_pb.d.ts +53 -0
  40. package/dist/proto/participant_pb.js +93 -0
  41. package/dist/proto/participant_pb.js.map +1 -0
  42. package/dist/proto/room_pb.d.ts +1479 -0
  43. package/dist/proto/room_pb.js +2172 -0
  44. package/dist/proto/room_pb.js.map +1 -0
  45. package/dist/proto/stats_pb.d.ts +1712 -0
  46. package/dist/proto/stats_pb.js +2238 -0
  47. package/dist/proto/stats_pb.js.map +1 -0
  48. package/dist/proto/track_pb.d.ts +352 -0
  49. package/dist/proto/track_pb.js +550 -0
  50. package/dist/proto/track_pb.js.map +1 -0
  51. package/dist/proto/video_frame_pb.d.ts +854 -0
  52. package/dist/proto/video_frame_pb.js +1214 -0
  53. package/dist/proto/video_frame_pb.js.map +1 -0
  54. package/dist/room.d.ts +94 -0
  55. package/dist/room.js +285 -0
  56. package/dist/room.js.map +1 -0
  57. package/dist/track.d.ts +34 -0
  58. package/dist/track.js +72 -0
  59. package/dist/track.js.map +1 -0
  60. package/dist/track_publication.d.ts +30 -0
  61. package/dist/track_publication.js +66 -0
  62. package/dist/track_publication.js.map +1 -0
  63. package/dist/video_frame.d.ts +110 -0
  64. package/dist/video_frame.js +364 -0
  65. package/dist/video_frame.js.map +1 -0
  66. package/dist/video_source.d.ts +13 -0
  67. package/dist/video_source.js +44 -0
  68. package/dist/video_source.js.map +1 -0
  69. package/dist/video_stream.d.ts +23 -0
  70. package/dist/video_stream.js +56 -0
  71. package/dist/video_stream.js.map +1 -0
  72. package/package.json +15 -11
  73. package/src/audio_frame.ts +45 -0
  74. package/src/audio_source.ts +64 -0
  75. package/src/audio_stream.ts +74 -0
  76. package/src/e2ee.ts +311 -0
  77. package/src/ffi_client.ts +68 -0
  78. package/src/index.ts +52 -0
  79. package/src/lib.rs +5 -0
  80. package/src/native.d.ts +14 -0
  81. package/src/native.js +269 -0
  82. package/src/nodejs.rs +115 -0
  83. package/src/participant.ts +171 -0
  84. package/src/proto/audio_frame_pb.ts +1121 -0
  85. package/src/proto/e2ee_pb.ts +1231 -0
  86. package/src/proto/ffi_pb.ts +969 -0
  87. package/src/proto/handle_pb.ts +69 -0
  88. package/src/proto/participant_pb.ts +121 -0
  89. package/src/proto/room_pb.ts +2843 -0
  90. package/src/proto/stats_pb.ts +2955 -0
  91. package/src/proto/track_pb.ts +683 -0
  92. package/src/proto/video_frame_pb.ts +1568 -0
  93. package/src/room.ts +370 -0
  94. package/src/track.ts +101 -0
  95. package/src/track_publication.ts +90 -0
  96. package/src/video_frame.ts +620 -0
  97. package/src/video_source.ts +61 -0
  98. package/src/video_stream.ts +76 -0
@@ -0,0 +1,2843 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // @generated by protoc-gen-es v1.4.2 with parameter "target=ts"
16
+ // @generated from file room.proto (package livekit.proto, syntax proto3)
17
+ /* eslint-disable */
18
+ // @ts-nocheck
19
+
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
22
+ import { OwnedParticipant } from "./participant_pb.js";
23
+ import { OwnedTrack, OwnedTrackPublication, TrackSource } from "./track_pb.js";
24
+ import { VideoCodec } from "./video_frame_pb.js";
25
+ import { E2eeOptions, EncryptionState } from "./e2ee_pb.js";
26
+ import { FfiOwnedHandle } from "./handle_pb.js";
27
+
28
+ /**
29
+ * @generated from enum livekit.proto.IceTransportType
30
+ */
31
+ export enum IceTransportType {
32
+ /**
33
+ * @generated from enum value: TRANSPORT_RELAY = 0;
34
+ */
35
+ TRANSPORT_RELAY = 0,
36
+
37
+ /**
38
+ * @generated from enum value: TRANSPORT_NOHOST = 1;
39
+ */
40
+ TRANSPORT_NOHOST = 1,
41
+
42
+ /**
43
+ * @generated from enum value: TRANSPORT_ALL = 2;
44
+ */
45
+ TRANSPORT_ALL = 2,
46
+ }
47
+ // Retrieve enum metadata with: proto3.getEnumType(IceTransportType)
48
+ proto3.util.setEnumType(IceTransportType, "livekit.proto.IceTransportType", [
49
+ { no: 0, name: "TRANSPORT_RELAY" },
50
+ { no: 1, name: "TRANSPORT_NOHOST" },
51
+ { no: 2, name: "TRANSPORT_ALL" },
52
+ ]);
53
+
54
+ /**
55
+ * @generated from enum livekit.proto.ContinualGatheringPolicy
56
+ */
57
+ export enum ContinualGatheringPolicy {
58
+ /**
59
+ * @generated from enum value: GATHER_ONCE = 0;
60
+ */
61
+ GATHER_ONCE = 0,
62
+
63
+ /**
64
+ * @generated from enum value: GATHER_CONTINUALLY = 1;
65
+ */
66
+ GATHER_CONTINUALLY = 1,
67
+ }
68
+ // Retrieve enum metadata with: proto3.getEnumType(ContinualGatheringPolicy)
69
+ proto3.util.setEnumType(ContinualGatheringPolicy, "livekit.proto.ContinualGatheringPolicy", [
70
+ { no: 0, name: "GATHER_ONCE" },
71
+ { no: 1, name: "GATHER_CONTINUALLY" },
72
+ ]);
73
+
74
+ /**
75
+ * @generated from enum livekit.proto.ConnectionQuality
76
+ */
77
+ export enum ConnectionQuality {
78
+ /**
79
+ * @generated from enum value: QUALITY_POOR = 0;
80
+ */
81
+ QUALITY_POOR = 0,
82
+
83
+ /**
84
+ * @generated from enum value: QUALITY_GOOD = 1;
85
+ */
86
+ QUALITY_GOOD = 1,
87
+
88
+ /**
89
+ * @generated from enum value: QUALITY_EXCELLENT = 2;
90
+ */
91
+ QUALITY_EXCELLENT = 2,
92
+ }
93
+ // Retrieve enum metadata with: proto3.getEnumType(ConnectionQuality)
94
+ proto3.util.setEnumType(ConnectionQuality, "livekit.proto.ConnectionQuality", [
95
+ { no: 0, name: "QUALITY_POOR" },
96
+ { no: 1, name: "QUALITY_GOOD" },
97
+ { no: 2, name: "QUALITY_EXCELLENT" },
98
+ ]);
99
+
100
+ /**
101
+ * @generated from enum livekit.proto.ConnectionState
102
+ */
103
+ export enum ConnectionState {
104
+ /**
105
+ * @generated from enum value: CONN_DISCONNECTED = 0;
106
+ */
107
+ CONN_DISCONNECTED = 0,
108
+
109
+ /**
110
+ * @generated from enum value: CONN_CONNECTED = 1;
111
+ */
112
+ CONN_CONNECTED = 1,
113
+
114
+ /**
115
+ * @generated from enum value: CONN_RECONNECTING = 2;
116
+ */
117
+ CONN_RECONNECTING = 2,
118
+ }
119
+ // Retrieve enum metadata with: proto3.getEnumType(ConnectionState)
120
+ proto3.util.setEnumType(ConnectionState, "livekit.proto.ConnectionState", [
121
+ { no: 0, name: "CONN_DISCONNECTED" },
122
+ { no: 1, name: "CONN_CONNECTED" },
123
+ { no: 2, name: "CONN_RECONNECTING" },
124
+ ]);
125
+
126
+ /**
127
+ * @generated from enum livekit.proto.DataPacketKind
128
+ */
129
+ export enum DataPacketKind {
130
+ /**
131
+ * @generated from enum value: KIND_LOSSY = 0;
132
+ */
133
+ KIND_LOSSY = 0,
134
+
135
+ /**
136
+ * @generated from enum value: KIND_RELIABLE = 1;
137
+ */
138
+ KIND_RELIABLE = 1,
139
+ }
140
+ // Retrieve enum metadata with: proto3.getEnumType(DataPacketKind)
141
+ proto3.util.setEnumType(DataPacketKind, "livekit.proto.DataPacketKind", [
142
+ { no: 0, name: "KIND_LOSSY" },
143
+ { no: 1, name: "KIND_RELIABLE" },
144
+ ]);
145
+
146
+ /**
147
+ * Connect to a new LiveKit room
148
+ *
149
+ * @generated from message livekit.proto.ConnectRequest
150
+ */
151
+ export class ConnectRequest extends Message<ConnectRequest> {
152
+ /**
153
+ * @generated from field: string url = 1;
154
+ */
155
+ url = "";
156
+
157
+ /**
158
+ * @generated from field: string token = 2;
159
+ */
160
+ token = "";
161
+
162
+ /**
163
+ * @generated from field: livekit.proto.RoomOptions options = 3;
164
+ */
165
+ options?: RoomOptions;
166
+
167
+ constructor(data?: PartialMessage<ConnectRequest>) {
168
+ super();
169
+ proto3.util.initPartial(data, this);
170
+ }
171
+
172
+ static readonly runtime: typeof proto3 = proto3;
173
+ static readonly typeName = "livekit.proto.ConnectRequest";
174
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
175
+ { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
176
+ { no: 2, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
177
+ { no: 3, name: "options", kind: "message", T: RoomOptions },
178
+ ]);
179
+
180
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectRequest {
181
+ return new ConnectRequest().fromBinary(bytes, options);
182
+ }
183
+
184
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectRequest {
185
+ return new ConnectRequest().fromJson(jsonValue, options);
186
+ }
187
+
188
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectRequest {
189
+ return new ConnectRequest().fromJsonString(jsonString, options);
190
+ }
191
+
192
+ static equals(a: ConnectRequest | PlainMessage<ConnectRequest> | undefined, b: ConnectRequest | PlainMessage<ConnectRequest> | undefined): boolean {
193
+ return proto3.util.equals(ConnectRequest, a, b);
194
+ }
195
+ }
196
+
197
+ /**
198
+ * @generated from message livekit.proto.ConnectResponse
199
+ */
200
+ export class ConnectResponse extends Message<ConnectResponse> {
201
+ /**
202
+ * @generated from field: uint64 async_id = 1;
203
+ */
204
+ asyncId = protoInt64.zero;
205
+
206
+ constructor(data?: PartialMessage<ConnectResponse>) {
207
+ super();
208
+ proto3.util.initPartial(data, this);
209
+ }
210
+
211
+ static readonly runtime: typeof proto3 = proto3;
212
+ static readonly typeName = "livekit.proto.ConnectResponse";
213
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
214
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
215
+ ]);
216
+
217
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectResponse {
218
+ return new ConnectResponse().fromBinary(bytes, options);
219
+ }
220
+
221
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectResponse {
222
+ return new ConnectResponse().fromJson(jsonValue, options);
223
+ }
224
+
225
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectResponse {
226
+ return new ConnectResponse().fromJsonString(jsonString, options);
227
+ }
228
+
229
+ static equals(a: ConnectResponse | PlainMessage<ConnectResponse> | undefined, b: ConnectResponse | PlainMessage<ConnectResponse> | undefined): boolean {
230
+ return proto3.util.equals(ConnectResponse, a, b);
231
+ }
232
+ }
233
+
234
+ /**
235
+ * @generated from message livekit.proto.ConnectCallback
236
+ */
237
+ export class ConnectCallback extends Message<ConnectCallback> {
238
+ /**
239
+ * @generated from field: uint64 async_id = 1;
240
+ */
241
+ asyncId = protoInt64.zero;
242
+
243
+ /**
244
+ * @generated from field: optional string error = 2;
245
+ */
246
+ error?: string;
247
+
248
+ /**
249
+ * @generated from field: livekit.proto.OwnedRoom room = 3;
250
+ */
251
+ room?: OwnedRoom;
252
+
253
+ /**
254
+ * @generated from field: livekit.proto.OwnedParticipant local_participant = 4;
255
+ */
256
+ localParticipant?: OwnedParticipant;
257
+
258
+ /**
259
+ * @generated from field: repeated livekit.proto.ConnectCallback.ParticipantWithTracks participants = 5;
260
+ */
261
+ participants: ConnectCallback_ParticipantWithTracks[] = [];
262
+
263
+ constructor(data?: PartialMessage<ConnectCallback>) {
264
+ super();
265
+ proto3.util.initPartial(data, this);
266
+ }
267
+
268
+ static readonly runtime: typeof proto3 = proto3;
269
+ static readonly typeName = "livekit.proto.ConnectCallback";
270
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
271
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
272
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
273
+ { no: 3, name: "room", kind: "message", T: OwnedRoom },
274
+ { no: 4, name: "local_participant", kind: "message", T: OwnedParticipant },
275
+ { no: 5, name: "participants", kind: "message", T: ConnectCallback_ParticipantWithTracks, repeated: true },
276
+ ]);
277
+
278
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectCallback {
279
+ return new ConnectCallback().fromBinary(bytes, options);
280
+ }
281
+
282
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectCallback {
283
+ return new ConnectCallback().fromJson(jsonValue, options);
284
+ }
285
+
286
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectCallback {
287
+ return new ConnectCallback().fromJsonString(jsonString, options);
288
+ }
289
+
290
+ static equals(a: ConnectCallback | PlainMessage<ConnectCallback> | undefined, b: ConnectCallback | PlainMessage<ConnectCallback> | undefined): boolean {
291
+ return proto3.util.equals(ConnectCallback, a, b);
292
+ }
293
+ }
294
+
295
+ /**
296
+ * @generated from message livekit.proto.ConnectCallback.ParticipantWithTracks
297
+ */
298
+ export class ConnectCallback_ParticipantWithTracks extends Message<ConnectCallback_ParticipantWithTracks> {
299
+ /**
300
+ * @generated from field: livekit.proto.OwnedParticipant participant = 1;
301
+ */
302
+ participant?: OwnedParticipant;
303
+
304
+ /**
305
+ * TrackInfo are not needed here, if we're subscribed to a track, the FfiServer will send
306
+ * a TrackSubscribed event
307
+ *
308
+ * @generated from field: repeated livekit.proto.OwnedTrackPublication publications = 2;
309
+ */
310
+ publications: OwnedTrackPublication[] = [];
311
+
312
+ constructor(data?: PartialMessage<ConnectCallback_ParticipantWithTracks>) {
313
+ super();
314
+ proto3.util.initPartial(data, this);
315
+ }
316
+
317
+ static readonly runtime: typeof proto3 = proto3;
318
+ static readonly typeName = "livekit.proto.ConnectCallback.ParticipantWithTracks";
319
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
320
+ { no: 1, name: "participant", kind: "message", T: OwnedParticipant },
321
+ { no: 2, name: "publications", kind: "message", T: OwnedTrackPublication, repeated: true },
322
+ ]);
323
+
324
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectCallback_ParticipantWithTracks {
325
+ return new ConnectCallback_ParticipantWithTracks().fromBinary(bytes, options);
326
+ }
327
+
328
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectCallback_ParticipantWithTracks {
329
+ return new ConnectCallback_ParticipantWithTracks().fromJson(jsonValue, options);
330
+ }
331
+
332
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectCallback_ParticipantWithTracks {
333
+ return new ConnectCallback_ParticipantWithTracks().fromJsonString(jsonString, options);
334
+ }
335
+
336
+ static equals(a: ConnectCallback_ParticipantWithTracks | PlainMessage<ConnectCallback_ParticipantWithTracks> | undefined, b: ConnectCallback_ParticipantWithTracks | PlainMessage<ConnectCallback_ParticipantWithTracks> | undefined): boolean {
337
+ return proto3.util.equals(ConnectCallback_ParticipantWithTracks, a, b);
338
+ }
339
+ }
340
+
341
+ /**
342
+ * Disconnect from the a room
343
+ *
344
+ * @generated from message livekit.proto.DisconnectRequest
345
+ */
346
+ export class DisconnectRequest extends Message<DisconnectRequest> {
347
+ /**
348
+ * @generated from field: uint64 room_handle = 1;
349
+ */
350
+ roomHandle = protoInt64.zero;
351
+
352
+ constructor(data?: PartialMessage<DisconnectRequest>) {
353
+ super();
354
+ proto3.util.initPartial(data, this);
355
+ }
356
+
357
+ static readonly runtime: typeof proto3 = proto3;
358
+ static readonly typeName = "livekit.proto.DisconnectRequest";
359
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
360
+ { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
361
+ ]);
362
+
363
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DisconnectRequest {
364
+ return new DisconnectRequest().fromBinary(bytes, options);
365
+ }
366
+
367
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DisconnectRequest {
368
+ return new DisconnectRequest().fromJson(jsonValue, options);
369
+ }
370
+
371
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DisconnectRequest {
372
+ return new DisconnectRequest().fromJsonString(jsonString, options);
373
+ }
374
+
375
+ static equals(a: DisconnectRequest | PlainMessage<DisconnectRequest> | undefined, b: DisconnectRequest | PlainMessage<DisconnectRequest> | undefined): boolean {
376
+ return proto3.util.equals(DisconnectRequest, a, b);
377
+ }
378
+ }
379
+
380
+ /**
381
+ * @generated from message livekit.proto.DisconnectResponse
382
+ */
383
+ export class DisconnectResponse extends Message<DisconnectResponse> {
384
+ /**
385
+ * @generated from field: uint64 async_id = 1;
386
+ */
387
+ asyncId = protoInt64.zero;
388
+
389
+ constructor(data?: PartialMessage<DisconnectResponse>) {
390
+ super();
391
+ proto3.util.initPartial(data, this);
392
+ }
393
+
394
+ static readonly runtime: typeof proto3 = proto3;
395
+ static readonly typeName = "livekit.proto.DisconnectResponse";
396
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
397
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
398
+ ]);
399
+
400
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DisconnectResponse {
401
+ return new DisconnectResponse().fromBinary(bytes, options);
402
+ }
403
+
404
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DisconnectResponse {
405
+ return new DisconnectResponse().fromJson(jsonValue, options);
406
+ }
407
+
408
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DisconnectResponse {
409
+ return new DisconnectResponse().fromJsonString(jsonString, options);
410
+ }
411
+
412
+ static equals(a: DisconnectResponse | PlainMessage<DisconnectResponse> | undefined, b: DisconnectResponse | PlainMessage<DisconnectResponse> | undefined): boolean {
413
+ return proto3.util.equals(DisconnectResponse, a, b);
414
+ }
415
+ }
416
+
417
+ /**
418
+ * @generated from message livekit.proto.DisconnectCallback
419
+ */
420
+ export class DisconnectCallback extends Message<DisconnectCallback> {
421
+ /**
422
+ * @generated from field: uint64 async_id = 1;
423
+ */
424
+ asyncId = protoInt64.zero;
425
+
426
+ constructor(data?: PartialMessage<DisconnectCallback>) {
427
+ super();
428
+ proto3.util.initPartial(data, this);
429
+ }
430
+
431
+ static readonly runtime: typeof proto3 = proto3;
432
+ static readonly typeName = "livekit.proto.DisconnectCallback";
433
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
434
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
435
+ ]);
436
+
437
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DisconnectCallback {
438
+ return new DisconnectCallback().fromBinary(bytes, options);
439
+ }
440
+
441
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DisconnectCallback {
442
+ return new DisconnectCallback().fromJson(jsonValue, options);
443
+ }
444
+
445
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DisconnectCallback {
446
+ return new DisconnectCallback().fromJsonString(jsonString, options);
447
+ }
448
+
449
+ static equals(a: DisconnectCallback | PlainMessage<DisconnectCallback> | undefined, b: DisconnectCallback | PlainMessage<DisconnectCallback> | undefined): boolean {
450
+ return proto3.util.equals(DisconnectCallback, a, b);
451
+ }
452
+ }
453
+
454
+ /**
455
+ * Publish a track to the room
456
+ *
457
+ * @generated from message livekit.proto.PublishTrackRequest
458
+ */
459
+ export class PublishTrackRequest extends Message<PublishTrackRequest> {
460
+ /**
461
+ * @generated from field: uint64 local_participant_handle = 1;
462
+ */
463
+ localParticipantHandle = protoInt64.zero;
464
+
465
+ /**
466
+ * @generated from field: uint64 track_handle = 2;
467
+ */
468
+ trackHandle = protoInt64.zero;
469
+
470
+ /**
471
+ * @generated from field: livekit.proto.TrackPublishOptions options = 3;
472
+ */
473
+ options?: TrackPublishOptions;
474
+
475
+ constructor(data?: PartialMessage<PublishTrackRequest>) {
476
+ super();
477
+ proto3.util.initPartial(data, this);
478
+ }
479
+
480
+ static readonly runtime: typeof proto3 = proto3;
481
+ static readonly typeName = "livekit.proto.PublishTrackRequest";
482
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
483
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
484
+ { no: 2, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
485
+ { no: 3, name: "options", kind: "message", T: TrackPublishOptions },
486
+ ]);
487
+
488
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishTrackRequest {
489
+ return new PublishTrackRequest().fromBinary(bytes, options);
490
+ }
491
+
492
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishTrackRequest {
493
+ return new PublishTrackRequest().fromJson(jsonValue, options);
494
+ }
495
+
496
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishTrackRequest {
497
+ return new PublishTrackRequest().fromJsonString(jsonString, options);
498
+ }
499
+
500
+ static equals(a: PublishTrackRequest | PlainMessage<PublishTrackRequest> | undefined, b: PublishTrackRequest | PlainMessage<PublishTrackRequest> | undefined): boolean {
501
+ return proto3.util.equals(PublishTrackRequest, a, b);
502
+ }
503
+ }
504
+
505
+ /**
506
+ * @generated from message livekit.proto.PublishTrackResponse
507
+ */
508
+ export class PublishTrackResponse extends Message<PublishTrackResponse> {
509
+ /**
510
+ * @generated from field: uint64 async_id = 1;
511
+ */
512
+ asyncId = protoInt64.zero;
513
+
514
+ constructor(data?: PartialMessage<PublishTrackResponse>) {
515
+ super();
516
+ proto3.util.initPartial(data, this);
517
+ }
518
+
519
+ static readonly runtime: typeof proto3 = proto3;
520
+ static readonly typeName = "livekit.proto.PublishTrackResponse";
521
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
522
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
523
+ ]);
524
+
525
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishTrackResponse {
526
+ return new PublishTrackResponse().fromBinary(bytes, options);
527
+ }
528
+
529
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishTrackResponse {
530
+ return new PublishTrackResponse().fromJson(jsonValue, options);
531
+ }
532
+
533
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishTrackResponse {
534
+ return new PublishTrackResponse().fromJsonString(jsonString, options);
535
+ }
536
+
537
+ static equals(a: PublishTrackResponse | PlainMessage<PublishTrackResponse> | undefined, b: PublishTrackResponse | PlainMessage<PublishTrackResponse> | undefined): boolean {
538
+ return proto3.util.equals(PublishTrackResponse, a, b);
539
+ }
540
+ }
541
+
542
+ /**
543
+ * @generated from message livekit.proto.PublishTrackCallback
544
+ */
545
+ export class PublishTrackCallback extends Message<PublishTrackCallback> {
546
+ /**
547
+ * @generated from field: uint64 async_id = 1;
548
+ */
549
+ asyncId = protoInt64.zero;
550
+
551
+ /**
552
+ * @generated from field: optional string error = 2;
553
+ */
554
+ error?: string;
555
+
556
+ /**
557
+ * @generated from field: livekit.proto.OwnedTrackPublication publication = 3;
558
+ */
559
+ publication?: OwnedTrackPublication;
560
+
561
+ constructor(data?: PartialMessage<PublishTrackCallback>) {
562
+ super();
563
+ proto3.util.initPartial(data, this);
564
+ }
565
+
566
+ static readonly runtime: typeof proto3 = proto3;
567
+ static readonly typeName = "livekit.proto.PublishTrackCallback";
568
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
569
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
570
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
571
+ { no: 3, name: "publication", kind: "message", T: OwnedTrackPublication },
572
+ ]);
573
+
574
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishTrackCallback {
575
+ return new PublishTrackCallback().fromBinary(bytes, options);
576
+ }
577
+
578
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishTrackCallback {
579
+ return new PublishTrackCallback().fromJson(jsonValue, options);
580
+ }
581
+
582
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishTrackCallback {
583
+ return new PublishTrackCallback().fromJsonString(jsonString, options);
584
+ }
585
+
586
+ static equals(a: PublishTrackCallback | PlainMessage<PublishTrackCallback> | undefined, b: PublishTrackCallback | PlainMessage<PublishTrackCallback> | undefined): boolean {
587
+ return proto3.util.equals(PublishTrackCallback, a, b);
588
+ }
589
+ }
590
+
591
+ /**
592
+ * Unpublish a track from the room
593
+ *
594
+ * @generated from message livekit.proto.UnpublishTrackRequest
595
+ */
596
+ export class UnpublishTrackRequest extends Message<UnpublishTrackRequest> {
597
+ /**
598
+ * @generated from field: uint64 local_participant_handle = 1;
599
+ */
600
+ localParticipantHandle = protoInt64.zero;
601
+
602
+ /**
603
+ * @generated from field: string track_sid = 2;
604
+ */
605
+ trackSid = "";
606
+
607
+ /**
608
+ * @generated from field: bool stop_on_unpublish = 3;
609
+ */
610
+ stopOnUnpublish = false;
611
+
612
+ constructor(data?: PartialMessage<UnpublishTrackRequest>) {
613
+ super();
614
+ proto3.util.initPartial(data, this);
615
+ }
616
+
617
+ static readonly runtime: typeof proto3 = proto3;
618
+ static readonly typeName = "livekit.proto.UnpublishTrackRequest";
619
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
620
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
621
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
622
+ { no: 3, name: "stop_on_unpublish", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
623
+ ]);
624
+
625
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UnpublishTrackRequest {
626
+ return new UnpublishTrackRequest().fromBinary(bytes, options);
627
+ }
628
+
629
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UnpublishTrackRequest {
630
+ return new UnpublishTrackRequest().fromJson(jsonValue, options);
631
+ }
632
+
633
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UnpublishTrackRequest {
634
+ return new UnpublishTrackRequest().fromJsonString(jsonString, options);
635
+ }
636
+
637
+ static equals(a: UnpublishTrackRequest | PlainMessage<UnpublishTrackRequest> | undefined, b: UnpublishTrackRequest | PlainMessage<UnpublishTrackRequest> | undefined): boolean {
638
+ return proto3.util.equals(UnpublishTrackRequest, a, b);
639
+ }
640
+ }
641
+
642
+ /**
643
+ * @generated from message livekit.proto.UnpublishTrackResponse
644
+ */
645
+ export class UnpublishTrackResponse extends Message<UnpublishTrackResponse> {
646
+ /**
647
+ * @generated from field: uint64 async_id = 1;
648
+ */
649
+ asyncId = protoInt64.zero;
650
+
651
+ constructor(data?: PartialMessage<UnpublishTrackResponse>) {
652
+ super();
653
+ proto3.util.initPartial(data, this);
654
+ }
655
+
656
+ static readonly runtime: typeof proto3 = proto3;
657
+ static readonly typeName = "livekit.proto.UnpublishTrackResponse";
658
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
659
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
660
+ ]);
661
+
662
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UnpublishTrackResponse {
663
+ return new UnpublishTrackResponse().fromBinary(bytes, options);
664
+ }
665
+
666
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UnpublishTrackResponse {
667
+ return new UnpublishTrackResponse().fromJson(jsonValue, options);
668
+ }
669
+
670
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UnpublishTrackResponse {
671
+ return new UnpublishTrackResponse().fromJsonString(jsonString, options);
672
+ }
673
+
674
+ static equals(a: UnpublishTrackResponse | PlainMessage<UnpublishTrackResponse> | undefined, b: UnpublishTrackResponse | PlainMessage<UnpublishTrackResponse> | undefined): boolean {
675
+ return proto3.util.equals(UnpublishTrackResponse, a, b);
676
+ }
677
+ }
678
+
679
+ /**
680
+ * @generated from message livekit.proto.UnpublishTrackCallback
681
+ */
682
+ export class UnpublishTrackCallback extends Message<UnpublishTrackCallback> {
683
+ /**
684
+ * @generated from field: uint64 async_id = 1;
685
+ */
686
+ asyncId = protoInt64.zero;
687
+
688
+ /**
689
+ * @generated from field: optional string error = 2;
690
+ */
691
+ error?: string;
692
+
693
+ constructor(data?: PartialMessage<UnpublishTrackCallback>) {
694
+ super();
695
+ proto3.util.initPartial(data, this);
696
+ }
697
+
698
+ static readonly runtime: typeof proto3 = proto3;
699
+ static readonly typeName = "livekit.proto.UnpublishTrackCallback";
700
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
701
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
702
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
703
+ ]);
704
+
705
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UnpublishTrackCallback {
706
+ return new UnpublishTrackCallback().fromBinary(bytes, options);
707
+ }
708
+
709
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UnpublishTrackCallback {
710
+ return new UnpublishTrackCallback().fromJson(jsonValue, options);
711
+ }
712
+
713
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UnpublishTrackCallback {
714
+ return new UnpublishTrackCallback().fromJsonString(jsonString, options);
715
+ }
716
+
717
+ static equals(a: UnpublishTrackCallback | PlainMessage<UnpublishTrackCallback> | undefined, b: UnpublishTrackCallback | PlainMessage<UnpublishTrackCallback> | undefined): boolean {
718
+ return proto3.util.equals(UnpublishTrackCallback, a, b);
719
+ }
720
+ }
721
+
722
+ /**
723
+ * Publish data to other participants
724
+ *
725
+ * @generated from message livekit.proto.PublishDataRequest
726
+ */
727
+ export class PublishDataRequest extends Message<PublishDataRequest> {
728
+ /**
729
+ * @generated from field: uint64 local_participant_handle = 1;
730
+ */
731
+ localParticipantHandle = protoInt64.zero;
732
+
733
+ /**
734
+ * @generated from field: uint64 data_ptr = 2;
735
+ */
736
+ dataPtr = protoInt64.zero;
737
+
738
+ /**
739
+ * @generated from field: uint64 data_len = 3;
740
+ */
741
+ dataLen = protoInt64.zero;
742
+
743
+ /**
744
+ * @generated from field: livekit.proto.DataPacketKind kind = 4;
745
+ */
746
+ kind = DataPacketKind.KIND_LOSSY;
747
+
748
+ /**
749
+ * destination
750
+ *
751
+ * @generated from field: repeated string destination_sids = 5;
752
+ */
753
+ destinationSids: string[] = [];
754
+
755
+ constructor(data?: PartialMessage<PublishDataRequest>) {
756
+ super();
757
+ proto3.util.initPartial(data, this);
758
+ }
759
+
760
+ static readonly runtime: typeof proto3 = proto3;
761
+ static readonly typeName = "livekit.proto.PublishDataRequest";
762
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
763
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
764
+ { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
765
+ { no: 3, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
766
+ { no: 4, name: "kind", kind: "enum", T: proto3.getEnumType(DataPacketKind) },
767
+ { no: 5, name: "destination_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
768
+ ]);
769
+
770
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishDataRequest {
771
+ return new PublishDataRequest().fromBinary(bytes, options);
772
+ }
773
+
774
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishDataRequest {
775
+ return new PublishDataRequest().fromJson(jsonValue, options);
776
+ }
777
+
778
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishDataRequest {
779
+ return new PublishDataRequest().fromJsonString(jsonString, options);
780
+ }
781
+
782
+ static equals(a: PublishDataRequest | PlainMessage<PublishDataRequest> | undefined, b: PublishDataRequest | PlainMessage<PublishDataRequest> | undefined): boolean {
783
+ return proto3.util.equals(PublishDataRequest, a, b);
784
+ }
785
+ }
786
+
787
+ /**
788
+ * @generated from message livekit.proto.PublishDataResponse
789
+ */
790
+ export class PublishDataResponse extends Message<PublishDataResponse> {
791
+ /**
792
+ * @generated from field: uint64 async_id = 1;
793
+ */
794
+ asyncId = protoInt64.zero;
795
+
796
+ constructor(data?: PartialMessage<PublishDataResponse>) {
797
+ super();
798
+ proto3.util.initPartial(data, this);
799
+ }
800
+
801
+ static readonly runtime: typeof proto3 = proto3;
802
+ static readonly typeName = "livekit.proto.PublishDataResponse";
803
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
804
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
805
+ ]);
806
+
807
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishDataResponse {
808
+ return new PublishDataResponse().fromBinary(bytes, options);
809
+ }
810
+
811
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishDataResponse {
812
+ return new PublishDataResponse().fromJson(jsonValue, options);
813
+ }
814
+
815
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishDataResponse {
816
+ return new PublishDataResponse().fromJsonString(jsonString, options);
817
+ }
818
+
819
+ static equals(a: PublishDataResponse | PlainMessage<PublishDataResponse> | undefined, b: PublishDataResponse | PlainMessage<PublishDataResponse> | undefined): boolean {
820
+ return proto3.util.equals(PublishDataResponse, a, b);
821
+ }
822
+ }
823
+
824
+ /**
825
+ * @generated from message livekit.proto.PublishDataCallback
826
+ */
827
+ export class PublishDataCallback extends Message<PublishDataCallback> {
828
+ /**
829
+ * @generated from field: uint64 async_id = 1;
830
+ */
831
+ asyncId = protoInt64.zero;
832
+
833
+ /**
834
+ * @generated from field: optional string error = 2;
835
+ */
836
+ error?: string;
837
+
838
+ constructor(data?: PartialMessage<PublishDataCallback>) {
839
+ super();
840
+ proto3.util.initPartial(data, this);
841
+ }
842
+
843
+ static readonly runtime: typeof proto3 = proto3;
844
+ static readonly typeName = "livekit.proto.PublishDataCallback";
845
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
846
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
847
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
848
+ ]);
849
+
850
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishDataCallback {
851
+ return new PublishDataCallback().fromBinary(bytes, options);
852
+ }
853
+
854
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublishDataCallback {
855
+ return new PublishDataCallback().fromJson(jsonValue, options);
856
+ }
857
+
858
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublishDataCallback {
859
+ return new PublishDataCallback().fromJsonString(jsonString, options);
860
+ }
861
+
862
+ static equals(a: PublishDataCallback | PlainMessage<PublishDataCallback> | undefined, b: PublishDataCallback | PlainMessage<PublishDataCallback> | undefined): boolean {
863
+ return proto3.util.equals(PublishDataCallback, a, b);
864
+ }
865
+ }
866
+
867
+ /**
868
+ * Change the local participant's metadata
869
+ *
870
+ * @generated from message livekit.proto.UpdateLocalMetadataRequest
871
+ */
872
+ export class UpdateLocalMetadataRequest extends Message<UpdateLocalMetadataRequest> {
873
+ /**
874
+ * @generated from field: uint64 local_participant_handle = 1;
875
+ */
876
+ localParticipantHandle = protoInt64.zero;
877
+
878
+ /**
879
+ * @generated from field: string metadata = 2;
880
+ */
881
+ metadata = "";
882
+
883
+ constructor(data?: PartialMessage<UpdateLocalMetadataRequest>) {
884
+ super();
885
+ proto3.util.initPartial(data, this);
886
+ }
887
+
888
+ static readonly runtime: typeof proto3 = proto3;
889
+ static readonly typeName = "livekit.proto.UpdateLocalMetadataRequest";
890
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
891
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
892
+ { no: 2, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
893
+ ]);
894
+
895
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateLocalMetadataRequest {
896
+ return new UpdateLocalMetadataRequest().fromBinary(bytes, options);
897
+ }
898
+
899
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateLocalMetadataRequest {
900
+ return new UpdateLocalMetadataRequest().fromJson(jsonValue, options);
901
+ }
902
+
903
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateLocalMetadataRequest {
904
+ return new UpdateLocalMetadataRequest().fromJsonString(jsonString, options);
905
+ }
906
+
907
+ static equals(a: UpdateLocalMetadataRequest | PlainMessage<UpdateLocalMetadataRequest> | undefined, b: UpdateLocalMetadataRequest | PlainMessage<UpdateLocalMetadataRequest> | undefined): boolean {
908
+ return proto3.util.equals(UpdateLocalMetadataRequest, a, b);
909
+ }
910
+ }
911
+
912
+ /**
913
+ * @generated from message livekit.proto.UpdateLocalMetadataResponse
914
+ */
915
+ export class UpdateLocalMetadataResponse extends Message<UpdateLocalMetadataResponse> {
916
+ /**
917
+ * @generated from field: uint64 async_id = 1;
918
+ */
919
+ asyncId = protoInt64.zero;
920
+
921
+ constructor(data?: PartialMessage<UpdateLocalMetadataResponse>) {
922
+ super();
923
+ proto3.util.initPartial(data, this);
924
+ }
925
+
926
+ static readonly runtime: typeof proto3 = proto3;
927
+ static readonly typeName = "livekit.proto.UpdateLocalMetadataResponse";
928
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
929
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
930
+ ]);
931
+
932
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateLocalMetadataResponse {
933
+ return new UpdateLocalMetadataResponse().fromBinary(bytes, options);
934
+ }
935
+
936
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateLocalMetadataResponse {
937
+ return new UpdateLocalMetadataResponse().fromJson(jsonValue, options);
938
+ }
939
+
940
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateLocalMetadataResponse {
941
+ return new UpdateLocalMetadataResponse().fromJsonString(jsonString, options);
942
+ }
943
+
944
+ static equals(a: UpdateLocalMetadataResponse | PlainMessage<UpdateLocalMetadataResponse> | undefined, b: UpdateLocalMetadataResponse | PlainMessage<UpdateLocalMetadataResponse> | undefined): boolean {
945
+ return proto3.util.equals(UpdateLocalMetadataResponse, a, b);
946
+ }
947
+ }
948
+
949
+ /**
950
+ * @generated from message livekit.proto.UpdateLocalMetadataCallback
951
+ */
952
+ export class UpdateLocalMetadataCallback extends Message<UpdateLocalMetadataCallback> {
953
+ /**
954
+ * @generated from field: uint64 async_id = 1;
955
+ */
956
+ asyncId = protoInt64.zero;
957
+
958
+ constructor(data?: PartialMessage<UpdateLocalMetadataCallback>) {
959
+ super();
960
+ proto3.util.initPartial(data, this);
961
+ }
962
+
963
+ static readonly runtime: typeof proto3 = proto3;
964
+ static readonly typeName = "livekit.proto.UpdateLocalMetadataCallback";
965
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
966
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
967
+ ]);
968
+
969
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateLocalMetadataCallback {
970
+ return new UpdateLocalMetadataCallback().fromBinary(bytes, options);
971
+ }
972
+
973
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateLocalMetadataCallback {
974
+ return new UpdateLocalMetadataCallback().fromJson(jsonValue, options);
975
+ }
976
+
977
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateLocalMetadataCallback {
978
+ return new UpdateLocalMetadataCallback().fromJsonString(jsonString, options);
979
+ }
980
+
981
+ static equals(a: UpdateLocalMetadataCallback | PlainMessage<UpdateLocalMetadataCallback> | undefined, b: UpdateLocalMetadataCallback | PlainMessage<UpdateLocalMetadataCallback> | undefined): boolean {
982
+ return proto3.util.equals(UpdateLocalMetadataCallback, a, b);
983
+ }
984
+ }
985
+
986
+ /**
987
+ * Change the local participant's name
988
+ *
989
+ * @generated from message livekit.proto.UpdateLocalNameRequest
990
+ */
991
+ export class UpdateLocalNameRequest extends Message<UpdateLocalNameRequest> {
992
+ /**
993
+ * @generated from field: uint64 local_participant_handle = 1;
994
+ */
995
+ localParticipantHandle = protoInt64.zero;
996
+
997
+ /**
998
+ * @generated from field: string name = 2;
999
+ */
1000
+ name = "";
1001
+
1002
+ constructor(data?: PartialMessage<UpdateLocalNameRequest>) {
1003
+ super();
1004
+ proto3.util.initPartial(data, this);
1005
+ }
1006
+
1007
+ static readonly runtime: typeof proto3 = proto3;
1008
+ static readonly typeName = "livekit.proto.UpdateLocalNameRequest";
1009
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1010
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1011
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1012
+ ]);
1013
+
1014
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateLocalNameRequest {
1015
+ return new UpdateLocalNameRequest().fromBinary(bytes, options);
1016
+ }
1017
+
1018
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateLocalNameRequest {
1019
+ return new UpdateLocalNameRequest().fromJson(jsonValue, options);
1020
+ }
1021
+
1022
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateLocalNameRequest {
1023
+ return new UpdateLocalNameRequest().fromJsonString(jsonString, options);
1024
+ }
1025
+
1026
+ static equals(a: UpdateLocalNameRequest | PlainMessage<UpdateLocalNameRequest> | undefined, b: UpdateLocalNameRequest | PlainMessage<UpdateLocalNameRequest> | undefined): boolean {
1027
+ return proto3.util.equals(UpdateLocalNameRequest, a, b);
1028
+ }
1029
+ }
1030
+
1031
+ /**
1032
+ * @generated from message livekit.proto.UpdateLocalNameResponse
1033
+ */
1034
+ export class UpdateLocalNameResponse extends Message<UpdateLocalNameResponse> {
1035
+ /**
1036
+ * @generated from field: uint64 async_id = 1;
1037
+ */
1038
+ asyncId = protoInt64.zero;
1039
+
1040
+ constructor(data?: PartialMessage<UpdateLocalNameResponse>) {
1041
+ super();
1042
+ proto3.util.initPartial(data, this);
1043
+ }
1044
+
1045
+ static readonly runtime: typeof proto3 = proto3;
1046
+ static readonly typeName = "livekit.proto.UpdateLocalNameResponse";
1047
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1048
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1049
+ ]);
1050
+
1051
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateLocalNameResponse {
1052
+ return new UpdateLocalNameResponse().fromBinary(bytes, options);
1053
+ }
1054
+
1055
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateLocalNameResponse {
1056
+ return new UpdateLocalNameResponse().fromJson(jsonValue, options);
1057
+ }
1058
+
1059
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateLocalNameResponse {
1060
+ return new UpdateLocalNameResponse().fromJsonString(jsonString, options);
1061
+ }
1062
+
1063
+ static equals(a: UpdateLocalNameResponse | PlainMessage<UpdateLocalNameResponse> | undefined, b: UpdateLocalNameResponse | PlainMessage<UpdateLocalNameResponse> | undefined): boolean {
1064
+ return proto3.util.equals(UpdateLocalNameResponse, a, b);
1065
+ }
1066
+ }
1067
+
1068
+ /**
1069
+ * @generated from message livekit.proto.UpdateLocalNameCallback
1070
+ */
1071
+ export class UpdateLocalNameCallback extends Message<UpdateLocalNameCallback> {
1072
+ /**
1073
+ * @generated from field: uint64 async_id = 1;
1074
+ */
1075
+ asyncId = protoInt64.zero;
1076
+
1077
+ constructor(data?: PartialMessage<UpdateLocalNameCallback>) {
1078
+ super();
1079
+ proto3.util.initPartial(data, this);
1080
+ }
1081
+
1082
+ static readonly runtime: typeof proto3 = proto3;
1083
+ static readonly typeName = "livekit.proto.UpdateLocalNameCallback";
1084
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1085
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1086
+ ]);
1087
+
1088
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateLocalNameCallback {
1089
+ return new UpdateLocalNameCallback().fromBinary(bytes, options);
1090
+ }
1091
+
1092
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateLocalNameCallback {
1093
+ return new UpdateLocalNameCallback().fromJson(jsonValue, options);
1094
+ }
1095
+
1096
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateLocalNameCallback {
1097
+ return new UpdateLocalNameCallback().fromJsonString(jsonString, options);
1098
+ }
1099
+
1100
+ static equals(a: UpdateLocalNameCallback | PlainMessage<UpdateLocalNameCallback> | undefined, b: UpdateLocalNameCallback | PlainMessage<UpdateLocalNameCallback> | undefined): boolean {
1101
+ return proto3.util.equals(UpdateLocalNameCallback, a, b);
1102
+ }
1103
+ }
1104
+
1105
+ /**
1106
+ * Change the "desire" to subs2ribe to a track
1107
+ *
1108
+ * @generated from message livekit.proto.SetSubscribedRequest
1109
+ */
1110
+ export class SetSubscribedRequest extends Message<SetSubscribedRequest> {
1111
+ /**
1112
+ * @generated from field: bool subscribe = 1;
1113
+ */
1114
+ subscribe = false;
1115
+
1116
+ /**
1117
+ * @generated from field: uint64 publication_handle = 2;
1118
+ */
1119
+ publicationHandle = protoInt64.zero;
1120
+
1121
+ constructor(data?: PartialMessage<SetSubscribedRequest>) {
1122
+ super();
1123
+ proto3.util.initPartial(data, this);
1124
+ }
1125
+
1126
+ static readonly runtime: typeof proto3 = proto3;
1127
+ static readonly typeName = "livekit.proto.SetSubscribedRequest";
1128
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1129
+ { no: 1, name: "subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1130
+ { no: 2, name: "publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1131
+ ]);
1132
+
1133
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetSubscribedRequest {
1134
+ return new SetSubscribedRequest().fromBinary(bytes, options);
1135
+ }
1136
+
1137
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetSubscribedRequest {
1138
+ return new SetSubscribedRequest().fromJson(jsonValue, options);
1139
+ }
1140
+
1141
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetSubscribedRequest {
1142
+ return new SetSubscribedRequest().fromJsonString(jsonString, options);
1143
+ }
1144
+
1145
+ static equals(a: SetSubscribedRequest | PlainMessage<SetSubscribedRequest> | undefined, b: SetSubscribedRequest | PlainMessage<SetSubscribedRequest> | undefined): boolean {
1146
+ return proto3.util.equals(SetSubscribedRequest, a, b);
1147
+ }
1148
+ }
1149
+
1150
+ /**
1151
+ * @generated from message livekit.proto.SetSubscribedResponse
1152
+ */
1153
+ export class SetSubscribedResponse extends Message<SetSubscribedResponse> {
1154
+ constructor(data?: PartialMessage<SetSubscribedResponse>) {
1155
+ super();
1156
+ proto3.util.initPartial(data, this);
1157
+ }
1158
+
1159
+ static readonly runtime: typeof proto3 = proto3;
1160
+ static readonly typeName = "livekit.proto.SetSubscribedResponse";
1161
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1162
+ ]);
1163
+
1164
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetSubscribedResponse {
1165
+ return new SetSubscribedResponse().fromBinary(bytes, options);
1166
+ }
1167
+
1168
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetSubscribedResponse {
1169
+ return new SetSubscribedResponse().fromJson(jsonValue, options);
1170
+ }
1171
+
1172
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetSubscribedResponse {
1173
+ return new SetSubscribedResponse().fromJsonString(jsonString, options);
1174
+ }
1175
+
1176
+ static equals(a: SetSubscribedResponse | PlainMessage<SetSubscribedResponse> | undefined, b: SetSubscribedResponse | PlainMessage<SetSubscribedResponse> | undefined): boolean {
1177
+ return proto3.util.equals(SetSubscribedResponse, a, b);
1178
+ }
1179
+ }
1180
+
1181
+ /**
1182
+ * @generated from message livekit.proto.VideoEncoding
1183
+ */
1184
+ export class VideoEncoding extends Message<VideoEncoding> {
1185
+ /**
1186
+ * @generated from field: uint64 max_bitrate = 1;
1187
+ */
1188
+ maxBitrate = protoInt64.zero;
1189
+
1190
+ /**
1191
+ * @generated from field: double max_framerate = 2;
1192
+ */
1193
+ maxFramerate = 0;
1194
+
1195
+ constructor(data?: PartialMessage<VideoEncoding>) {
1196
+ super();
1197
+ proto3.util.initPartial(data, this);
1198
+ }
1199
+
1200
+ static readonly runtime: typeof proto3 = proto3;
1201
+ static readonly typeName = "livekit.proto.VideoEncoding";
1202
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1203
+ { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1204
+ { no: 2, name: "max_framerate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1205
+ ]);
1206
+
1207
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoEncoding {
1208
+ return new VideoEncoding().fromBinary(bytes, options);
1209
+ }
1210
+
1211
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoEncoding {
1212
+ return new VideoEncoding().fromJson(jsonValue, options);
1213
+ }
1214
+
1215
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoEncoding {
1216
+ return new VideoEncoding().fromJsonString(jsonString, options);
1217
+ }
1218
+
1219
+ static equals(a: VideoEncoding | PlainMessage<VideoEncoding> | undefined, b: VideoEncoding | PlainMessage<VideoEncoding> | undefined): boolean {
1220
+ return proto3.util.equals(VideoEncoding, a, b);
1221
+ }
1222
+ }
1223
+
1224
+ /**
1225
+ * @generated from message livekit.proto.AudioEncoding
1226
+ */
1227
+ export class AudioEncoding extends Message<AudioEncoding> {
1228
+ /**
1229
+ * @generated from field: uint64 max_bitrate = 1;
1230
+ */
1231
+ maxBitrate = protoInt64.zero;
1232
+
1233
+ constructor(data?: PartialMessage<AudioEncoding>) {
1234
+ super();
1235
+ proto3.util.initPartial(data, this);
1236
+ }
1237
+
1238
+ static readonly runtime: typeof proto3 = proto3;
1239
+ static readonly typeName = "livekit.proto.AudioEncoding";
1240
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1241
+ { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1242
+ ]);
1243
+
1244
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AudioEncoding {
1245
+ return new AudioEncoding().fromBinary(bytes, options);
1246
+ }
1247
+
1248
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AudioEncoding {
1249
+ return new AudioEncoding().fromJson(jsonValue, options);
1250
+ }
1251
+
1252
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AudioEncoding {
1253
+ return new AudioEncoding().fromJsonString(jsonString, options);
1254
+ }
1255
+
1256
+ static equals(a: AudioEncoding | PlainMessage<AudioEncoding> | undefined, b: AudioEncoding | PlainMessage<AudioEncoding> | undefined): boolean {
1257
+ return proto3.util.equals(AudioEncoding, a, b);
1258
+ }
1259
+ }
1260
+
1261
+ /**
1262
+ * @generated from message livekit.proto.TrackPublishOptions
1263
+ */
1264
+ export class TrackPublishOptions extends Message<TrackPublishOptions> {
1265
+ /**
1266
+ * encodings are optional
1267
+ *
1268
+ * @generated from field: livekit.proto.VideoEncoding video_encoding = 1;
1269
+ */
1270
+ videoEncoding?: VideoEncoding;
1271
+
1272
+ /**
1273
+ * @generated from field: livekit.proto.AudioEncoding audio_encoding = 2;
1274
+ */
1275
+ audioEncoding?: AudioEncoding;
1276
+
1277
+ /**
1278
+ * @generated from field: livekit.proto.VideoCodec video_codec = 3;
1279
+ */
1280
+ videoCodec = VideoCodec.VP8;
1281
+
1282
+ /**
1283
+ * @generated from field: bool dtx = 4;
1284
+ */
1285
+ dtx = false;
1286
+
1287
+ /**
1288
+ * @generated from field: bool red = 5;
1289
+ */
1290
+ red = false;
1291
+
1292
+ /**
1293
+ * @generated from field: bool simulcast = 6;
1294
+ */
1295
+ simulcast = false;
1296
+
1297
+ /**
1298
+ * @generated from field: livekit.proto.TrackSource source = 7;
1299
+ */
1300
+ source = TrackSource.SOURCE_UNKNOWN;
1301
+
1302
+ constructor(data?: PartialMessage<TrackPublishOptions>) {
1303
+ super();
1304
+ proto3.util.initPartial(data, this);
1305
+ }
1306
+
1307
+ static readonly runtime: typeof proto3 = proto3;
1308
+ static readonly typeName = "livekit.proto.TrackPublishOptions";
1309
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1310
+ { no: 1, name: "video_encoding", kind: "message", T: VideoEncoding },
1311
+ { no: 2, name: "audio_encoding", kind: "message", T: AudioEncoding },
1312
+ { no: 3, name: "video_codec", kind: "enum", T: proto3.getEnumType(VideoCodec) },
1313
+ { no: 4, name: "dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1314
+ { no: 5, name: "red", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1315
+ { no: 6, name: "simulcast", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1316
+ { no: 7, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) },
1317
+ ]);
1318
+
1319
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublishOptions {
1320
+ return new TrackPublishOptions().fromBinary(bytes, options);
1321
+ }
1322
+
1323
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublishOptions {
1324
+ return new TrackPublishOptions().fromJson(jsonValue, options);
1325
+ }
1326
+
1327
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublishOptions {
1328
+ return new TrackPublishOptions().fromJsonString(jsonString, options);
1329
+ }
1330
+
1331
+ static equals(a: TrackPublishOptions | PlainMessage<TrackPublishOptions> | undefined, b: TrackPublishOptions | PlainMessage<TrackPublishOptions> | undefined): boolean {
1332
+ return proto3.util.equals(TrackPublishOptions, a, b);
1333
+ }
1334
+ }
1335
+
1336
+ /**
1337
+ * @generated from message livekit.proto.IceServer
1338
+ */
1339
+ export class IceServer extends Message<IceServer> {
1340
+ /**
1341
+ * @generated from field: repeated string urls = 1;
1342
+ */
1343
+ urls: string[] = [];
1344
+
1345
+ /**
1346
+ * @generated from field: string username = 2;
1347
+ */
1348
+ username = "";
1349
+
1350
+ /**
1351
+ * @generated from field: string password = 3;
1352
+ */
1353
+ password = "";
1354
+
1355
+ constructor(data?: PartialMessage<IceServer>) {
1356
+ super();
1357
+ proto3.util.initPartial(data, this);
1358
+ }
1359
+
1360
+ static readonly runtime: typeof proto3 = proto3;
1361
+ static readonly typeName = "livekit.proto.IceServer";
1362
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1363
+ { no: 1, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1364
+ { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1365
+ { no: 3, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1366
+ ]);
1367
+
1368
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IceServer {
1369
+ return new IceServer().fromBinary(bytes, options);
1370
+ }
1371
+
1372
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IceServer {
1373
+ return new IceServer().fromJson(jsonValue, options);
1374
+ }
1375
+
1376
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IceServer {
1377
+ return new IceServer().fromJsonString(jsonString, options);
1378
+ }
1379
+
1380
+ static equals(a: IceServer | PlainMessage<IceServer> | undefined, b: IceServer | PlainMessage<IceServer> | undefined): boolean {
1381
+ return proto3.util.equals(IceServer, a, b);
1382
+ }
1383
+ }
1384
+
1385
+ /**
1386
+ * @generated from message livekit.proto.RtcConfig
1387
+ */
1388
+ export class RtcConfig extends Message<RtcConfig> {
1389
+ /**
1390
+ * @generated from field: optional livekit.proto.IceTransportType ice_transport_type = 1;
1391
+ */
1392
+ iceTransportType?: IceTransportType;
1393
+
1394
+ /**
1395
+ * @generated from field: optional livekit.proto.ContinualGatheringPolicy continual_gathering_policy = 2;
1396
+ */
1397
+ continualGatheringPolicy?: ContinualGatheringPolicy;
1398
+
1399
+ /**
1400
+ * empty fallback to default
1401
+ *
1402
+ * @generated from field: repeated livekit.proto.IceServer ice_servers = 3;
1403
+ */
1404
+ iceServers: IceServer[] = [];
1405
+
1406
+ constructor(data?: PartialMessage<RtcConfig>) {
1407
+ super();
1408
+ proto3.util.initPartial(data, this);
1409
+ }
1410
+
1411
+ static readonly runtime: typeof proto3 = proto3;
1412
+ static readonly typeName = "livekit.proto.RtcConfig";
1413
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1414
+ { no: 1, name: "ice_transport_type", kind: "enum", T: proto3.getEnumType(IceTransportType), opt: true },
1415
+ { no: 2, name: "continual_gathering_policy", kind: "enum", T: proto3.getEnumType(ContinualGatheringPolicy), opt: true },
1416
+ { no: 3, name: "ice_servers", kind: "message", T: IceServer, repeated: true },
1417
+ ]);
1418
+
1419
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RtcConfig {
1420
+ return new RtcConfig().fromBinary(bytes, options);
1421
+ }
1422
+
1423
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RtcConfig {
1424
+ return new RtcConfig().fromJson(jsonValue, options);
1425
+ }
1426
+
1427
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RtcConfig {
1428
+ return new RtcConfig().fromJsonString(jsonString, options);
1429
+ }
1430
+
1431
+ static equals(a: RtcConfig | PlainMessage<RtcConfig> | undefined, b: RtcConfig | PlainMessage<RtcConfig> | undefined): boolean {
1432
+ return proto3.util.equals(RtcConfig, a, b);
1433
+ }
1434
+ }
1435
+
1436
+ /**
1437
+ * @generated from message livekit.proto.RoomOptions
1438
+ */
1439
+ export class RoomOptions extends Message<RoomOptions> {
1440
+ /**
1441
+ * @generated from field: bool auto_subscribe = 1;
1442
+ */
1443
+ autoSubscribe = false;
1444
+
1445
+ /**
1446
+ * @generated from field: bool adaptive_stream = 2;
1447
+ */
1448
+ adaptiveStream = false;
1449
+
1450
+ /**
1451
+ * @generated from field: bool dynacast = 3;
1452
+ */
1453
+ dynacast = false;
1454
+
1455
+ /**
1456
+ * @generated from field: optional livekit.proto.E2eeOptions e2ee = 4;
1457
+ */
1458
+ e2ee?: E2eeOptions;
1459
+
1460
+ /**
1461
+ * allow to setup a custom RtcConfiguration
1462
+ *
1463
+ * @generated from field: optional livekit.proto.RtcConfig rtc_config = 5;
1464
+ */
1465
+ rtcConfig?: RtcConfig;
1466
+
1467
+ /**
1468
+ * @generated from field: uint32 join_retries = 6;
1469
+ */
1470
+ joinRetries = 0;
1471
+
1472
+ constructor(data?: PartialMessage<RoomOptions>) {
1473
+ super();
1474
+ proto3.util.initPartial(data, this);
1475
+ }
1476
+
1477
+ static readonly runtime: typeof proto3 = proto3;
1478
+ static readonly typeName = "livekit.proto.RoomOptions";
1479
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1480
+ { no: 1, name: "auto_subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1481
+ { no: 2, name: "adaptive_stream", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1482
+ { no: 3, name: "dynacast", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1483
+ { no: 4, name: "e2ee", kind: "message", T: E2eeOptions, opt: true },
1484
+ { no: 5, name: "rtc_config", kind: "message", T: RtcConfig, opt: true },
1485
+ { no: 6, name: "join_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1486
+ ]);
1487
+
1488
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomOptions {
1489
+ return new RoomOptions().fromBinary(bytes, options);
1490
+ }
1491
+
1492
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RoomOptions {
1493
+ return new RoomOptions().fromJson(jsonValue, options);
1494
+ }
1495
+
1496
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RoomOptions {
1497
+ return new RoomOptions().fromJsonString(jsonString, options);
1498
+ }
1499
+
1500
+ static equals(a: RoomOptions | PlainMessage<RoomOptions> | undefined, b: RoomOptions | PlainMessage<RoomOptions> | undefined): boolean {
1501
+ return proto3.util.equals(RoomOptions, a, b);
1502
+ }
1503
+ }
1504
+
1505
+ /**
1506
+ * @generated from message livekit.proto.BufferInfo
1507
+ */
1508
+ export class BufferInfo extends Message<BufferInfo> {
1509
+ /**
1510
+ * @generated from field: uint64 data_ptr = 1;
1511
+ */
1512
+ dataPtr = protoInt64.zero;
1513
+
1514
+ /**
1515
+ * @generated from field: uint64 data_len = 2;
1516
+ */
1517
+ dataLen = protoInt64.zero;
1518
+
1519
+ constructor(data?: PartialMessage<BufferInfo>) {
1520
+ super();
1521
+ proto3.util.initPartial(data, this);
1522
+ }
1523
+
1524
+ static readonly runtime: typeof proto3 = proto3;
1525
+ static readonly typeName = "livekit.proto.BufferInfo";
1526
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1527
+ { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1528
+ { no: 2, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1529
+ ]);
1530
+
1531
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BufferInfo {
1532
+ return new BufferInfo().fromBinary(bytes, options);
1533
+ }
1534
+
1535
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BufferInfo {
1536
+ return new BufferInfo().fromJson(jsonValue, options);
1537
+ }
1538
+
1539
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BufferInfo {
1540
+ return new BufferInfo().fromJsonString(jsonString, options);
1541
+ }
1542
+
1543
+ static equals(a: BufferInfo | PlainMessage<BufferInfo> | undefined, b: BufferInfo | PlainMessage<BufferInfo> | undefined): boolean {
1544
+ return proto3.util.equals(BufferInfo, a, b);
1545
+ }
1546
+ }
1547
+
1548
+ /**
1549
+ * @generated from message livekit.proto.OwnedBuffer
1550
+ */
1551
+ export class OwnedBuffer extends Message<OwnedBuffer> {
1552
+ /**
1553
+ * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
1554
+ */
1555
+ handle?: FfiOwnedHandle;
1556
+
1557
+ /**
1558
+ * @generated from field: livekit.proto.BufferInfo data = 2;
1559
+ */
1560
+ data?: BufferInfo;
1561
+
1562
+ constructor(data?: PartialMessage<OwnedBuffer>) {
1563
+ super();
1564
+ proto3.util.initPartial(data, this);
1565
+ }
1566
+
1567
+ static readonly runtime: typeof proto3 = proto3;
1568
+ static readonly typeName = "livekit.proto.OwnedBuffer";
1569
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1570
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle },
1571
+ { no: 2, name: "data", kind: "message", T: BufferInfo },
1572
+ ]);
1573
+
1574
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedBuffer {
1575
+ return new OwnedBuffer().fromBinary(bytes, options);
1576
+ }
1577
+
1578
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedBuffer {
1579
+ return new OwnedBuffer().fromJson(jsonValue, options);
1580
+ }
1581
+
1582
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedBuffer {
1583
+ return new OwnedBuffer().fromJsonString(jsonString, options);
1584
+ }
1585
+
1586
+ static equals(a: OwnedBuffer | PlainMessage<OwnedBuffer> | undefined, b: OwnedBuffer | PlainMessage<OwnedBuffer> | undefined): boolean {
1587
+ return proto3.util.equals(OwnedBuffer, a, b);
1588
+ }
1589
+ }
1590
+
1591
+ /**
1592
+ * @generated from message livekit.proto.RoomEvent
1593
+ */
1594
+ export class RoomEvent extends Message<RoomEvent> {
1595
+ /**
1596
+ * @generated from field: uint64 room_handle = 1;
1597
+ */
1598
+ roomHandle = protoInt64.zero;
1599
+
1600
+ /**
1601
+ * @generated from oneof livekit.proto.RoomEvent.message
1602
+ */
1603
+ message: {
1604
+ /**
1605
+ * @generated from field: livekit.proto.ParticipantConnected participant_connected = 2;
1606
+ */
1607
+ value: ParticipantConnected;
1608
+ case: "participantConnected";
1609
+ } | {
1610
+ /**
1611
+ * @generated from field: livekit.proto.ParticipantDisconnected participant_disconnected = 3;
1612
+ */
1613
+ value: ParticipantDisconnected;
1614
+ case: "participantDisconnected";
1615
+ } | {
1616
+ /**
1617
+ * @generated from field: livekit.proto.LocalTrackPublished local_track_published = 4;
1618
+ */
1619
+ value: LocalTrackPublished;
1620
+ case: "localTrackPublished";
1621
+ } | {
1622
+ /**
1623
+ * @generated from field: livekit.proto.LocalTrackUnpublished local_track_unpublished = 5;
1624
+ */
1625
+ value: LocalTrackUnpublished;
1626
+ case: "localTrackUnpublished";
1627
+ } | {
1628
+ /**
1629
+ * @generated from field: livekit.proto.TrackPublished track_published = 6;
1630
+ */
1631
+ value: TrackPublished;
1632
+ case: "trackPublished";
1633
+ } | {
1634
+ /**
1635
+ * @generated from field: livekit.proto.TrackUnpublished track_unpublished = 7;
1636
+ */
1637
+ value: TrackUnpublished;
1638
+ case: "trackUnpublished";
1639
+ } | {
1640
+ /**
1641
+ * @generated from field: livekit.proto.TrackSubscribed track_subscribed = 8;
1642
+ */
1643
+ value: TrackSubscribed;
1644
+ case: "trackSubscribed";
1645
+ } | {
1646
+ /**
1647
+ * @generated from field: livekit.proto.TrackUnsubscribed track_unsubscribed = 9;
1648
+ */
1649
+ value: TrackUnsubscribed;
1650
+ case: "trackUnsubscribed";
1651
+ } | {
1652
+ /**
1653
+ * @generated from field: livekit.proto.TrackSubscriptionFailed track_subscription_failed = 10;
1654
+ */
1655
+ value: TrackSubscriptionFailed;
1656
+ case: "trackSubscriptionFailed";
1657
+ } | {
1658
+ /**
1659
+ * @generated from field: livekit.proto.TrackMuted track_muted = 11;
1660
+ */
1661
+ value: TrackMuted;
1662
+ case: "trackMuted";
1663
+ } | {
1664
+ /**
1665
+ * @generated from field: livekit.proto.TrackUnmuted track_unmuted = 12;
1666
+ */
1667
+ value: TrackUnmuted;
1668
+ case: "trackUnmuted";
1669
+ } | {
1670
+ /**
1671
+ * @generated from field: livekit.proto.ActiveSpeakersChanged active_speakers_changed = 13;
1672
+ */
1673
+ value: ActiveSpeakersChanged;
1674
+ case: "activeSpeakersChanged";
1675
+ } | {
1676
+ /**
1677
+ * @generated from field: livekit.proto.RoomMetadataChanged room_metadata_changed = 14;
1678
+ */
1679
+ value: RoomMetadataChanged;
1680
+ case: "roomMetadataChanged";
1681
+ } | {
1682
+ /**
1683
+ * @generated from field: livekit.proto.ParticipantMetadataChanged participant_metadata_changed = 15;
1684
+ */
1685
+ value: ParticipantMetadataChanged;
1686
+ case: "participantMetadataChanged";
1687
+ } | {
1688
+ /**
1689
+ * @generated from field: livekit.proto.ParticipantNameChanged participant_name_changed = 16;
1690
+ */
1691
+ value: ParticipantNameChanged;
1692
+ case: "participantNameChanged";
1693
+ } | {
1694
+ /**
1695
+ * @generated from field: livekit.proto.ConnectionQualityChanged connection_quality_changed = 17;
1696
+ */
1697
+ value: ConnectionQualityChanged;
1698
+ case: "connectionQualityChanged";
1699
+ } | {
1700
+ /**
1701
+ * @generated from field: livekit.proto.DataReceived data_received = 18;
1702
+ */
1703
+ value: DataReceived;
1704
+ case: "dataReceived";
1705
+ } | {
1706
+ /**
1707
+ * @generated from field: livekit.proto.ConnectionStateChanged connection_state_changed = 19;
1708
+ */
1709
+ value: ConnectionStateChanged;
1710
+ case: "connectionStateChanged";
1711
+ } | {
1712
+ /**
1713
+ * Connected connected = 20;
1714
+ *
1715
+ * @generated from field: livekit.proto.Disconnected disconnected = 21;
1716
+ */
1717
+ value: Disconnected;
1718
+ case: "disconnected";
1719
+ } | {
1720
+ /**
1721
+ * @generated from field: livekit.proto.Reconnecting reconnecting = 22;
1722
+ */
1723
+ value: Reconnecting;
1724
+ case: "reconnecting";
1725
+ } | {
1726
+ /**
1727
+ * @generated from field: livekit.proto.Reconnected reconnected = 23;
1728
+ */
1729
+ value: Reconnected;
1730
+ case: "reconnected";
1731
+ } | {
1732
+ /**
1733
+ * @generated from field: livekit.proto.E2eeStateChanged e2ee_state_changed = 24;
1734
+ */
1735
+ value: E2eeStateChanged;
1736
+ case: "e2eeStateChanged";
1737
+ } | {
1738
+ /**
1739
+ * The stream of room events has ended
1740
+ *
1741
+ * @generated from field: livekit.proto.RoomEOS eos = 25;
1742
+ */
1743
+ value: RoomEOS;
1744
+ case: "eos";
1745
+ } | { case: undefined; value?: undefined } = { case: undefined };
1746
+
1747
+ constructor(data?: PartialMessage<RoomEvent>) {
1748
+ super();
1749
+ proto3.util.initPartial(data, this);
1750
+ }
1751
+
1752
+ static readonly runtime: typeof proto3 = proto3;
1753
+ static readonly typeName = "livekit.proto.RoomEvent";
1754
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1755
+ { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1756
+ { no: 2, name: "participant_connected", kind: "message", T: ParticipantConnected, oneof: "message" },
1757
+ { no: 3, name: "participant_disconnected", kind: "message", T: ParticipantDisconnected, oneof: "message" },
1758
+ { no: 4, name: "local_track_published", kind: "message", T: LocalTrackPublished, oneof: "message" },
1759
+ { no: 5, name: "local_track_unpublished", kind: "message", T: LocalTrackUnpublished, oneof: "message" },
1760
+ { no: 6, name: "track_published", kind: "message", T: TrackPublished, oneof: "message" },
1761
+ { no: 7, name: "track_unpublished", kind: "message", T: TrackUnpublished, oneof: "message" },
1762
+ { no: 8, name: "track_subscribed", kind: "message", T: TrackSubscribed, oneof: "message" },
1763
+ { no: 9, name: "track_unsubscribed", kind: "message", T: TrackUnsubscribed, oneof: "message" },
1764
+ { no: 10, name: "track_subscription_failed", kind: "message", T: TrackSubscriptionFailed, oneof: "message" },
1765
+ { no: 11, name: "track_muted", kind: "message", T: TrackMuted, oneof: "message" },
1766
+ { no: 12, name: "track_unmuted", kind: "message", T: TrackUnmuted, oneof: "message" },
1767
+ { no: 13, name: "active_speakers_changed", kind: "message", T: ActiveSpeakersChanged, oneof: "message" },
1768
+ { no: 14, name: "room_metadata_changed", kind: "message", T: RoomMetadataChanged, oneof: "message" },
1769
+ { no: 15, name: "participant_metadata_changed", kind: "message", T: ParticipantMetadataChanged, oneof: "message" },
1770
+ { no: 16, name: "participant_name_changed", kind: "message", T: ParticipantNameChanged, oneof: "message" },
1771
+ { no: 17, name: "connection_quality_changed", kind: "message", T: ConnectionQualityChanged, oneof: "message" },
1772
+ { no: 18, name: "data_received", kind: "message", T: DataReceived, oneof: "message" },
1773
+ { no: 19, name: "connection_state_changed", kind: "message", T: ConnectionStateChanged, oneof: "message" },
1774
+ { no: 21, name: "disconnected", kind: "message", T: Disconnected, oneof: "message" },
1775
+ { no: 22, name: "reconnecting", kind: "message", T: Reconnecting, oneof: "message" },
1776
+ { no: 23, name: "reconnected", kind: "message", T: Reconnected, oneof: "message" },
1777
+ { no: 24, name: "e2ee_state_changed", kind: "message", T: E2eeStateChanged, oneof: "message" },
1778
+ { no: 25, name: "eos", kind: "message", T: RoomEOS, oneof: "message" },
1779
+ ]);
1780
+
1781
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomEvent {
1782
+ return new RoomEvent().fromBinary(bytes, options);
1783
+ }
1784
+
1785
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RoomEvent {
1786
+ return new RoomEvent().fromJson(jsonValue, options);
1787
+ }
1788
+
1789
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RoomEvent {
1790
+ return new RoomEvent().fromJsonString(jsonString, options);
1791
+ }
1792
+
1793
+ static equals(a: RoomEvent | PlainMessage<RoomEvent> | undefined, b: RoomEvent | PlainMessage<RoomEvent> | undefined): boolean {
1794
+ return proto3.util.equals(RoomEvent, a, b);
1795
+ }
1796
+ }
1797
+
1798
+ /**
1799
+ * @generated from message livekit.proto.RoomInfo
1800
+ */
1801
+ export class RoomInfo extends Message<RoomInfo> {
1802
+ /**
1803
+ * @generated from field: string sid = 1;
1804
+ */
1805
+ sid = "";
1806
+
1807
+ /**
1808
+ * @generated from field: string name = 2;
1809
+ */
1810
+ name = "";
1811
+
1812
+ /**
1813
+ * @generated from field: string metadata = 3;
1814
+ */
1815
+ metadata = "";
1816
+
1817
+ constructor(data?: PartialMessage<RoomInfo>) {
1818
+ super();
1819
+ proto3.util.initPartial(data, this);
1820
+ }
1821
+
1822
+ static readonly runtime: typeof proto3 = proto3;
1823
+ static readonly typeName = "livekit.proto.RoomInfo";
1824
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1825
+ { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1826
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1827
+ { no: 3, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1828
+ ]);
1829
+
1830
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomInfo {
1831
+ return new RoomInfo().fromBinary(bytes, options);
1832
+ }
1833
+
1834
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RoomInfo {
1835
+ return new RoomInfo().fromJson(jsonValue, options);
1836
+ }
1837
+
1838
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RoomInfo {
1839
+ return new RoomInfo().fromJsonString(jsonString, options);
1840
+ }
1841
+
1842
+ static equals(a: RoomInfo | PlainMessage<RoomInfo> | undefined, b: RoomInfo | PlainMessage<RoomInfo> | undefined): boolean {
1843
+ return proto3.util.equals(RoomInfo, a, b);
1844
+ }
1845
+ }
1846
+
1847
+ /**
1848
+ * @generated from message livekit.proto.OwnedRoom
1849
+ */
1850
+ export class OwnedRoom extends Message<OwnedRoom> {
1851
+ /**
1852
+ * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
1853
+ */
1854
+ handle?: FfiOwnedHandle;
1855
+
1856
+ /**
1857
+ * @generated from field: livekit.proto.RoomInfo info = 2;
1858
+ */
1859
+ info?: RoomInfo;
1860
+
1861
+ constructor(data?: PartialMessage<OwnedRoom>) {
1862
+ super();
1863
+ proto3.util.initPartial(data, this);
1864
+ }
1865
+
1866
+ static readonly runtime: typeof proto3 = proto3;
1867
+ static readonly typeName = "livekit.proto.OwnedRoom";
1868
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1869
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle },
1870
+ { no: 2, name: "info", kind: "message", T: RoomInfo },
1871
+ ]);
1872
+
1873
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedRoom {
1874
+ return new OwnedRoom().fromBinary(bytes, options);
1875
+ }
1876
+
1877
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedRoom {
1878
+ return new OwnedRoom().fromJson(jsonValue, options);
1879
+ }
1880
+
1881
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedRoom {
1882
+ return new OwnedRoom().fromJsonString(jsonString, options);
1883
+ }
1884
+
1885
+ static equals(a: OwnedRoom | PlainMessage<OwnedRoom> | undefined, b: OwnedRoom | PlainMessage<OwnedRoom> | undefined): boolean {
1886
+ return proto3.util.equals(OwnedRoom, a, b);
1887
+ }
1888
+ }
1889
+
1890
+ /**
1891
+ * @generated from message livekit.proto.ParticipantConnected
1892
+ */
1893
+ export class ParticipantConnected extends Message<ParticipantConnected> {
1894
+ /**
1895
+ * @generated from field: livekit.proto.OwnedParticipant info = 1;
1896
+ */
1897
+ info?: OwnedParticipant;
1898
+
1899
+ constructor(data?: PartialMessage<ParticipantConnected>) {
1900
+ super();
1901
+ proto3.util.initPartial(data, this);
1902
+ }
1903
+
1904
+ static readonly runtime: typeof proto3 = proto3;
1905
+ static readonly typeName = "livekit.proto.ParticipantConnected";
1906
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1907
+ { no: 1, name: "info", kind: "message", T: OwnedParticipant },
1908
+ ]);
1909
+
1910
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantConnected {
1911
+ return new ParticipantConnected().fromBinary(bytes, options);
1912
+ }
1913
+
1914
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantConnected {
1915
+ return new ParticipantConnected().fromJson(jsonValue, options);
1916
+ }
1917
+
1918
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantConnected {
1919
+ return new ParticipantConnected().fromJsonString(jsonString, options);
1920
+ }
1921
+
1922
+ static equals(a: ParticipantConnected | PlainMessage<ParticipantConnected> | undefined, b: ParticipantConnected | PlainMessage<ParticipantConnected> | undefined): boolean {
1923
+ return proto3.util.equals(ParticipantConnected, a, b);
1924
+ }
1925
+ }
1926
+
1927
+ /**
1928
+ * @generated from message livekit.proto.ParticipantDisconnected
1929
+ */
1930
+ export class ParticipantDisconnected extends Message<ParticipantDisconnected> {
1931
+ /**
1932
+ * @generated from field: string participant_sid = 1;
1933
+ */
1934
+ participantSid = "";
1935
+
1936
+ constructor(data?: PartialMessage<ParticipantDisconnected>) {
1937
+ super();
1938
+ proto3.util.initPartial(data, this);
1939
+ }
1940
+
1941
+ static readonly runtime: typeof proto3 = proto3;
1942
+ static readonly typeName = "livekit.proto.ParticipantDisconnected";
1943
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1944
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1945
+ ]);
1946
+
1947
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantDisconnected {
1948
+ return new ParticipantDisconnected().fromBinary(bytes, options);
1949
+ }
1950
+
1951
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantDisconnected {
1952
+ return new ParticipantDisconnected().fromJson(jsonValue, options);
1953
+ }
1954
+
1955
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantDisconnected {
1956
+ return new ParticipantDisconnected().fromJsonString(jsonString, options);
1957
+ }
1958
+
1959
+ static equals(a: ParticipantDisconnected | PlainMessage<ParticipantDisconnected> | undefined, b: ParticipantDisconnected | PlainMessage<ParticipantDisconnected> | undefined): boolean {
1960
+ return proto3.util.equals(ParticipantDisconnected, a, b);
1961
+ }
1962
+ }
1963
+
1964
+ /**
1965
+ * @generated from message livekit.proto.LocalTrackPublished
1966
+ */
1967
+ export class LocalTrackPublished extends Message<LocalTrackPublished> {
1968
+ /**
1969
+ * The TrackPublicationInfo comes from the PublishTrack response
1970
+ * and the FfiClient musts wait for it before firing this event
1971
+ *
1972
+ * @generated from field: string track_sid = 1;
1973
+ */
1974
+ trackSid = "";
1975
+
1976
+ constructor(data?: PartialMessage<LocalTrackPublished>) {
1977
+ super();
1978
+ proto3.util.initPartial(data, this);
1979
+ }
1980
+
1981
+ static readonly runtime: typeof proto3 = proto3;
1982
+ static readonly typeName = "livekit.proto.LocalTrackPublished";
1983
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1984
+ { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1985
+ ]);
1986
+
1987
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackPublished {
1988
+ return new LocalTrackPublished().fromBinary(bytes, options);
1989
+ }
1990
+
1991
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackPublished {
1992
+ return new LocalTrackPublished().fromJson(jsonValue, options);
1993
+ }
1994
+
1995
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackPublished {
1996
+ return new LocalTrackPublished().fromJsonString(jsonString, options);
1997
+ }
1998
+
1999
+ static equals(a: LocalTrackPublished | PlainMessage<LocalTrackPublished> | undefined, b: LocalTrackPublished | PlainMessage<LocalTrackPublished> | undefined): boolean {
2000
+ return proto3.util.equals(LocalTrackPublished, a, b);
2001
+ }
2002
+ }
2003
+
2004
+ /**
2005
+ * @generated from message livekit.proto.LocalTrackUnpublished
2006
+ */
2007
+ export class LocalTrackUnpublished extends Message<LocalTrackUnpublished> {
2008
+ /**
2009
+ * @generated from field: string publication_sid = 1;
2010
+ */
2011
+ publicationSid = "";
2012
+
2013
+ constructor(data?: PartialMessage<LocalTrackUnpublished>) {
2014
+ super();
2015
+ proto3.util.initPartial(data, this);
2016
+ }
2017
+
2018
+ static readonly runtime: typeof proto3 = proto3;
2019
+ static readonly typeName = "livekit.proto.LocalTrackUnpublished";
2020
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2021
+ { no: 1, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2022
+ ]);
2023
+
2024
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackUnpublished {
2025
+ return new LocalTrackUnpublished().fromBinary(bytes, options);
2026
+ }
2027
+
2028
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackUnpublished {
2029
+ return new LocalTrackUnpublished().fromJson(jsonValue, options);
2030
+ }
2031
+
2032
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackUnpublished {
2033
+ return new LocalTrackUnpublished().fromJsonString(jsonString, options);
2034
+ }
2035
+
2036
+ static equals(a: LocalTrackUnpublished | PlainMessage<LocalTrackUnpublished> | undefined, b: LocalTrackUnpublished | PlainMessage<LocalTrackUnpublished> | undefined): boolean {
2037
+ return proto3.util.equals(LocalTrackUnpublished, a, b);
2038
+ }
2039
+ }
2040
+
2041
+ /**
2042
+ * @generated from message livekit.proto.TrackPublished
2043
+ */
2044
+ export class TrackPublished extends Message<TrackPublished> {
2045
+ /**
2046
+ * @generated from field: string participant_sid = 1;
2047
+ */
2048
+ participantSid = "";
2049
+
2050
+ /**
2051
+ * @generated from field: livekit.proto.OwnedTrackPublication publication = 2;
2052
+ */
2053
+ publication?: OwnedTrackPublication;
2054
+
2055
+ constructor(data?: PartialMessage<TrackPublished>) {
2056
+ super();
2057
+ proto3.util.initPartial(data, this);
2058
+ }
2059
+
2060
+ static readonly runtime: typeof proto3 = proto3;
2061
+ static readonly typeName = "livekit.proto.TrackPublished";
2062
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2063
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2064
+ { no: 2, name: "publication", kind: "message", T: OwnedTrackPublication },
2065
+ ]);
2066
+
2067
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublished {
2068
+ return new TrackPublished().fromBinary(bytes, options);
2069
+ }
2070
+
2071
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublished {
2072
+ return new TrackPublished().fromJson(jsonValue, options);
2073
+ }
2074
+
2075
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublished {
2076
+ return new TrackPublished().fromJsonString(jsonString, options);
2077
+ }
2078
+
2079
+ static equals(a: TrackPublished | PlainMessage<TrackPublished> | undefined, b: TrackPublished | PlainMessage<TrackPublished> | undefined): boolean {
2080
+ return proto3.util.equals(TrackPublished, a, b);
2081
+ }
2082
+ }
2083
+
2084
+ /**
2085
+ * @generated from message livekit.proto.TrackUnpublished
2086
+ */
2087
+ export class TrackUnpublished extends Message<TrackUnpublished> {
2088
+ /**
2089
+ * @generated from field: string participant_sid = 1;
2090
+ */
2091
+ participantSid = "";
2092
+
2093
+ /**
2094
+ * @generated from field: string publication_sid = 2;
2095
+ */
2096
+ publicationSid = "";
2097
+
2098
+ constructor(data?: PartialMessage<TrackUnpublished>) {
2099
+ super();
2100
+ proto3.util.initPartial(data, this);
2101
+ }
2102
+
2103
+ static readonly runtime: typeof proto3 = proto3;
2104
+ static readonly typeName = "livekit.proto.TrackUnpublished";
2105
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2106
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2107
+ { no: 2, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2108
+ ]);
2109
+
2110
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackUnpublished {
2111
+ return new TrackUnpublished().fromBinary(bytes, options);
2112
+ }
2113
+
2114
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackUnpublished {
2115
+ return new TrackUnpublished().fromJson(jsonValue, options);
2116
+ }
2117
+
2118
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackUnpublished {
2119
+ return new TrackUnpublished().fromJsonString(jsonString, options);
2120
+ }
2121
+
2122
+ static equals(a: TrackUnpublished | PlainMessage<TrackUnpublished> | undefined, b: TrackUnpublished | PlainMessage<TrackUnpublished> | undefined): boolean {
2123
+ return proto3.util.equals(TrackUnpublished, a, b);
2124
+ }
2125
+ }
2126
+
2127
+ /**
2128
+ * Publication isn't needed for subscription events on the FFI
2129
+ * The FFI will retrieve the publication using the Track sid
2130
+ *
2131
+ * @generated from message livekit.proto.TrackSubscribed
2132
+ */
2133
+ export class TrackSubscribed extends Message<TrackSubscribed> {
2134
+ /**
2135
+ * @generated from field: string participant_sid = 1;
2136
+ */
2137
+ participantSid = "";
2138
+
2139
+ /**
2140
+ * @generated from field: livekit.proto.OwnedTrack track = 2;
2141
+ */
2142
+ track?: OwnedTrack;
2143
+
2144
+ constructor(data?: PartialMessage<TrackSubscribed>) {
2145
+ super();
2146
+ proto3.util.initPartial(data, this);
2147
+ }
2148
+
2149
+ static readonly runtime: typeof proto3 = proto3;
2150
+ static readonly typeName = "livekit.proto.TrackSubscribed";
2151
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2152
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2153
+ { no: 2, name: "track", kind: "message", T: OwnedTrack },
2154
+ ]);
2155
+
2156
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackSubscribed {
2157
+ return new TrackSubscribed().fromBinary(bytes, options);
2158
+ }
2159
+
2160
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackSubscribed {
2161
+ return new TrackSubscribed().fromJson(jsonValue, options);
2162
+ }
2163
+
2164
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackSubscribed {
2165
+ return new TrackSubscribed().fromJsonString(jsonString, options);
2166
+ }
2167
+
2168
+ static equals(a: TrackSubscribed | PlainMessage<TrackSubscribed> | undefined, b: TrackSubscribed | PlainMessage<TrackSubscribed> | undefined): boolean {
2169
+ return proto3.util.equals(TrackSubscribed, a, b);
2170
+ }
2171
+ }
2172
+
2173
+ /**
2174
+ * @generated from message livekit.proto.TrackUnsubscribed
2175
+ */
2176
+ export class TrackUnsubscribed extends Message<TrackUnsubscribed> {
2177
+ /**
2178
+ * The FFI language can dispose/remove the VideoSink here
2179
+ *
2180
+ * @generated from field: string participant_sid = 1;
2181
+ */
2182
+ participantSid = "";
2183
+
2184
+ /**
2185
+ * @generated from field: string track_sid = 2;
2186
+ */
2187
+ trackSid = "";
2188
+
2189
+ constructor(data?: PartialMessage<TrackUnsubscribed>) {
2190
+ super();
2191
+ proto3.util.initPartial(data, this);
2192
+ }
2193
+
2194
+ static readonly runtime: typeof proto3 = proto3;
2195
+ static readonly typeName = "livekit.proto.TrackUnsubscribed";
2196
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2197
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2198
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2199
+ ]);
2200
+
2201
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackUnsubscribed {
2202
+ return new TrackUnsubscribed().fromBinary(bytes, options);
2203
+ }
2204
+
2205
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackUnsubscribed {
2206
+ return new TrackUnsubscribed().fromJson(jsonValue, options);
2207
+ }
2208
+
2209
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackUnsubscribed {
2210
+ return new TrackUnsubscribed().fromJsonString(jsonString, options);
2211
+ }
2212
+
2213
+ static equals(a: TrackUnsubscribed | PlainMessage<TrackUnsubscribed> | undefined, b: TrackUnsubscribed | PlainMessage<TrackUnsubscribed> | undefined): boolean {
2214
+ return proto3.util.equals(TrackUnsubscribed, a, b);
2215
+ }
2216
+ }
2217
+
2218
+ /**
2219
+ * @generated from message livekit.proto.TrackSubscriptionFailed
2220
+ */
2221
+ export class TrackSubscriptionFailed extends Message<TrackSubscriptionFailed> {
2222
+ /**
2223
+ * @generated from field: string participant_sid = 1;
2224
+ */
2225
+ participantSid = "";
2226
+
2227
+ /**
2228
+ * @generated from field: string track_sid = 2;
2229
+ */
2230
+ trackSid = "";
2231
+
2232
+ /**
2233
+ * @generated from field: string error = 3;
2234
+ */
2235
+ error = "";
2236
+
2237
+ constructor(data?: PartialMessage<TrackSubscriptionFailed>) {
2238
+ super();
2239
+ proto3.util.initPartial(data, this);
2240
+ }
2241
+
2242
+ static readonly runtime: typeof proto3 = proto3;
2243
+ static readonly typeName = "livekit.proto.TrackSubscriptionFailed";
2244
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2245
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2246
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2247
+ { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2248
+ ]);
2249
+
2250
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackSubscriptionFailed {
2251
+ return new TrackSubscriptionFailed().fromBinary(bytes, options);
2252
+ }
2253
+
2254
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackSubscriptionFailed {
2255
+ return new TrackSubscriptionFailed().fromJson(jsonValue, options);
2256
+ }
2257
+
2258
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackSubscriptionFailed {
2259
+ return new TrackSubscriptionFailed().fromJsonString(jsonString, options);
2260
+ }
2261
+
2262
+ static equals(a: TrackSubscriptionFailed | PlainMessage<TrackSubscriptionFailed> | undefined, b: TrackSubscriptionFailed | PlainMessage<TrackSubscriptionFailed> | undefined): boolean {
2263
+ return proto3.util.equals(TrackSubscriptionFailed, a, b);
2264
+ }
2265
+ }
2266
+
2267
+ /**
2268
+ * @generated from message livekit.proto.TrackMuted
2269
+ */
2270
+ export class TrackMuted extends Message<TrackMuted> {
2271
+ /**
2272
+ * @generated from field: string participant_sid = 1;
2273
+ */
2274
+ participantSid = "";
2275
+
2276
+ /**
2277
+ * @generated from field: string track_sid = 2;
2278
+ */
2279
+ trackSid = "";
2280
+
2281
+ constructor(data?: PartialMessage<TrackMuted>) {
2282
+ super();
2283
+ proto3.util.initPartial(data, this);
2284
+ }
2285
+
2286
+ static readonly runtime: typeof proto3 = proto3;
2287
+ static readonly typeName = "livekit.proto.TrackMuted";
2288
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2289
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2290
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2291
+ ]);
2292
+
2293
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackMuted {
2294
+ return new TrackMuted().fromBinary(bytes, options);
2295
+ }
2296
+
2297
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackMuted {
2298
+ return new TrackMuted().fromJson(jsonValue, options);
2299
+ }
2300
+
2301
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackMuted {
2302
+ return new TrackMuted().fromJsonString(jsonString, options);
2303
+ }
2304
+
2305
+ static equals(a: TrackMuted | PlainMessage<TrackMuted> | undefined, b: TrackMuted | PlainMessage<TrackMuted> | undefined): boolean {
2306
+ return proto3.util.equals(TrackMuted, a, b);
2307
+ }
2308
+ }
2309
+
2310
+ /**
2311
+ * @generated from message livekit.proto.TrackUnmuted
2312
+ */
2313
+ export class TrackUnmuted extends Message<TrackUnmuted> {
2314
+ /**
2315
+ * @generated from field: string participant_sid = 1;
2316
+ */
2317
+ participantSid = "";
2318
+
2319
+ /**
2320
+ * @generated from field: string track_sid = 2;
2321
+ */
2322
+ trackSid = "";
2323
+
2324
+ constructor(data?: PartialMessage<TrackUnmuted>) {
2325
+ super();
2326
+ proto3.util.initPartial(data, this);
2327
+ }
2328
+
2329
+ static readonly runtime: typeof proto3 = proto3;
2330
+ static readonly typeName = "livekit.proto.TrackUnmuted";
2331
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2332
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2333
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2334
+ ]);
2335
+
2336
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackUnmuted {
2337
+ return new TrackUnmuted().fromBinary(bytes, options);
2338
+ }
2339
+
2340
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackUnmuted {
2341
+ return new TrackUnmuted().fromJson(jsonValue, options);
2342
+ }
2343
+
2344
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackUnmuted {
2345
+ return new TrackUnmuted().fromJsonString(jsonString, options);
2346
+ }
2347
+
2348
+ static equals(a: TrackUnmuted | PlainMessage<TrackUnmuted> | undefined, b: TrackUnmuted | PlainMessage<TrackUnmuted> | undefined): boolean {
2349
+ return proto3.util.equals(TrackUnmuted, a, b);
2350
+ }
2351
+ }
2352
+
2353
+ /**
2354
+ * @generated from message livekit.proto.E2eeStateChanged
2355
+ */
2356
+ export class E2eeStateChanged extends Message<E2eeStateChanged> {
2357
+ /**
2358
+ * Using sid instead of identity for ffi communication
2359
+ *
2360
+ * @generated from field: string participant_sid = 1;
2361
+ */
2362
+ participantSid = "";
2363
+
2364
+ /**
2365
+ * @generated from field: livekit.proto.EncryptionState state = 2;
2366
+ */
2367
+ state = EncryptionState.NEW;
2368
+
2369
+ constructor(data?: PartialMessage<E2eeStateChanged>) {
2370
+ super();
2371
+ proto3.util.initPartial(data, this);
2372
+ }
2373
+
2374
+ static readonly runtime: typeof proto3 = proto3;
2375
+ static readonly typeName = "livekit.proto.E2eeStateChanged";
2376
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2377
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2378
+ { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(EncryptionState) },
2379
+ ]);
2380
+
2381
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): E2eeStateChanged {
2382
+ return new E2eeStateChanged().fromBinary(bytes, options);
2383
+ }
2384
+
2385
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): E2eeStateChanged {
2386
+ return new E2eeStateChanged().fromJson(jsonValue, options);
2387
+ }
2388
+
2389
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): E2eeStateChanged {
2390
+ return new E2eeStateChanged().fromJsonString(jsonString, options);
2391
+ }
2392
+
2393
+ static equals(a: E2eeStateChanged | PlainMessage<E2eeStateChanged> | undefined, b: E2eeStateChanged | PlainMessage<E2eeStateChanged> | undefined): boolean {
2394
+ return proto3.util.equals(E2eeStateChanged, a, b);
2395
+ }
2396
+ }
2397
+
2398
+ /**
2399
+ * @generated from message livekit.proto.ActiveSpeakersChanged
2400
+ */
2401
+ export class ActiveSpeakersChanged extends Message<ActiveSpeakersChanged> {
2402
+ /**
2403
+ * @generated from field: repeated string participant_sids = 1;
2404
+ */
2405
+ participantSids: string[] = [];
2406
+
2407
+ constructor(data?: PartialMessage<ActiveSpeakersChanged>) {
2408
+ super();
2409
+ proto3.util.initPartial(data, this);
2410
+ }
2411
+
2412
+ static readonly runtime: typeof proto3 = proto3;
2413
+ static readonly typeName = "livekit.proto.ActiveSpeakersChanged";
2414
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2415
+ { no: 1, name: "participant_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2416
+ ]);
2417
+
2418
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ActiveSpeakersChanged {
2419
+ return new ActiveSpeakersChanged().fromBinary(bytes, options);
2420
+ }
2421
+
2422
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ActiveSpeakersChanged {
2423
+ return new ActiveSpeakersChanged().fromJson(jsonValue, options);
2424
+ }
2425
+
2426
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ActiveSpeakersChanged {
2427
+ return new ActiveSpeakersChanged().fromJsonString(jsonString, options);
2428
+ }
2429
+
2430
+ static equals(a: ActiveSpeakersChanged | PlainMessage<ActiveSpeakersChanged> | undefined, b: ActiveSpeakersChanged | PlainMessage<ActiveSpeakersChanged> | undefined): boolean {
2431
+ return proto3.util.equals(ActiveSpeakersChanged, a, b);
2432
+ }
2433
+ }
2434
+
2435
+ /**
2436
+ * @generated from message livekit.proto.RoomMetadataChanged
2437
+ */
2438
+ export class RoomMetadataChanged extends Message<RoomMetadataChanged> {
2439
+ /**
2440
+ * @generated from field: string metadata = 1;
2441
+ */
2442
+ metadata = "";
2443
+
2444
+ constructor(data?: PartialMessage<RoomMetadataChanged>) {
2445
+ super();
2446
+ proto3.util.initPartial(data, this);
2447
+ }
2448
+
2449
+ static readonly runtime: typeof proto3 = proto3;
2450
+ static readonly typeName = "livekit.proto.RoomMetadataChanged";
2451
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2452
+ { no: 1, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2453
+ ]);
2454
+
2455
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomMetadataChanged {
2456
+ return new RoomMetadataChanged().fromBinary(bytes, options);
2457
+ }
2458
+
2459
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RoomMetadataChanged {
2460
+ return new RoomMetadataChanged().fromJson(jsonValue, options);
2461
+ }
2462
+
2463
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RoomMetadataChanged {
2464
+ return new RoomMetadataChanged().fromJsonString(jsonString, options);
2465
+ }
2466
+
2467
+ static equals(a: RoomMetadataChanged | PlainMessage<RoomMetadataChanged> | undefined, b: RoomMetadataChanged | PlainMessage<RoomMetadataChanged> | undefined): boolean {
2468
+ return proto3.util.equals(RoomMetadataChanged, a, b);
2469
+ }
2470
+ }
2471
+
2472
+ /**
2473
+ * @generated from message livekit.proto.ParticipantMetadataChanged
2474
+ */
2475
+ export class ParticipantMetadataChanged extends Message<ParticipantMetadataChanged> {
2476
+ /**
2477
+ * @generated from field: string participant_sid = 1;
2478
+ */
2479
+ participantSid = "";
2480
+
2481
+ /**
2482
+ * @generated from field: string metadata = 2;
2483
+ */
2484
+ metadata = "";
2485
+
2486
+ constructor(data?: PartialMessage<ParticipantMetadataChanged>) {
2487
+ super();
2488
+ proto3.util.initPartial(data, this);
2489
+ }
2490
+
2491
+ static readonly runtime: typeof proto3 = proto3;
2492
+ static readonly typeName = "livekit.proto.ParticipantMetadataChanged";
2493
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2494
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2495
+ { no: 2, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2496
+ ]);
2497
+
2498
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantMetadataChanged {
2499
+ return new ParticipantMetadataChanged().fromBinary(bytes, options);
2500
+ }
2501
+
2502
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantMetadataChanged {
2503
+ return new ParticipantMetadataChanged().fromJson(jsonValue, options);
2504
+ }
2505
+
2506
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantMetadataChanged {
2507
+ return new ParticipantMetadataChanged().fromJsonString(jsonString, options);
2508
+ }
2509
+
2510
+ static equals(a: ParticipantMetadataChanged | PlainMessage<ParticipantMetadataChanged> | undefined, b: ParticipantMetadataChanged | PlainMessage<ParticipantMetadataChanged> | undefined): boolean {
2511
+ return proto3.util.equals(ParticipantMetadataChanged, a, b);
2512
+ }
2513
+ }
2514
+
2515
+ /**
2516
+ * @generated from message livekit.proto.ParticipantNameChanged
2517
+ */
2518
+ export class ParticipantNameChanged extends Message<ParticipantNameChanged> {
2519
+ /**
2520
+ * @generated from field: string participant_sid = 1;
2521
+ */
2522
+ participantSid = "";
2523
+
2524
+ /**
2525
+ * @generated from field: string name = 2;
2526
+ */
2527
+ name = "";
2528
+
2529
+ constructor(data?: PartialMessage<ParticipantNameChanged>) {
2530
+ super();
2531
+ proto3.util.initPartial(data, this);
2532
+ }
2533
+
2534
+ static readonly runtime: typeof proto3 = proto3;
2535
+ static readonly typeName = "livekit.proto.ParticipantNameChanged";
2536
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2537
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2538
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2539
+ ]);
2540
+
2541
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantNameChanged {
2542
+ return new ParticipantNameChanged().fromBinary(bytes, options);
2543
+ }
2544
+
2545
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantNameChanged {
2546
+ return new ParticipantNameChanged().fromJson(jsonValue, options);
2547
+ }
2548
+
2549
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantNameChanged {
2550
+ return new ParticipantNameChanged().fromJsonString(jsonString, options);
2551
+ }
2552
+
2553
+ static equals(a: ParticipantNameChanged | PlainMessage<ParticipantNameChanged> | undefined, b: ParticipantNameChanged | PlainMessage<ParticipantNameChanged> | undefined): boolean {
2554
+ return proto3.util.equals(ParticipantNameChanged, a, b);
2555
+ }
2556
+ }
2557
+
2558
+ /**
2559
+ * @generated from message livekit.proto.ConnectionQualityChanged
2560
+ */
2561
+ export class ConnectionQualityChanged extends Message<ConnectionQualityChanged> {
2562
+ /**
2563
+ * @generated from field: string participant_sid = 1;
2564
+ */
2565
+ participantSid = "";
2566
+
2567
+ /**
2568
+ * @generated from field: livekit.proto.ConnectionQuality quality = 2;
2569
+ */
2570
+ quality = ConnectionQuality.QUALITY_POOR;
2571
+
2572
+ constructor(data?: PartialMessage<ConnectionQualityChanged>) {
2573
+ super();
2574
+ proto3.util.initPartial(data, this);
2575
+ }
2576
+
2577
+ static readonly runtime: typeof proto3 = proto3;
2578
+ static readonly typeName = "livekit.proto.ConnectionQualityChanged";
2579
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2580
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2581
+ { no: 2, name: "quality", kind: "enum", T: proto3.getEnumType(ConnectionQuality) },
2582
+ ]);
2583
+
2584
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionQualityChanged {
2585
+ return new ConnectionQualityChanged().fromBinary(bytes, options);
2586
+ }
2587
+
2588
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectionQualityChanged {
2589
+ return new ConnectionQualityChanged().fromJson(jsonValue, options);
2590
+ }
2591
+
2592
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectionQualityChanged {
2593
+ return new ConnectionQualityChanged().fromJsonString(jsonString, options);
2594
+ }
2595
+
2596
+ static equals(a: ConnectionQualityChanged | PlainMessage<ConnectionQualityChanged> | undefined, b: ConnectionQualityChanged | PlainMessage<ConnectionQualityChanged> | undefined): boolean {
2597
+ return proto3.util.equals(ConnectionQualityChanged, a, b);
2598
+ }
2599
+ }
2600
+
2601
+ /**
2602
+ * @generated from message livekit.proto.DataReceived
2603
+ */
2604
+ export class DataReceived extends Message<DataReceived> {
2605
+ /**
2606
+ * @generated from field: livekit.proto.OwnedBuffer data = 1;
2607
+ */
2608
+ data?: OwnedBuffer;
2609
+
2610
+ /**
2611
+ * Can be empty if the data is sent a server SDK
2612
+ *
2613
+ * @generated from field: optional string participant_sid = 2;
2614
+ */
2615
+ participantSid?: string;
2616
+
2617
+ /**
2618
+ * @generated from field: livekit.proto.DataPacketKind kind = 3;
2619
+ */
2620
+ kind = DataPacketKind.KIND_LOSSY;
2621
+
2622
+ constructor(data?: PartialMessage<DataReceived>) {
2623
+ super();
2624
+ proto3.util.initPartial(data, this);
2625
+ }
2626
+
2627
+ static readonly runtime: typeof proto3 = proto3;
2628
+ static readonly typeName = "livekit.proto.DataReceived";
2629
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2630
+ { no: 1, name: "data", kind: "message", T: OwnedBuffer },
2631
+ { no: 2, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2632
+ { no: 3, name: "kind", kind: "enum", T: proto3.getEnumType(DataPacketKind) },
2633
+ ]);
2634
+
2635
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DataReceived {
2636
+ return new DataReceived().fromBinary(bytes, options);
2637
+ }
2638
+
2639
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DataReceived {
2640
+ return new DataReceived().fromJson(jsonValue, options);
2641
+ }
2642
+
2643
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DataReceived {
2644
+ return new DataReceived().fromJsonString(jsonString, options);
2645
+ }
2646
+
2647
+ static equals(a: DataReceived | PlainMessage<DataReceived> | undefined, b: DataReceived | PlainMessage<DataReceived> | undefined): boolean {
2648
+ return proto3.util.equals(DataReceived, a, b);
2649
+ }
2650
+ }
2651
+
2652
+ /**
2653
+ * @generated from message livekit.proto.ConnectionStateChanged
2654
+ */
2655
+ export class ConnectionStateChanged extends Message<ConnectionStateChanged> {
2656
+ /**
2657
+ * @generated from field: livekit.proto.ConnectionState state = 1;
2658
+ */
2659
+ state = ConnectionState.CONN_DISCONNECTED;
2660
+
2661
+ constructor(data?: PartialMessage<ConnectionStateChanged>) {
2662
+ super();
2663
+ proto3.util.initPartial(data, this);
2664
+ }
2665
+
2666
+ static readonly runtime: typeof proto3 = proto3;
2667
+ static readonly typeName = "livekit.proto.ConnectionStateChanged";
2668
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2669
+ { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(ConnectionState) },
2670
+ ]);
2671
+
2672
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionStateChanged {
2673
+ return new ConnectionStateChanged().fromBinary(bytes, options);
2674
+ }
2675
+
2676
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectionStateChanged {
2677
+ return new ConnectionStateChanged().fromJson(jsonValue, options);
2678
+ }
2679
+
2680
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectionStateChanged {
2681
+ return new ConnectionStateChanged().fromJsonString(jsonString, options);
2682
+ }
2683
+
2684
+ static equals(a: ConnectionStateChanged | PlainMessage<ConnectionStateChanged> | undefined, b: ConnectionStateChanged | PlainMessage<ConnectionStateChanged> | undefined): boolean {
2685
+ return proto3.util.equals(ConnectionStateChanged, a, b);
2686
+ }
2687
+ }
2688
+
2689
+ /**
2690
+ * @generated from message livekit.proto.Connected
2691
+ */
2692
+ export class Connected extends Message<Connected> {
2693
+ constructor(data?: PartialMessage<Connected>) {
2694
+ super();
2695
+ proto3.util.initPartial(data, this);
2696
+ }
2697
+
2698
+ static readonly runtime: typeof proto3 = proto3;
2699
+ static readonly typeName = "livekit.proto.Connected";
2700
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2701
+ ]);
2702
+
2703
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Connected {
2704
+ return new Connected().fromBinary(bytes, options);
2705
+ }
2706
+
2707
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Connected {
2708
+ return new Connected().fromJson(jsonValue, options);
2709
+ }
2710
+
2711
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Connected {
2712
+ return new Connected().fromJsonString(jsonString, options);
2713
+ }
2714
+
2715
+ static equals(a: Connected | PlainMessage<Connected> | undefined, b: Connected | PlainMessage<Connected> | undefined): boolean {
2716
+ return proto3.util.equals(Connected, a, b);
2717
+ }
2718
+ }
2719
+
2720
+ /**
2721
+ * @generated from message livekit.proto.Disconnected
2722
+ */
2723
+ export class Disconnected extends Message<Disconnected> {
2724
+ constructor(data?: PartialMessage<Disconnected>) {
2725
+ super();
2726
+ proto3.util.initPartial(data, this);
2727
+ }
2728
+
2729
+ static readonly runtime: typeof proto3 = proto3;
2730
+ static readonly typeName = "livekit.proto.Disconnected";
2731
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2732
+ ]);
2733
+
2734
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Disconnected {
2735
+ return new Disconnected().fromBinary(bytes, options);
2736
+ }
2737
+
2738
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Disconnected {
2739
+ return new Disconnected().fromJson(jsonValue, options);
2740
+ }
2741
+
2742
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Disconnected {
2743
+ return new Disconnected().fromJsonString(jsonString, options);
2744
+ }
2745
+
2746
+ static equals(a: Disconnected | PlainMessage<Disconnected> | undefined, b: Disconnected | PlainMessage<Disconnected> | undefined): boolean {
2747
+ return proto3.util.equals(Disconnected, a, b);
2748
+ }
2749
+ }
2750
+
2751
+ /**
2752
+ * @generated from message livekit.proto.Reconnecting
2753
+ */
2754
+ export class Reconnecting extends Message<Reconnecting> {
2755
+ constructor(data?: PartialMessage<Reconnecting>) {
2756
+ super();
2757
+ proto3.util.initPartial(data, this);
2758
+ }
2759
+
2760
+ static readonly runtime: typeof proto3 = proto3;
2761
+ static readonly typeName = "livekit.proto.Reconnecting";
2762
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2763
+ ]);
2764
+
2765
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Reconnecting {
2766
+ return new Reconnecting().fromBinary(bytes, options);
2767
+ }
2768
+
2769
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Reconnecting {
2770
+ return new Reconnecting().fromJson(jsonValue, options);
2771
+ }
2772
+
2773
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Reconnecting {
2774
+ return new Reconnecting().fromJsonString(jsonString, options);
2775
+ }
2776
+
2777
+ static equals(a: Reconnecting | PlainMessage<Reconnecting> | undefined, b: Reconnecting | PlainMessage<Reconnecting> | undefined): boolean {
2778
+ return proto3.util.equals(Reconnecting, a, b);
2779
+ }
2780
+ }
2781
+
2782
+ /**
2783
+ * @generated from message livekit.proto.Reconnected
2784
+ */
2785
+ export class Reconnected extends Message<Reconnected> {
2786
+ constructor(data?: PartialMessage<Reconnected>) {
2787
+ super();
2788
+ proto3.util.initPartial(data, this);
2789
+ }
2790
+
2791
+ static readonly runtime: typeof proto3 = proto3;
2792
+ static readonly typeName = "livekit.proto.Reconnected";
2793
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2794
+ ]);
2795
+
2796
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Reconnected {
2797
+ return new Reconnected().fromBinary(bytes, options);
2798
+ }
2799
+
2800
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Reconnected {
2801
+ return new Reconnected().fromJson(jsonValue, options);
2802
+ }
2803
+
2804
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Reconnected {
2805
+ return new Reconnected().fromJsonString(jsonString, options);
2806
+ }
2807
+
2808
+ static equals(a: Reconnected | PlainMessage<Reconnected> | undefined, b: Reconnected | PlainMessage<Reconnected> | undefined): boolean {
2809
+ return proto3.util.equals(Reconnected, a, b);
2810
+ }
2811
+ }
2812
+
2813
+ /**
2814
+ * @generated from message livekit.proto.RoomEOS
2815
+ */
2816
+ export class RoomEOS extends Message<RoomEOS> {
2817
+ constructor(data?: PartialMessage<RoomEOS>) {
2818
+ super();
2819
+ proto3.util.initPartial(data, this);
2820
+ }
2821
+
2822
+ static readonly runtime: typeof proto3 = proto3;
2823
+ static readonly typeName = "livekit.proto.RoomEOS";
2824
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2825
+ ]);
2826
+
2827
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomEOS {
2828
+ return new RoomEOS().fromBinary(bytes, options);
2829
+ }
2830
+
2831
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RoomEOS {
2832
+ return new RoomEOS().fromJson(jsonValue, options);
2833
+ }
2834
+
2835
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RoomEOS {
2836
+ return new RoomEOS().fromJsonString(jsonString, options);
2837
+ }
2838
+
2839
+ static equals(a: RoomEOS | PlainMessage<RoomEOS> | undefined, b: RoomEOS | PlainMessage<RoomEOS> | undefined): boolean {
2840
+ return proto3.util.equals(RoomEOS, a, b);
2841
+ }
2842
+ }
2843
+