livekit-client 1.12.0 → 1.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. package/README.md +19 -1
  2. package/dist/livekit-client.e2ee.worker.js +1 -1
  3. package/dist/livekit-client.e2ee.worker.js.map +1 -1
  4. package/dist/livekit-client.e2ee.worker.mjs +442 -334
  5. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  6. package/dist/livekit-client.esm.mjs +12303 -14499
  7. package/dist/livekit-client.esm.mjs.map +1 -1
  8. package/dist/livekit-client.umd.js +1 -1
  9. package/dist/livekit-client.umd.js.map +1 -1
  10. package/dist/src/api/SignalClient.d.ts +2 -2
  11. package/dist/src/api/SignalClient.d.ts.map +1 -1
  12. package/dist/src/connectionHelper/ConnectionCheck.d.ts +3 -2
  13. package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
  14. package/dist/src/connectionHelper/checks/Checker.d.ts +3 -2
  15. package/dist/src/connectionHelper/checks/Checker.d.ts.map +1 -1
  16. package/dist/src/connectionHelper/checks/webrtc.d.ts.map +1 -1
  17. package/dist/src/connectionHelper/checks/websocket.d.ts.map +1 -1
  18. package/dist/src/e2ee/E2eeManager.d.ts +4 -2
  19. package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
  20. package/dist/src/e2ee/KeyProvider.d.ts +4 -2
  21. package/dist/src/e2ee/KeyProvider.d.ts.map +1 -1
  22. package/dist/src/e2ee/constants.d.ts +1 -0
  23. package/dist/src/e2ee/constants.d.ts.map +1 -1
  24. package/dist/src/e2ee/types.d.ts +1 -0
  25. package/dist/src/e2ee/types.d.ts.map +1 -1
  26. package/dist/src/e2ee/worker/FrameCryptor.d.ts +4 -3
  27. package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
  28. package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts +21 -2
  29. package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
  30. package/dist/src/index.d.ts +1 -1
  31. package/dist/src/index.d.ts.map +1 -1
  32. package/dist/src/proto/livekit_models_pb.d.ts +1264 -0
  33. package/dist/src/proto/livekit_models_pb.d.ts.map +1 -0
  34. package/dist/src/proto/livekit_rtc_pb.d.ts +1373 -0
  35. package/dist/src/proto/livekit_rtc_pb.d.ts.map +1 -0
  36. package/dist/src/room/PCTransport.d.ts +2 -1
  37. package/dist/src/room/PCTransport.d.ts.map +1 -1
  38. package/dist/src/room/RTCEngine.d.ts +9 -5
  39. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  40. package/dist/src/room/RegionUrlProvider.d.ts +4 -1
  41. package/dist/src/room/RegionUrlProvider.d.ts.map +1 -1
  42. package/dist/src/room/Room.d.ts +15 -11
  43. package/dist/src/room/Room.d.ts.map +1 -1
  44. package/dist/src/room/participant/LocalParticipant.d.ts +2 -2
  45. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  46. package/dist/src/room/participant/Participant.d.ts +5 -3
  47. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  48. package/dist/src/room/participant/ParticipantTrackPermission.d.ts +1 -1
  49. package/dist/src/room/participant/ParticipantTrackPermission.d.ts.map +1 -1
  50. package/dist/src/room/participant/RemoteParticipant.d.ts +8 -7
  51. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  52. package/dist/src/room/timers.d.ts +5 -4
  53. package/dist/src/room/timers.d.ts.map +1 -1
  54. package/dist/src/room/track/LocalTrack.d.ts +3 -0
  55. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  56. package/dist/src/room/track/LocalTrackPublication.d.ts +1 -1
  57. package/dist/src/room/track/LocalTrackPublication.d.ts.map +1 -1
  58. package/dist/src/room/track/LocalVideoTrack.d.ts +2 -2
  59. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  60. package/dist/src/room/track/RemoteTrackPublication.d.ts +1 -1
  61. package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
  62. package/dist/src/room/track/Track.d.ts +6 -4
  63. package/dist/src/room/track/Track.d.ts.map +1 -1
  64. package/dist/src/room/track/TrackPublication.d.ts +7 -5
  65. package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
  66. package/dist/src/room/track/create.d.ts.map +1 -1
  67. package/dist/src/room/track/options.d.ts +7 -0
  68. package/dist/src/room/track/options.d.ts.map +1 -1
  69. package/dist/src/room/track/utils.d.ts +5 -1
  70. package/dist/src/room/track/utils.d.ts.map +1 -1
  71. package/dist/src/room/utils.d.ts +3 -1
  72. package/dist/src/room/utils.d.ts.map +1 -1
  73. package/dist/src/test/mocks.d.ts +4 -3
  74. package/dist/src/test/mocks.d.ts.map +1 -1
  75. package/dist/src/utils/browserParser.d.ts +2 -0
  76. package/dist/src/utils/browserParser.d.ts.map +1 -1
  77. package/dist/ts4.2/src/api/SignalClient.d.ts +2 -2
  78. package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +3 -2
  79. package/dist/ts4.2/src/connectionHelper/checks/Checker.d.ts +3 -2
  80. package/dist/ts4.2/src/e2ee/E2eeManager.d.ts +4 -2
  81. package/dist/ts4.2/src/e2ee/KeyProvider.d.ts +4 -2
  82. package/dist/ts4.2/src/e2ee/constants.d.ts +1 -0
  83. package/dist/ts4.2/src/e2ee/types.d.ts +1 -0
  84. package/dist/ts4.2/src/e2ee/worker/FrameCryptor.d.ts +4 -3
  85. package/dist/ts4.2/src/e2ee/worker/ParticipantKeyHandler.d.ts +21 -2
  86. package/dist/ts4.2/src/index.d.ts +1 -1
  87. package/dist/ts4.2/src/proto/livekit_models_pb.d.ts +1264 -0
  88. package/dist/ts4.2/src/proto/livekit_rtc_pb.d.ts +1373 -0
  89. package/dist/ts4.2/src/room/PCTransport.d.ts +2 -1
  90. package/dist/ts4.2/src/room/RTCEngine.d.ts +9 -5
  91. package/dist/ts4.2/src/room/RegionUrlProvider.d.ts +4 -1
  92. package/dist/ts4.2/src/room/Room.d.ts +15 -11
  93. package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +2 -2
  94. package/dist/ts4.2/src/room/participant/Participant.d.ts +5 -3
  95. package/dist/ts4.2/src/room/participant/ParticipantTrackPermission.d.ts +1 -1
  96. package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +8 -7
  97. package/dist/ts4.2/src/room/timers.d.ts +5 -4
  98. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +3 -0
  99. package/dist/ts4.2/src/room/track/LocalTrackPublication.d.ts +1 -1
  100. package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +2 -2
  101. package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +1 -1
  102. package/dist/ts4.2/src/room/track/Track.d.ts +6 -4
  103. package/dist/ts4.2/src/room/track/TrackPublication.d.ts +7 -5
  104. package/dist/ts4.2/src/room/track/options.d.ts +7 -0
  105. package/dist/ts4.2/src/room/track/utils.d.ts +5 -1
  106. package/dist/ts4.2/src/room/utils.d.ts +3 -1
  107. package/dist/ts4.2/src/test/mocks.d.ts +4 -3
  108. package/dist/ts4.2/src/utils/browserParser.d.ts +2 -0
  109. package/package.json +10 -10
  110. package/src/api/SignalClient.ts +104 -101
  111. package/src/connectionHelper/ConnectionCheck.ts +3 -2
  112. package/src/connectionHelper/checks/Checker.ts +3 -3
  113. package/src/connectionHelper/checks/webrtc.ts +66 -2
  114. package/src/connectionHelper/checks/websocket.ts +4 -0
  115. package/src/e2ee/E2eeManager.ts +4 -3
  116. package/src/e2ee/KeyProvider.ts +3 -2
  117. package/src/e2ee/constants.ts +4 -0
  118. package/src/e2ee/types.ts +1 -0
  119. package/src/e2ee/worker/FrameCryptor.test.ts +1 -3
  120. package/src/e2ee/worker/FrameCryptor.ts +14 -16
  121. package/src/e2ee/worker/ParticipantKeyHandler.ts +48 -2
  122. package/src/e2ee/worker/e2ee.worker.ts +12 -6
  123. package/src/index.ts +1 -1
  124. package/src/proto/livekit_models_pb.ts +2096 -0
  125. package/src/proto/livekit_rtc_pb.ts +2332 -0
  126. package/src/room/PCTransport.ts +1 -1
  127. package/src/room/RTCEngine.ts +24 -18
  128. package/src/room/RegionUrlProvider.ts +11 -2
  129. package/src/room/Room.test.ts +1 -0
  130. package/src/room/Room.ts +175 -86
  131. package/src/room/participant/LocalParticipant.ts +43 -59
  132. package/src/room/participant/Participant.ts +6 -4
  133. package/src/room/participant/ParticipantTrackPermission.ts +3 -3
  134. package/src/room/participant/RemoteParticipant.ts +24 -21
  135. package/src/room/participant/publishUtils.test.ts +1 -0
  136. package/src/room/track/LocalTrack.ts +24 -9
  137. package/src/room/track/LocalTrackPublication.ts +1 -1
  138. package/src/room/track/LocalVideoTrack.test.ts +2 -1
  139. package/src/room/track/LocalVideoTrack.ts +22 -22
  140. package/src/room/track/RemoteTrackPublication.ts +12 -7
  141. package/src/room/track/RemoteVideoTrack.test.ts +5 -4
  142. package/src/room/track/Track.ts +9 -6
  143. package/src/room/track/TrackPublication.ts +7 -5
  144. package/src/room/track/create.ts +18 -17
  145. package/src/room/track/facingMode.test.ts +1 -0
  146. package/src/room/track/options.ts +6 -0
  147. package/src/room/track/utils.test.ts +1 -0
  148. package/src/room/track/utils.ts +44 -2
  149. package/src/room/utils.test.ts +16 -0
  150. package/src/room/utils.ts +20 -4
  151. package/src/test/mocks.ts +7 -5
  152. package/src/utils/AsyncQueue.test.ts +1 -0
  153. package/src/utils/browserParser.test.ts +33 -3
  154. package/src/utils/browserParser.ts +5 -0
  155. package/dist/src/proto/google/protobuf/timestamp.d.ts +0 -146
  156. package/dist/src/proto/google/protobuf/timestamp.d.ts.map +0 -1
  157. package/dist/src/proto/livekit_models.d.ts +0 -2399
  158. package/dist/src/proto/livekit_models.d.ts.map +0 -1
  159. package/dist/src/proto/livekit_rtc.d.ts +0 -14352
  160. package/dist/src/proto/livekit_rtc.d.ts.map +0 -1
  161. package/dist/ts4.2/src/proto/google/protobuf/timestamp.d.ts +0 -150
  162. package/dist/ts4.2/src/proto/livekit_models.d.ts +0 -2659
  163. package/dist/ts4.2/src/proto/livekit_rtc.d.ts +0 -15764
  164. package/src/proto/google/protobuf/timestamp.ts +0 -230
  165. package/src/proto/livekit_models.ts +0 -4006
  166. package/src/proto/livekit_rtc.ts +0 -4672
@@ -0,0 +1,2332 @@
1
+ // @generated by protoc-gen-es v1.3.0 with parameter "target=ts"
2
+ // @generated from file livekit_rtc.proto (package livekit, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7
+ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
8
+ import { ClientConfiguration, ConnectionQuality, DisconnectReason, Encryption_Type, ParticipantInfo, ParticipantTracks, Room, ServerInfo, SpeakerInfo, SubscriptionError, TrackInfo, TrackSource, TrackType, VideoLayer, VideoQuality } from "./livekit_models_pb.js";
9
+
10
+ /**
11
+ * @generated from enum livekit.SignalTarget
12
+ */
13
+ export enum SignalTarget {
14
+ /**
15
+ * @generated from enum value: PUBLISHER = 0;
16
+ */
17
+ PUBLISHER = 0,
18
+
19
+ /**
20
+ * @generated from enum value: SUBSCRIBER = 1;
21
+ */
22
+ SUBSCRIBER = 1,
23
+ }
24
+ // Retrieve enum metadata with: proto3.getEnumType(SignalTarget)
25
+ proto3.util.setEnumType(SignalTarget, "livekit.SignalTarget", [
26
+ { no: 0, name: "PUBLISHER" },
27
+ { no: 1, name: "SUBSCRIBER" },
28
+ ]);
29
+
30
+ /**
31
+ * @generated from enum livekit.StreamState
32
+ */
33
+ export enum StreamState {
34
+ /**
35
+ * @generated from enum value: ACTIVE = 0;
36
+ */
37
+ ACTIVE = 0,
38
+
39
+ /**
40
+ * @generated from enum value: PAUSED = 1;
41
+ */
42
+ PAUSED = 1,
43
+ }
44
+ // Retrieve enum metadata with: proto3.getEnumType(StreamState)
45
+ proto3.util.setEnumType(StreamState, "livekit.StreamState", [
46
+ { no: 0, name: "ACTIVE" },
47
+ { no: 1, name: "PAUSED" },
48
+ ]);
49
+
50
+ /**
51
+ * @generated from enum livekit.CandidateProtocol
52
+ */
53
+ export enum CandidateProtocol {
54
+ /**
55
+ * @generated from enum value: UDP = 0;
56
+ */
57
+ UDP = 0,
58
+
59
+ /**
60
+ * @generated from enum value: TCP = 1;
61
+ */
62
+ TCP = 1,
63
+
64
+ /**
65
+ * @generated from enum value: TLS = 2;
66
+ */
67
+ TLS = 2,
68
+ }
69
+ // Retrieve enum metadata with: proto3.getEnumType(CandidateProtocol)
70
+ proto3.util.setEnumType(CandidateProtocol, "livekit.CandidateProtocol", [
71
+ { no: 0, name: "UDP" },
72
+ { no: 1, name: "TCP" },
73
+ { no: 2, name: "TLS" },
74
+ ]);
75
+
76
+ /**
77
+ * @generated from message livekit.SignalRequest
78
+ */
79
+ export class SignalRequest extends Message<SignalRequest> {
80
+ /**
81
+ * @generated from oneof livekit.SignalRequest.message
82
+ */
83
+ message: {
84
+ /**
85
+ * initial join exchange, for publisher
86
+ *
87
+ * @generated from field: livekit.SessionDescription offer = 1;
88
+ */
89
+ value: SessionDescription;
90
+ case: "offer";
91
+ } | {
92
+ /**
93
+ * participant answering publisher offer
94
+ *
95
+ * @generated from field: livekit.SessionDescription answer = 2;
96
+ */
97
+ value: SessionDescription;
98
+ case: "answer";
99
+ } | {
100
+ /**
101
+ * @generated from field: livekit.TrickleRequest trickle = 3;
102
+ */
103
+ value: TrickleRequest;
104
+ case: "trickle";
105
+ } | {
106
+ /**
107
+ * @generated from field: livekit.AddTrackRequest add_track = 4;
108
+ */
109
+ value: AddTrackRequest;
110
+ case: "addTrack";
111
+ } | {
112
+ /**
113
+ * mute the participant's published tracks
114
+ *
115
+ * @generated from field: livekit.MuteTrackRequest mute = 5;
116
+ */
117
+ value: MuteTrackRequest;
118
+ case: "mute";
119
+ } | {
120
+ /**
121
+ * Subscribe or unsubscribe from tracks
122
+ *
123
+ * @generated from field: livekit.UpdateSubscription subscription = 6;
124
+ */
125
+ value: UpdateSubscription;
126
+ case: "subscription";
127
+ } | {
128
+ /**
129
+ * Update settings of subscribed tracks
130
+ *
131
+ * @generated from field: livekit.UpdateTrackSettings track_setting = 7;
132
+ */
133
+ value: UpdateTrackSettings;
134
+ case: "trackSetting";
135
+ } | {
136
+ /**
137
+ * Immediately terminate session
138
+ *
139
+ * @generated from field: livekit.LeaveRequest leave = 8;
140
+ */
141
+ value: LeaveRequest;
142
+ case: "leave";
143
+ } | {
144
+ /**
145
+ * Update published video layers
146
+ *
147
+ * @generated from field: livekit.UpdateVideoLayers update_layers = 10;
148
+ */
149
+ value: UpdateVideoLayers;
150
+ case: "updateLayers";
151
+ } | {
152
+ /**
153
+ * Update subscriber permissions
154
+ *
155
+ * @generated from field: livekit.SubscriptionPermission subscription_permission = 11;
156
+ */
157
+ value: SubscriptionPermission;
158
+ case: "subscriptionPermission";
159
+ } | {
160
+ /**
161
+ * sync client's subscribe state to server during reconnect
162
+ *
163
+ * @generated from field: livekit.SyncState sync_state = 12;
164
+ */
165
+ value: SyncState;
166
+ case: "syncState";
167
+ } | {
168
+ /**
169
+ * Simulate conditions, for client validations
170
+ *
171
+ * @generated from field: livekit.SimulateScenario simulate = 13;
172
+ */
173
+ value: SimulateScenario;
174
+ case: "simulate";
175
+ } | {
176
+ /**
177
+ * client triggered ping to server
178
+ *
179
+ * deprecated by ping_req (message Ping)
180
+ *
181
+ * @generated from field: int64 ping = 14;
182
+ */
183
+ value: bigint;
184
+ case: "ping";
185
+ } | {
186
+ /**
187
+ * update a participant's own metadata and/or name
188
+ *
189
+ * @generated from field: livekit.UpdateParticipantMetadata update_metadata = 15;
190
+ */
191
+ value: UpdateParticipantMetadata;
192
+ case: "updateMetadata";
193
+ } | {
194
+ /**
195
+ * @generated from field: livekit.Ping ping_req = 16;
196
+ */
197
+ value: Ping;
198
+ case: "pingReq";
199
+ } | { case: undefined; value?: undefined } = { case: undefined };
200
+
201
+ constructor(data?: PartialMessage<SignalRequest>) {
202
+ super();
203
+ proto3.util.initPartial(data, this);
204
+ }
205
+
206
+ static readonly runtime: typeof proto3 = proto3;
207
+ static readonly typeName = "livekit.SignalRequest";
208
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
209
+ { no: 1, name: "offer", kind: "message", T: SessionDescription, oneof: "message" },
210
+ { no: 2, name: "answer", kind: "message", T: SessionDescription, oneof: "message" },
211
+ { no: 3, name: "trickle", kind: "message", T: TrickleRequest, oneof: "message" },
212
+ { no: 4, name: "add_track", kind: "message", T: AddTrackRequest, oneof: "message" },
213
+ { no: 5, name: "mute", kind: "message", T: MuteTrackRequest, oneof: "message" },
214
+ { no: 6, name: "subscription", kind: "message", T: UpdateSubscription, oneof: "message" },
215
+ { no: 7, name: "track_setting", kind: "message", T: UpdateTrackSettings, oneof: "message" },
216
+ { no: 8, name: "leave", kind: "message", T: LeaveRequest, oneof: "message" },
217
+ { no: 10, name: "update_layers", kind: "message", T: UpdateVideoLayers, oneof: "message" },
218
+ { no: 11, name: "subscription_permission", kind: "message", T: SubscriptionPermission, oneof: "message" },
219
+ { no: 12, name: "sync_state", kind: "message", T: SyncState, oneof: "message" },
220
+ { no: 13, name: "simulate", kind: "message", T: SimulateScenario, oneof: "message" },
221
+ { no: 14, name: "ping", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "message" },
222
+ { no: 15, name: "update_metadata", kind: "message", T: UpdateParticipantMetadata, oneof: "message" },
223
+ { no: 16, name: "ping_req", kind: "message", T: Ping, oneof: "message" },
224
+ ]);
225
+
226
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalRequest {
227
+ return new SignalRequest().fromBinary(bytes, options);
228
+ }
229
+
230
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalRequest {
231
+ return new SignalRequest().fromJson(jsonValue, options);
232
+ }
233
+
234
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalRequest {
235
+ return new SignalRequest().fromJsonString(jsonString, options);
236
+ }
237
+
238
+ static equals(a: SignalRequest | PlainMessage<SignalRequest> | undefined, b: SignalRequest | PlainMessage<SignalRequest> | undefined): boolean {
239
+ return proto3.util.equals(SignalRequest, a, b);
240
+ }
241
+ }
242
+
243
+ /**
244
+ * @generated from message livekit.SignalResponse
245
+ */
246
+ export class SignalResponse extends Message<SignalResponse> {
247
+ /**
248
+ * @generated from oneof livekit.SignalResponse.message
249
+ */
250
+ message: {
251
+ /**
252
+ * sent when join is accepted
253
+ *
254
+ * @generated from field: livekit.JoinResponse join = 1;
255
+ */
256
+ value: JoinResponse;
257
+ case: "join";
258
+ } | {
259
+ /**
260
+ * sent when server answers publisher
261
+ *
262
+ * @generated from field: livekit.SessionDescription answer = 2;
263
+ */
264
+ value: SessionDescription;
265
+ case: "answer";
266
+ } | {
267
+ /**
268
+ * sent when server is sending subscriber an offer
269
+ *
270
+ * @generated from field: livekit.SessionDescription offer = 3;
271
+ */
272
+ value: SessionDescription;
273
+ case: "offer";
274
+ } | {
275
+ /**
276
+ * sent when an ICE candidate is available
277
+ *
278
+ * @generated from field: livekit.TrickleRequest trickle = 4;
279
+ */
280
+ value: TrickleRequest;
281
+ case: "trickle";
282
+ } | {
283
+ /**
284
+ * sent when participants in the room has changed
285
+ *
286
+ * @generated from field: livekit.ParticipantUpdate update = 5;
287
+ */
288
+ value: ParticipantUpdate;
289
+ case: "update";
290
+ } | {
291
+ /**
292
+ * sent to the participant when their track has been published
293
+ *
294
+ * @generated from field: livekit.TrackPublishedResponse track_published = 6;
295
+ */
296
+ value: TrackPublishedResponse;
297
+ case: "trackPublished";
298
+ } | {
299
+ /**
300
+ * Immediately terminate session
301
+ *
302
+ * @generated from field: livekit.LeaveRequest leave = 8;
303
+ */
304
+ value: LeaveRequest;
305
+ case: "leave";
306
+ } | {
307
+ /**
308
+ * server initiated mute
309
+ *
310
+ * @generated from field: livekit.MuteTrackRequest mute = 9;
311
+ */
312
+ value: MuteTrackRequest;
313
+ case: "mute";
314
+ } | {
315
+ /**
316
+ * indicates changes to speaker status, including when they've gone to not speaking
317
+ *
318
+ * @generated from field: livekit.SpeakersChanged speakers_changed = 10;
319
+ */
320
+ value: SpeakersChanged;
321
+ case: "speakersChanged";
322
+ } | {
323
+ /**
324
+ * sent when metadata of the room has changed
325
+ *
326
+ * @generated from field: livekit.RoomUpdate room_update = 11;
327
+ */
328
+ value: RoomUpdate;
329
+ case: "roomUpdate";
330
+ } | {
331
+ /**
332
+ * when connection quality changed
333
+ *
334
+ * @generated from field: livekit.ConnectionQualityUpdate connection_quality = 12;
335
+ */
336
+ value: ConnectionQualityUpdate;
337
+ case: "connectionQuality";
338
+ } | {
339
+ /**
340
+ * when streamed tracks state changed, used to notify when any of the streams were paused due to
341
+ * congestion
342
+ *
343
+ * @generated from field: livekit.StreamStateUpdate stream_state_update = 13;
344
+ */
345
+ value: StreamStateUpdate;
346
+ case: "streamStateUpdate";
347
+ } | {
348
+ /**
349
+ * when max subscribe quality changed, used by dynamic broadcasting to disable unused layers
350
+ *
351
+ * @generated from field: livekit.SubscribedQualityUpdate subscribed_quality_update = 14;
352
+ */
353
+ value: SubscribedQualityUpdate;
354
+ case: "subscribedQualityUpdate";
355
+ } | {
356
+ /**
357
+ * when subscription permission changed
358
+ *
359
+ * @generated from field: livekit.SubscriptionPermissionUpdate subscription_permission_update = 15;
360
+ */
361
+ value: SubscriptionPermissionUpdate;
362
+ case: "subscriptionPermissionUpdate";
363
+ } | {
364
+ /**
365
+ * update the token the client was using, to prevent an active client from using an expired token
366
+ *
367
+ * @generated from field: string refresh_token = 16;
368
+ */
369
+ value: string;
370
+ case: "refreshToken";
371
+ } | {
372
+ /**
373
+ * server initiated track unpublish
374
+ *
375
+ * @generated from field: livekit.TrackUnpublishedResponse track_unpublished = 17;
376
+ */
377
+ value: TrackUnpublishedResponse;
378
+ case: "trackUnpublished";
379
+ } | {
380
+ /**
381
+ * respond to ping
382
+ *
383
+ * deprecated by pong_resp (message Pong)
384
+ *
385
+ * @generated from field: int64 pong = 18;
386
+ */
387
+ value: bigint;
388
+ case: "pong";
389
+ } | {
390
+ /**
391
+ * sent when client reconnects
392
+ *
393
+ * @generated from field: livekit.ReconnectResponse reconnect = 19;
394
+ */
395
+ value: ReconnectResponse;
396
+ case: "reconnect";
397
+ } | {
398
+ /**
399
+ * respond to Ping
400
+ *
401
+ * @generated from field: livekit.Pong pong_resp = 20;
402
+ */
403
+ value: Pong;
404
+ case: "pongResp";
405
+ } | {
406
+ /**
407
+ * Subscription response, client should not expect any media from this subscription if it fails
408
+ *
409
+ * @generated from field: livekit.SubscriptionResponse subscription_response = 21;
410
+ */
411
+ value: SubscriptionResponse;
412
+ case: "subscriptionResponse";
413
+ } | { case: undefined; value?: undefined } = { case: undefined };
414
+
415
+ constructor(data?: PartialMessage<SignalResponse>) {
416
+ super();
417
+ proto3.util.initPartial(data, this);
418
+ }
419
+
420
+ static readonly runtime: typeof proto3 = proto3;
421
+ static readonly typeName = "livekit.SignalResponse";
422
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
423
+ { no: 1, name: "join", kind: "message", T: JoinResponse, oneof: "message" },
424
+ { no: 2, name: "answer", kind: "message", T: SessionDescription, oneof: "message" },
425
+ { no: 3, name: "offer", kind: "message", T: SessionDescription, oneof: "message" },
426
+ { no: 4, name: "trickle", kind: "message", T: TrickleRequest, oneof: "message" },
427
+ { no: 5, name: "update", kind: "message", T: ParticipantUpdate, oneof: "message" },
428
+ { no: 6, name: "track_published", kind: "message", T: TrackPublishedResponse, oneof: "message" },
429
+ { no: 8, name: "leave", kind: "message", T: LeaveRequest, oneof: "message" },
430
+ { no: 9, name: "mute", kind: "message", T: MuteTrackRequest, oneof: "message" },
431
+ { no: 10, name: "speakers_changed", kind: "message", T: SpeakersChanged, oneof: "message" },
432
+ { no: 11, name: "room_update", kind: "message", T: RoomUpdate, oneof: "message" },
433
+ { no: 12, name: "connection_quality", kind: "message", T: ConnectionQualityUpdate, oneof: "message" },
434
+ { no: 13, name: "stream_state_update", kind: "message", T: StreamStateUpdate, oneof: "message" },
435
+ { no: 14, name: "subscribed_quality_update", kind: "message", T: SubscribedQualityUpdate, oneof: "message" },
436
+ { no: 15, name: "subscription_permission_update", kind: "message", T: SubscriptionPermissionUpdate, oneof: "message" },
437
+ { no: 16, name: "refresh_token", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" },
438
+ { no: 17, name: "track_unpublished", kind: "message", T: TrackUnpublishedResponse, oneof: "message" },
439
+ { no: 18, name: "pong", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "message" },
440
+ { no: 19, name: "reconnect", kind: "message", T: ReconnectResponse, oneof: "message" },
441
+ { no: 20, name: "pong_resp", kind: "message", T: Pong, oneof: "message" },
442
+ { no: 21, name: "subscription_response", kind: "message", T: SubscriptionResponse, oneof: "message" },
443
+ ]);
444
+
445
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalResponse {
446
+ return new SignalResponse().fromBinary(bytes, options);
447
+ }
448
+
449
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalResponse {
450
+ return new SignalResponse().fromJson(jsonValue, options);
451
+ }
452
+
453
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalResponse {
454
+ return new SignalResponse().fromJsonString(jsonString, options);
455
+ }
456
+
457
+ static equals(a: SignalResponse | PlainMessage<SignalResponse> | undefined, b: SignalResponse | PlainMessage<SignalResponse> | undefined): boolean {
458
+ return proto3.util.equals(SignalResponse, a, b);
459
+ }
460
+ }
461
+
462
+ /**
463
+ * @generated from message livekit.SimulcastCodec
464
+ */
465
+ export class SimulcastCodec extends Message<SimulcastCodec> {
466
+ /**
467
+ * @generated from field: string codec = 1;
468
+ */
469
+ codec = "";
470
+
471
+ /**
472
+ * @generated from field: string cid = 2;
473
+ */
474
+ cid = "";
475
+
476
+ /**
477
+ * @generated from field: bool enable_simulcast_layers = 3;
478
+ */
479
+ enableSimulcastLayers = false;
480
+
481
+ constructor(data?: PartialMessage<SimulcastCodec>) {
482
+ super();
483
+ proto3.util.initPartial(data, this);
484
+ }
485
+
486
+ static readonly runtime: typeof proto3 = proto3;
487
+ static readonly typeName = "livekit.SimulcastCodec";
488
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
489
+ { no: 1, name: "codec", kind: "scalar", T: 9 /* ScalarType.STRING */ },
490
+ { no: 2, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
491
+ { no: 3, name: "enable_simulcast_layers", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
492
+ ]);
493
+
494
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SimulcastCodec {
495
+ return new SimulcastCodec().fromBinary(bytes, options);
496
+ }
497
+
498
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SimulcastCodec {
499
+ return new SimulcastCodec().fromJson(jsonValue, options);
500
+ }
501
+
502
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SimulcastCodec {
503
+ return new SimulcastCodec().fromJsonString(jsonString, options);
504
+ }
505
+
506
+ static equals(a: SimulcastCodec | PlainMessage<SimulcastCodec> | undefined, b: SimulcastCodec | PlainMessage<SimulcastCodec> | undefined): boolean {
507
+ return proto3.util.equals(SimulcastCodec, a, b);
508
+ }
509
+ }
510
+
511
+ /**
512
+ * @generated from message livekit.AddTrackRequest
513
+ */
514
+ export class AddTrackRequest extends Message<AddTrackRequest> {
515
+ /**
516
+ * client ID of track, to match it when RTC track is received
517
+ *
518
+ * @generated from field: string cid = 1;
519
+ */
520
+ cid = "";
521
+
522
+ /**
523
+ * @generated from field: string name = 2;
524
+ */
525
+ name = "";
526
+
527
+ /**
528
+ * @generated from field: livekit.TrackType type = 3;
529
+ */
530
+ type = TrackType.AUDIO;
531
+
532
+ /**
533
+ * to be deprecated in favor of layers
534
+ *
535
+ * @generated from field: uint32 width = 4;
536
+ */
537
+ width = 0;
538
+
539
+ /**
540
+ * @generated from field: uint32 height = 5;
541
+ */
542
+ height = 0;
543
+
544
+ /**
545
+ * true to add track and initialize to muted
546
+ *
547
+ * @generated from field: bool muted = 6;
548
+ */
549
+ muted = false;
550
+
551
+ /**
552
+ * true if DTX (Discontinuous Transmission) is disabled for audio
553
+ *
554
+ * @generated from field: bool disable_dtx = 7;
555
+ */
556
+ disableDtx = false;
557
+
558
+ /**
559
+ * @generated from field: livekit.TrackSource source = 8;
560
+ */
561
+ source = TrackSource.UNKNOWN;
562
+
563
+ /**
564
+ * @generated from field: repeated livekit.VideoLayer layers = 9;
565
+ */
566
+ layers: VideoLayer[] = [];
567
+
568
+ /**
569
+ * @generated from field: repeated livekit.SimulcastCodec simulcast_codecs = 10;
570
+ */
571
+ simulcastCodecs: SimulcastCodec[] = [];
572
+
573
+ /**
574
+ * server ID of track, publish new codec to exist track
575
+ *
576
+ * @generated from field: string sid = 11;
577
+ */
578
+ sid = "";
579
+
580
+ /**
581
+ * @generated from field: bool stereo = 12;
582
+ */
583
+ stereo = false;
584
+
585
+ /**
586
+ * true if RED (Redundant Encoding) is disabled for audio
587
+ *
588
+ * @generated from field: bool disable_red = 13;
589
+ */
590
+ disableRed = false;
591
+
592
+ /**
593
+ * @generated from field: livekit.Encryption.Type encryption = 14;
594
+ */
595
+ encryption = Encryption_Type.NONE;
596
+
597
+ /**
598
+ * which stream the track belongs to, used to group tracks together.
599
+ * if not specified, server will infer it from track source to bundle camera/microphone, screenshare/audio together
600
+ *
601
+ * @generated from field: string stream = 15;
602
+ */
603
+ stream = "";
604
+
605
+ constructor(data?: PartialMessage<AddTrackRequest>) {
606
+ super();
607
+ proto3.util.initPartial(data, this);
608
+ }
609
+
610
+ static readonly runtime: typeof proto3 = proto3;
611
+ static readonly typeName = "livekit.AddTrackRequest";
612
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
613
+ { no: 1, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
614
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
615
+ { no: 3, name: "type", kind: "enum", T: proto3.getEnumType(TrackType) },
616
+ { no: 4, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
617
+ { no: 5, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
618
+ { no: 6, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
619
+ { no: 7, name: "disable_dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
620
+ { no: 8, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) },
621
+ { no: 9, name: "layers", kind: "message", T: VideoLayer, repeated: true },
622
+ { no: 10, name: "simulcast_codecs", kind: "message", T: SimulcastCodec, repeated: true },
623
+ { no: 11, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
624
+ { no: 12, name: "stereo", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
625
+ { no: 13, name: "disable_red", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
626
+ { no: 14, name: "encryption", kind: "enum", T: proto3.getEnumType(Encryption_Type) },
627
+ { no: 15, name: "stream", kind: "scalar", T: 9 /* ScalarType.STRING */ },
628
+ ]);
629
+
630
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AddTrackRequest {
631
+ return new AddTrackRequest().fromBinary(bytes, options);
632
+ }
633
+
634
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AddTrackRequest {
635
+ return new AddTrackRequest().fromJson(jsonValue, options);
636
+ }
637
+
638
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AddTrackRequest {
639
+ return new AddTrackRequest().fromJsonString(jsonString, options);
640
+ }
641
+
642
+ static equals(a: AddTrackRequest | PlainMessage<AddTrackRequest> | undefined, b: AddTrackRequest | PlainMessage<AddTrackRequest> | undefined): boolean {
643
+ return proto3.util.equals(AddTrackRequest, a, b);
644
+ }
645
+ }
646
+
647
+ /**
648
+ * @generated from message livekit.TrickleRequest
649
+ */
650
+ export class TrickleRequest extends Message<TrickleRequest> {
651
+ /**
652
+ * @generated from field: string candidateInit = 1;
653
+ */
654
+ candidateInit = "";
655
+
656
+ /**
657
+ * @generated from field: livekit.SignalTarget target = 2;
658
+ */
659
+ target = SignalTarget.PUBLISHER;
660
+
661
+ constructor(data?: PartialMessage<TrickleRequest>) {
662
+ super();
663
+ proto3.util.initPartial(data, this);
664
+ }
665
+
666
+ static readonly runtime: typeof proto3 = proto3;
667
+ static readonly typeName = "livekit.TrickleRequest";
668
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
669
+ { no: 1, name: "candidateInit", kind: "scalar", T: 9 /* ScalarType.STRING */ },
670
+ { no: 2, name: "target", kind: "enum", T: proto3.getEnumType(SignalTarget) },
671
+ ]);
672
+
673
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrickleRequest {
674
+ return new TrickleRequest().fromBinary(bytes, options);
675
+ }
676
+
677
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrickleRequest {
678
+ return new TrickleRequest().fromJson(jsonValue, options);
679
+ }
680
+
681
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrickleRequest {
682
+ return new TrickleRequest().fromJsonString(jsonString, options);
683
+ }
684
+
685
+ static equals(a: TrickleRequest | PlainMessage<TrickleRequest> | undefined, b: TrickleRequest | PlainMessage<TrickleRequest> | undefined): boolean {
686
+ return proto3.util.equals(TrickleRequest, a, b);
687
+ }
688
+ }
689
+
690
+ /**
691
+ * @generated from message livekit.MuteTrackRequest
692
+ */
693
+ export class MuteTrackRequest extends Message<MuteTrackRequest> {
694
+ /**
695
+ * @generated from field: string sid = 1;
696
+ */
697
+ sid = "";
698
+
699
+ /**
700
+ * @generated from field: bool muted = 2;
701
+ */
702
+ muted = false;
703
+
704
+ constructor(data?: PartialMessage<MuteTrackRequest>) {
705
+ super();
706
+ proto3.util.initPartial(data, this);
707
+ }
708
+
709
+ static readonly runtime: typeof proto3 = proto3;
710
+ static readonly typeName = "livekit.MuteTrackRequest";
711
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
712
+ { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
713
+ { no: 2, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
714
+ ]);
715
+
716
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MuteTrackRequest {
717
+ return new MuteTrackRequest().fromBinary(bytes, options);
718
+ }
719
+
720
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MuteTrackRequest {
721
+ return new MuteTrackRequest().fromJson(jsonValue, options);
722
+ }
723
+
724
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MuteTrackRequest {
725
+ return new MuteTrackRequest().fromJsonString(jsonString, options);
726
+ }
727
+
728
+ static equals(a: MuteTrackRequest | PlainMessage<MuteTrackRequest> | undefined, b: MuteTrackRequest | PlainMessage<MuteTrackRequest> | undefined): boolean {
729
+ return proto3.util.equals(MuteTrackRequest, a, b);
730
+ }
731
+ }
732
+
733
+ /**
734
+ * @generated from message livekit.JoinResponse
735
+ */
736
+ export class JoinResponse extends Message<JoinResponse> {
737
+ /**
738
+ * @generated from field: livekit.Room room = 1;
739
+ */
740
+ room?: Room;
741
+
742
+ /**
743
+ * @generated from field: livekit.ParticipantInfo participant = 2;
744
+ */
745
+ participant?: ParticipantInfo;
746
+
747
+ /**
748
+ * @generated from field: repeated livekit.ParticipantInfo other_participants = 3;
749
+ */
750
+ otherParticipants: ParticipantInfo[] = [];
751
+
752
+ /**
753
+ * deprecated. use server_info.version instead.
754
+ *
755
+ * @generated from field: string server_version = 4;
756
+ */
757
+ serverVersion = "";
758
+
759
+ /**
760
+ * @generated from field: repeated livekit.ICEServer ice_servers = 5;
761
+ */
762
+ iceServers: ICEServer[] = [];
763
+
764
+ /**
765
+ * use subscriber as the primary PeerConnection
766
+ *
767
+ * @generated from field: bool subscriber_primary = 6;
768
+ */
769
+ subscriberPrimary = false;
770
+
771
+ /**
772
+ * when the current server isn't available, return alternate url to retry connection
773
+ * when this is set, the other fields will be largely empty
774
+ *
775
+ * @generated from field: string alternative_url = 7;
776
+ */
777
+ alternativeUrl = "";
778
+
779
+ /**
780
+ * @generated from field: livekit.ClientConfiguration client_configuration = 8;
781
+ */
782
+ clientConfiguration?: ClientConfiguration;
783
+
784
+ /**
785
+ * deprecated. use server_info.region instead.
786
+ *
787
+ * @generated from field: string server_region = 9;
788
+ */
789
+ serverRegion = "";
790
+
791
+ /**
792
+ * @generated from field: int32 ping_timeout = 10;
793
+ */
794
+ pingTimeout = 0;
795
+
796
+ /**
797
+ * @generated from field: int32 ping_interval = 11;
798
+ */
799
+ pingInterval = 0;
800
+
801
+ /**
802
+ * @generated from field: livekit.ServerInfo server_info = 12;
803
+ */
804
+ serverInfo?: ServerInfo;
805
+
806
+ /**
807
+ * Server-Injected-Frame byte trailer, used to identify unencrypted frames when e2ee is enabled
808
+ *
809
+ * @generated from field: bytes sif_trailer = 13;
810
+ */
811
+ sifTrailer = new Uint8Array(0);
812
+
813
+ constructor(data?: PartialMessage<JoinResponse>) {
814
+ super();
815
+ proto3.util.initPartial(data, this);
816
+ }
817
+
818
+ static readonly runtime: typeof proto3 = proto3;
819
+ static readonly typeName = "livekit.JoinResponse";
820
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
821
+ { no: 1, name: "room", kind: "message", T: Room },
822
+ { no: 2, name: "participant", kind: "message", T: ParticipantInfo },
823
+ { no: 3, name: "other_participants", kind: "message", T: ParticipantInfo, repeated: true },
824
+ { no: 4, name: "server_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
825
+ { no: 5, name: "ice_servers", kind: "message", T: ICEServer, repeated: true },
826
+ { no: 6, name: "subscriber_primary", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
827
+ { no: 7, name: "alternative_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
828
+ { no: 8, name: "client_configuration", kind: "message", T: ClientConfiguration },
829
+ { no: 9, name: "server_region", kind: "scalar", T: 9 /* ScalarType.STRING */ },
830
+ { no: 10, name: "ping_timeout", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
831
+ { no: 11, name: "ping_interval", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
832
+ { no: 12, name: "server_info", kind: "message", T: ServerInfo },
833
+ { no: 13, name: "sif_trailer", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
834
+ ]);
835
+
836
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JoinResponse {
837
+ return new JoinResponse().fromBinary(bytes, options);
838
+ }
839
+
840
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JoinResponse {
841
+ return new JoinResponse().fromJson(jsonValue, options);
842
+ }
843
+
844
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JoinResponse {
845
+ return new JoinResponse().fromJsonString(jsonString, options);
846
+ }
847
+
848
+ static equals(a: JoinResponse | PlainMessage<JoinResponse> | undefined, b: JoinResponse | PlainMessage<JoinResponse> | undefined): boolean {
849
+ return proto3.util.equals(JoinResponse, a, b);
850
+ }
851
+ }
852
+
853
+ /**
854
+ * @generated from message livekit.ReconnectResponse
855
+ */
856
+ export class ReconnectResponse extends Message<ReconnectResponse> {
857
+ /**
858
+ * @generated from field: repeated livekit.ICEServer ice_servers = 1;
859
+ */
860
+ iceServers: ICEServer[] = [];
861
+
862
+ /**
863
+ * @generated from field: livekit.ClientConfiguration client_configuration = 2;
864
+ */
865
+ clientConfiguration?: ClientConfiguration;
866
+
867
+ constructor(data?: PartialMessage<ReconnectResponse>) {
868
+ super();
869
+ proto3.util.initPartial(data, this);
870
+ }
871
+
872
+ static readonly runtime: typeof proto3 = proto3;
873
+ static readonly typeName = "livekit.ReconnectResponse";
874
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
875
+ { no: 1, name: "ice_servers", kind: "message", T: ICEServer, repeated: true },
876
+ { no: 2, name: "client_configuration", kind: "message", T: ClientConfiguration },
877
+ ]);
878
+
879
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReconnectResponse {
880
+ return new ReconnectResponse().fromBinary(bytes, options);
881
+ }
882
+
883
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReconnectResponse {
884
+ return new ReconnectResponse().fromJson(jsonValue, options);
885
+ }
886
+
887
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReconnectResponse {
888
+ return new ReconnectResponse().fromJsonString(jsonString, options);
889
+ }
890
+
891
+ static equals(a: ReconnectResponse | PlainMessage<ReconnectResponse> | undefined, b: ReconnectResponse | PlainMessage<ReconnectResponse> | undefined): boolean {
892
+ return proto3.util.equals(ReconnectResponse, a, b);
893
+ }
894
+ }
895
+
896
+ /**
897
+ * @generated from message livekit.TrackPublishedResponse
898
+ */
899
+ export class TrackPublishedResponse extends Message<TrackPublishedResponse> {
900
+ /**
901
+ * @generated from field: string cid = 1;
902
+ */
903
+ cid = "";
904
+
905
+ /**
906
+ * @generated from field: livekit.TrackInfo track = 2;
907
+ */
908
+ track?: TrackInfo;
909
+
910
+ constructor(data?: PartialMessage<TrackPublishedResponse>) {
911
+ super();
912
+ proto3.util.initPartial(data, this);
913
+ }
914
+
915
+ static readonly runtime: typeof proto3 = proto3;
916
+ static readonly typeName = "livekit.TrackPublishedResponse";
917
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
918
+ { no: 1, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
919
+ { no: 2, name: "track", kind: "message", T: TrackInfo },
920
+ ]);
921
+
922
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublishedResponse {
923
+ return new TrackPublishedResponse().fromBinary(bytes, options);
924
+ }
925
+
926
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublishedResponse {
927
+ return new TrackPublishedResponse().fromJson(jsonValue, options);
928
+ }
929
+
930
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublishedResponse {
931
+ return new TrackPublishedResponse().fromJsonString(jsonString, options);
932
+ }
933
+
934
+ static equals(a: TrackPublishedResponse | PlainMessage<TrackPublishedResponse> | undefined, b: TrackPublishedResponse | PlainMessage<TrackPublishedResponse> | undefined): boolean {
935
+ return proto3.util.equals(TrackPublishedResponse, a, b);
936
+ }
937
+ }
938
+
939
+ /**
940
+ * @generated from message livekit.TrackUnpublishedResponse
941
+ */
942
+ export class TrackUnpublishedResponse extends Message<TrackUnpublishedResponse> {
943
+ /**
944
+ * @generated from field: string track_sid = 1;
945
+ */
946
+ trackSid = "";
947
+
948
+ constructor(data?: PartialMessage<TrackUnpublishedResponse>) {
949
+ super();
950
+ proto3.util.initPartial(data, this);
951
+ }
952
+
953
+ static readonly runtime: typeof proto3 = proto3;
954
+ static readonly typeName = "livekit.TrackUnpublishedResponse";
955
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
956
+ { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
957
+ ]);
958
+
959
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackUnpublishedResponse {
960
+ return new TrackUnpublishedResponse().fromBinary(bytes, options);
961
+ }
962
+
963
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackUnpublishedResponse {
964
+ return new TrackUnpublishedResponse().fromJson(jsonValue, options);
965
+ }
966
+
967
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackUnpublishedResponse {
968
+ return new TrackUnpublishedResponse().fromJsonString(jsonString, options);
969
+ }
970
+
971
+ static equals(a: TrackUnpublishedResponse | PlainMessage<TrackUnpublishedResponse> | undefined, b: TrackUnpublishedResponse | PlainMessage<TrackUnpublishedResponse> | undefined): boolean {
972
+ return proto3.util.equals(TrackUnpublishedResponse, a, b);
973
+ }
974
+ }
975
+
976
+ /**
977
+ * @generated from message livekit.SessionDescription
978
+ */
979
+ export class SessionDescription extends Message<SessionDescription> {
980
+ /**
981
+ * "answer" | "offer" | "pranswer" | "rollback"
982
+ *
983
+ * @generated from field: string type = 1;
984
+ */
985
+ type = "";
986
+
987
+ /**
988
+ * @generated from field: string sdp = 2;
989
+ */
990
+ sdp = "";
991
+
992
+ constructor(data?: PartialMessage<SessionDescription>) {
993
+ super();
994
+ proto3.util.initPartial(data, this);
995
+ }
996
+
997
+ static readonly runtime: typeof proto3 = proto3;
998
+ static readonly typeName = "livekit.SessionDescription";
999
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1000
+ { no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1001
+ { no: 2, name: "sdp", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1002
+ ]);
1003
+
1004
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SessionDescription {
1005
+ return new SessionDescription().fromBinary(bytes, options);
1006
+ }
1007
+
1008
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SessionDescription {
1009
+ return new SessionDescription().fromJson(jsonValue, options);
1010
+ }
1011
+
1012
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SessionDescription {
1013
+ return new SessionDescription().fromJsonString(jsonString, options);
1014
+ }
1015
+
1016
+ static equals(a: SessionDescription | PlainMessage<SessionDescription> | undefined, b: SessionDescription | PlainMessage<SessionDescription> | undefined): boolean {
1017
+ return proto3.util.equals(SessionDescription, a, b);
1018
+ }
1019
+ }
1020
+
1021
+ /**
1022
+ * @generated from message livekit.ParticipantUpdate
1023
+ */
1024
+ export class ParticipantUpdate extends Message<ParticipantUpdate> {
1025
+ /**
1026
+ * @generated from field: repeated livekit.ParticipantInfo participants = 1;
1027
+ */
1028
+ participants: ParticipantInfo[] = [];
1029
+
1030
+ constructor(data?: PartialMessage<ParticipantUpdate>) {
1031
+ super();
1032
+ proto3.util.initPartial(data, this);
1033
+ }
1034
+
1035
+ static readonly runtime: typeof proto3 = proto3;
1036
+ static readonly typeName = "livekit.ParticipantUpdate";
1037
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1038
+ { no: 1, name: "participants", kind: "message", T: ParticipantInfo, repeated: true },
1039
+ ]);
1040
+
1041
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantUpdate {
1042
+ return new ParticipantUpdate().fromBinary(bytes, options);
1043
+ }
1044
+
1045
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantUpdate {
1046
+ return new ParticipantUpdate().fromJson(jsonValue, options);
1047
+ }
1048
+
1049
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantUpdate {
1050
+ return new ParticipantUpdate().fromJsonString(jsonString, options);
1051
+ }
1052
+
1053
+ static equals(a: ParticipantUpdate | PlainMessage<ParticipantUpdate> | undefined, b: ParticipantUpdate | PlainMessage<ParticipantUpdate> | undefined): boolean {
1054
+ return proto3.util.equals(ParticipantUpdate, a, b);
1055
+ }
1056
+ }
1057
+
1058
+ /**
1059
+ * @generated from message livekit.UpdateSubscription
1060
+ */
1061
+ export class UpdateSubscription extends Message<UpdateSubscription> {
1062
+ /**
1063
+ * @generated from field: repeated string track_sids = 1;
1064
+ */
1065
+ trackSids: string[] = [];
1066
+
1067
+ /**
1068
+ * @generated from field: bool subscribe = 2;
1069
+ */
1070
+ subscribe = false;
1071
+
1072
+ /**
1073
+ * @generated from field: repeated livekit.ParticipantTracks participant_tracks = 3;
1074
+ */
1075
+ participantTracks: ParticipantTracks[] = [];
1076
+
1077
+ constructor(data?: PartialMessage<UpdateSubscription>) {
1078
+ super();
1079
+ proto3.util.initPartial(data, this);
1080
+ }
1081
+
1082
+ static readonly runtime: typeof proto3 = proto3;
1083
+ static readonly typeName = "livekit.UpdateSubscription";
1084
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1085
+ { no: 1, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1086
+ { no: 2, name: "subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1087
+ { no: 3, name: "participant_tracks", kind: "message", T: ParticipantTracks, repeated: true },
1088
+ ]);
1089
+
1090
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateSubscription {
1091
+ return new UpdateSubscription().fromBinary(bytes, options);
1092
+ }
1093
+
1094
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateSubscription {
1095
+ return new UpdateSubscription().fromJson(jsonValue, options);
1096
+ }
1097
+
1098
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateSubscription {
1099
+ return new UpdateSubscription().fromJsonString(jsonString, options);
1100
+ }
1101
+
1102
+ static equals(a: UpdateSubscription | PlainMessage<UpdateSubscription> | undefined, b: UpdateSubscription | PlainMessage<UpdateSubscription> | undefined): boolean {
1103
+ return proto3.util.equals(UpdateSubscription, a, b);
1104
+ }
1105
+ }
1106
+
1107
+ /**
1108
+ * @generated from message livekit.UpdateTrackSettings
1109
+ */
1110
+ export class UpdateTrackSettings extends Message<UpdateTrackSettings> {
1111
+ /**
1112
+ * @generated from field: repeated string track_sids = 1;
1113
+ */
1114
+ trackSids: string[] = [];
1115
+
1116
+ /**
1117
+ * when true, the track is placed in a paused state, with no new data returned
1118
+ *
1119
+ * @generated from field: bool disabled = 3;
1120
+ */
1121
+ disabled = false;
1122
+
1123
+ /**
1124
+ * deprecated in favor of width & height
1125
+ *
1126
+ * @generated from field: livekit.VideoQuality quality = 4;
1127
+ */
1128
+ quality = VideoQuality.LOW;
1129
+
1130
+ /**
1131
+ * for video, width to receive
1132
+ *
1133
+ * @generated from field: uint32 width = 5;
1134
+ */
1135
+ width = 0;
1136
+
1137
+ /**
1138
+ * for video, height to receive
1139
+ *
1140
+ * @generated from field: uint32 height = 6;
1141
+ */
1142
+ height = 0;
1143
+
1144
+ /**
1145
+ * @generated from field: uint32 fps = 7;
1146
+ */
1147
+ fps = 0;
1148
+
1149
+ /**
1150
+ * subscription priority. 1 being the highest (0 is unset)
1151
+ * when unset, server sill assign priority based on the order of subscription
1152
+ * server will use priority in the following ways:
1153
+ * 1. when subscribed tracks exceed per-participant subscription limit, server will
1154
+ * pause the lowest priority tracks
1155
+ * 2. when the network is congested, server will assign available bandwidth to
1156
+ * higher priority tracks first. lowest priority tracks can be paused
1157
+ *
1158
+ * @generated from field: uint32 priority = 8;
1159
+ */
1160
+ priority = 0;
1161
+
1162
+ constructor(data?: PartialMessage<UpdateTrackSettings>) {
1163
+ super();
1164
+ proto3.util.initPartial(data, this);
1165
+ }
1166
+
1167
+ static readonly runtime: typeof proto3 = proto3;
1168
+ static readonly typeName = "livekit.UpdateTrackSettings";
1169
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1170
+ { no: 1, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1171
+ { no: 3, name: "disabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1172
+ { no: 4, name: "quality", kind: "enum", T: proto3.getEnumType(VideoQuality) },
1173
+ { no: 5, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1174
+ { no: 6, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1175
+ { no: 7, name: "fps", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1176
+ { no: 8, name: "priority", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1177
+ ]);
1178
+
1179
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateTrackSettings {
1180
+ return new UpdateTrackSettings().fromBinary(bytes, options);
1181
+ }
1182
+
1183
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateTrackSettings {
1184
+ return new UpdateTrackSettings().fromJson(jsonValue, options);
1185
+ }
1186
+
1187
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateTrackSettings {
1188
+ return new UpdateTrackSettings().fromJsonString(jsonString, options);
1189
+ }
1190
+
1191
+ static equals(a: UpdateTrackSettings | PlainMessage<UpdateTrackSettings> | undefined, b: UpdateTrackSettings | PlainMessage<UpdateTrackSettings> | undefined): boolean {
1192
+ return proto3.util.equals(UpdateTrackSettings, a, b);
1193
+ }
1194
+ }
1195
+
1196
+ /**
1197
+ * @generated from message livekit.LeaveRequest
1198
+ */
1199
+ export class LeaveRequest extends Message<LeaveRequest> {
1200
+ /**
1201
+ * sent when server initiates the disconnect due to server-restart
1202
+ * indicates clients should attempt full-reconnect sequence
1203
+ *
1204
+ * @generated from field: bool can_reconnect = 1;
1205
+ */
1206
+ canReconnect = false;
1207
+
1208
+ /**
1209
+ * @generated from field: livekit.DisconnectReason reason = 2;
1210
+ */
1211
+ reason = DisconnectReason.UNKNOWN_REASON;
1212
+
1213
+ constructor(data?: PartialMessage<LeaveRequest>) {
1214
+ super();
1215
+ proto3.util.initPartial(data, this);
1216
+ }
1217
+
1218
+ static readonly runtime: typeof proto3 = proto3;
1219
+ static readonly typeName = "livekit.LeaveRequest";
1220
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1221
+ { no: 1, name: "can_reconnect", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1222
+ { no: 2, name: "reason", kind: "enum", T: proto3.getEnumType(DisconnectReason) },
1223
+ ]);
1224
+
1225
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LeaveRequest {
1226
+ return new LeaveRequest().fromBinary(bytes, options);
1227
+ }
1228
+
1229
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LeaveRequest {
1230
+ return new LeaveRequest().fromJson(jsonValue, options);
1231
+ }
1232
+
1233
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LeaveRequest {
1234
+ return new LeaveRequest().fromJsonString(jsonString, options);
1235
+ }
1236
+
1237
+ static equals(a: LeaveRequest | PlainMessage<LeaveRequest> | undefined, b: LeaveRequest | PlainMessage<LeaveRequest> | undefined): boolean {
1238
+ return proto3.util.equals(LeaveRequest, a, b);
1239
+ }
1240
+ }
1241
+
1242
+ /**
1243
+ * message to indicate published video track dimensions are changing
1244
+ *
1245
+ * @generated from message livekit.UpdateVideoLayers
1246
+ */
1247
+ export class UpdateVideoLayers extends Message<UpdateVideoLayers> {
1248
+ /**
1249
+ * @generated from field: string track_sid = 1;
1250
+ */
1251
+ trackSid = "";
1252
+
1253
+ /**
1254
+ * @generated from field: repeated livekit.VideoLayer layers = 2;
1255
+ */
1256
+ layers: VideoLayer[] = [];
1257
+
1258
+ constructor(data?: PartialMessage<UpdateVideoLayers>) {
1259
+ super();
1260
+ proto3.util.initPartial(data, this);
1261
+ }
1262
+
1263
+ static readonly runtime: typeof proto3 = proto3;
1264
+ static readonly typeName = "livekit.UpdateVideoLayers";
1265
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1266
+ { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1267
+ { no: 2, name: "layers", kind: "message", T: VideoLayer, repeated: true },
1268
+ ]);
1269
+
1270
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateVideoLayers {
1271
+ return new UpdateVideoLayers().fromBinary(bytes, options);
1272
+ }
1273
+
1274
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateVideoLayers {
1275
+ return new UpdateVideoLayers().fromJson(jsonValue, options);
1276
+ }
1277
+
1278
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateVideoLayers {
1279
+ return new UpdateVideoLayers().fromJsonString(jsonString, options);
1280
+ }
1281
+
1282
+ static equals(a: UpdateVideoLayers | PlainMessage<UpdateVideoLayers> | undefined, b: UpdateVideoLayers | PlainMessage<UpdateVideoLayers> | undefined): boolean {
1283
+ return proto3.util.equals(UpdateVideoLayers, a, b);
1284
+ }
1285
+ }
1286
+
1287
+ /**
1288
+ * @generated from message livekit.UpdateParticipantMetadata
1289
+ */
1290
+ export class UpdateParticipantMetadata extends Message<UpdateParticipantMetadata> {
1291
+ /**
1292
+ * @generated from field: string metadata = 1;
1293
+ */
1294
+ metadata = "";
1295
+
1296
+ /**
1297
+ * @generated from field: string name = 2;
1298
+ */
1299
+ name = "";
1300
+
1301
+ constructor(data?: PartialMessage<UpdateParticipantMetadata>) {
1302
+ super();
1303
+ proto3.util.initPartial(data, this);
1304
+ }
1305
+
1306
+ static readonly runtime: typeof proto3 = proto3;
1307
+ static readonly typeName = "livekit.UpdateParticipantMetadata";
1308
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1309
+ { no: 1, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1310
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1311
+ ]);
1312
+
1313
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateParticipantMetadata {
1314
+ return new UpdateParticipantMetadata().fromBinary(bytes, options);
1315
+ }
1316
+
1317
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateParticipantMetadata {
1318
+ return new UpdateParticipantMetadata().fromJson(jsonValue, options);
1319
+ }
1320
+
1321
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateParticipantMetadata {
1322
+ return new UpdateParticipantMetadata().fromJsonString(jsonString, options);
1323
+ }
1324
+
1325
+ static equals(a: UpdateParticipantMetadata | PlainMessage<UpdateParticipantMetadata> | undefined, b: UpdateParticipantMetadata | PlainMessage<UpdateParticipantMetadata> | undefined): boolean {
1326
+ return proto3.util.equals(UpdateParticipantMetadata, a, b);
1327
+ }
1328
+ }
1329
+
1330
+ /**
1331
+ * @generated from message livekit.ICEServer
1332
+ */
1333
+ export class ICEServer extends Message<ICEServer> {
1334
+ /**
1335
+ * @generated from field: repeated string urls = 1;
1336
+ */
1337
+ urls: string[] = [];
1338
+
1339
+ /**
1340
+ * @generated from field: string username = 2;
1341
+ */
1342
+ username = "";
1343
+
1344
+ /**
1345
+ * @generated from field: string credential = 3;
1346
+ */
1347
+ credential = "";
1348
+
1349
+ constructor(data?: PartialMessage<ICEServer>) {
1350
+ super();
1351
+ proto3.util.initPartial(data, this);
1352
+ }
1353
+
1354
+ static readonly runtime: typeof proto3 = proto3;
1355
+ static readonly typeName = "livekit.ICEServer";
1356
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1357
+ { no: 1, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1358
+ { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1359
+ { no: 3, name: "credential", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1360
+ ]);
1361
+
1362
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ICEServer {
1363
+ return new ICEServer().fromBinary(bytes, options);
1364
+ }
1365
+
1366
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ICEServer {
1367
+ return new ICEServer().fromJson(jsonValue, options);
1368
+ }
1369
+
1370
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ICEServer {
1371
+ return new ICEServer().fromJsonString(jsonString, options);
1372
+ }
1373
+
1374
+ static equals(a: ICEServer | PlainMessage<ICEServer> | undefined, b: ICEServer | PlainMessage<ICEServer> | undefined): boolean {
1375
+ return proto3.util.equals(ICEServer, a, b);
1376
+ }
1377
+ }
1378
+
1379
+ /**
1380
+ * @generated from message livekit.SpeakersChanged
1381
+ */
1382
+ export class SpeakersChanged extends Message<SpeakersChanged> {
1383
+ /**
1384
+ * @generated from field: repeated livekit.SpeakerInfo speakers = 1;
1385
+ */
1386
+ speakers: SpeakerInfo[] = [];
1387
+
1388
+ constructor(data?: PartialMessage<SpeakersChanged>) {
1389
+ super();
1390
+ proto3.util.initPartial(data, this);
1391
+ }
1392
+
1393
+ static readonly runtime: typeof proto3 = proto3;
1394
+ static readonly typeName = "livekit.SpeakersChanged";
1395
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1396
+ { no: 1, name: "speakers", kind: "message", T: SpeakerInfo, repeated: true },
1397
+ ]);
1398
+
1399
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SpeakersChanged {
1400
+ return new SpeakersChanged().fromBinary(bytes, options);
1401
+ }
1402
+
1403
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SpeakersChanged {
1404
+ return new SpeakersChanged().fromJson(jsonValue, options);
1405
+ }
1406
+
1407
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SpeakersChanged {
1408
+ return new SpeakersChanged().fromJsonString(jsonString, options);
1409
+ }
1410
+
1411
+ static equals(a: SpeakersChanged | PlainMessage<SpeakersChanged> | undefined, b: SpeakersChanged | PlainMessage<SpeakersChanged> | undefined): boolean {
1412
+ return proto3.util.equals(SpeakersChanged, a, b);
1413
+ }
1414
+ }
1415
+
1416
+ /**
1417
+ * @generated from message livekit.RoomUpdate
1418
+ */
1419
+ export class RoomUpdate extends Message<RoomUpdate> {
1420
+ /**
1421
+ * @generated from field: livekit.Room room = 1;
1422
+ */
1423
+ room?: Room;
1424
+
1425
+ constructor(data?: PartialMessage<RoomUpdate>) {
1426
+ super();
1427
+ proto3.util.initPartial(data, this);
1428
+ }
1429
+
1430
+ static readonly runtime: typeof proto3 = proto3;
1431
+ static readonly typeName = "livekit.RoomUpdate";
1432
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1433
+ { no: 1, name: "room", kind: "message", T: Room },
1434
+ ]);
1435
+
1436
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomUpdate {
1437
+ return new RoomUpdate().fromBinary(bytes, options);
1438
+ }
1439
+
1440
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RoomUpdate {
1441
+ return new RoomUpdate().fromJson(jsonValue, options);
1442
+ }
1443
+
1444
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RoomUpdate {
1445
+ return new RoomUpdate().fromJsonString(jsonString, options);
1446
+ }
1447
+
1448
+ static equals(a: RoomUpdate | PlainMessage<RoomUpdate> | undefined, b: RoomUpdate | PlainMessage<RoomUpdate> | undefined): boolean {
1449
+ return proto3.util.equals(RoomUpdate, a, b);
1450
+ }
1451
+ }
1452
+
1453
+ /**
1454
+ * @generated from message livekit.ConnectionQualityInfo
1455
+ */
1456
+ export class ConnectionQualityInfo extends Message<ConnectionQualityInfo> {
1457
+ /**
1458
+ * @generated from field: string participant_sid = 1;
1459
+ */
1460
+ participantSid = "";
1461
+
1462
+ /**
1463
+ * @generated from field: livekit.ConnectionQuality quality = 2;
1464
+ */
1465
+ quality = ConnectionQuality.POOR;
1466
+
1467
+ /**
1468
+ * @generated from field: float score = 3;
1469
+ */
1470
+ score = 0;
1471
+
1472
+ constructor(data?: PartialMessage<ConnectionQualityInfo>) {
1473
+ super();
1474
+ proto3.util.initPartial(data, this);
1475
+ }
1476
+
1477
+ static readonly runtime: typeof proto3 = proto3;
1478
+ static readonly typeName = "livekit.ConnectionQualityInfo";
1479
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1480
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1481
+ { no: 2, name: "quality", kind: "enum", T: proto3.getEnumType(ConnectionQuality) },
1482
+ { no: 3, name: "score", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
1483
+ ]);
1484
+
1485
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionQualityInfo {
1486
+ return new ConnectionQualityInfo().fromBinary(bytes, options);
1487
+ }
1488
+
1489
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectionQualityInfo {
1490
+ return new ConnectionQualityInfo().fromJson(jsonValue, options);
1491
+ }
1492
+
1493
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectionQualityInfo {
1494
+ return new ConnectionQualityInfo().fromJsonString(jsonString, options);
1495
+ }
1496
+
1497
+ static equals(a: ConnectionQualityInfo | PlainMessage<ConnectionQualityInfo> | undefined, b: ConnectionQualityInfo | PlainMessage<ConnectionQualityInfo> | undefined): boolean {
1498
+ return proto3.util.equals(ConnectionQualityInfo, a, b);
1499
+ }
1500
+ }
1501
+
1502
+ /**
1503
+ * @generated from message livekit.ConnectionQualityUpdate
1504
+ */
1505
+ export class ConnectionQualityUpdate extends Message<ConnectionQualityUpdate> {
1506
+ /**
1507
+ * @generated from field: repeated livekit.ConnectionQualityInfo updates = 1;
1508
+ */
1509
+ updates: ConnectionQualityInfo[] = [];
1510
+
1511
+ constructor(data?: PartialMessage<ConnectionQualityUpdate>) {
1512
+ super();
1513
+ proto3.util.initPartial(data, this);
1514
+ }
1515
+
1516
+ static readonly runtime: typeof proto3 = proto3;
1517
+ static readonly typeName = "livekit.ConnectionQualityUpdate";
1518
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1519
+ { no: 1, name: "updates", kind: "message", T: ConnectionQualityInfo, repeated: true },
1520
+ ]);
1521
+
1522
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionQualityUpdate {
1523
+ return new ConnectionQualityUpdate().fromBinary(bytes, options);
1524
+ }
1525
+
1526
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectionQualityUpdate {
1527
+ return new ConnectionQualityUpdate().fromJson(jsonValue, options);
1528
+ }
1529
+
1530
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectionQualityUpdate {
1531
+ return new ConnectionQualityUpdate().fromJsonString(jsonString, options);
1532
+ }
1533
+
1534
+ static equals(a: ConnectionQualityUpdate | PlainMessage<ConnectionQualityUpdate> | undefined, b: ConnectionQualityUpdate | PlainMessage<ConnectionQualityUpdate> | undefined): boolean {
1535
+ return proto3.util.equals(ConnectionQualityUpdate, a, b);
1536
+ }
1537
+ }
1538
+
1539
+ /**
1540
+ * @generated from message livekit.StreamStateInfo
1541
+ */
1542
+ export class StreamStateInfo extends Message<StreamStateInfo> {
1543
+ /**
1544
+ * @generated from field: string participant_sid = 1;
1545
+ */
1546
+ participantSid = "";
1547
+
1548
+ /**
1549
+ * @generated from field: string track_sid = 2;
1550
+ */
1551
+ trackSid = "";
1552
+
1553
+ /**
1554
+ * @generated from field: livekit.StreamState state = 3;
1555
+ */
1556
+ state = StreamState.ACTIVE;
1557
+
1558
+ constructor(data?: PartialMessage<StreamStateInfo>) {
1559
+ super();
1560
+ proto3.util.initPartial(data, this);
1561
+ }
1562
+
1563
+ static readonly runtime: typeof proto3 = proto3;
1564
+ static readonly typeName = "livekit.StreamStateInfo";
1565
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1566
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1567
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1568
+ { no: 3, name: "state", kind: "enum", T: proto3.getEnumType(StreamState) },
1569
+ ]);
1570
+
1571
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamStateInfo {
1572
+ return new StreamStateInfo().fromBinary(bytes, options);
1573
+ }
1574
+
1575
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamStateInfo {
1576
+ return new StreamStateInfo().fromJson(jsonValue, options);
1577
+ }
1578
+
1579
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamStateInfo {
1580
+ return new StreamStateInfo().fromJsonString(jsonString, options);
1581
+ }
1582
+
1583
+ static equals(a: StreamStateInfo | PlainMessage<StreamStateInfo> | undefined, b: StreamStateInfo | PlainMessage<StreamStateInfo> | undefined): boolean {
1584
+ return proto3.util.equals(StreamStateInfo, a, b);
1585
+ }
1586
+ }
1587
+
1588
+ /**
1589
+ * @generated from message livekit.StreamStateUpdate
1590
+ */
1591
+ export class StreamStateUpdate extends Message<StreamStateUpdate> {
1592
+ /**
1593
+ * @generated from field: repeated livekit.StreamStateInfo stream_states = 1;
1594
+ */
1595
+ streamStates: StreamStateInfo[] = [];
1596
+
1597
+ constructor(data?: PartialMessage<StreamStateUpdate>) {
1598
+ super();
1599
+ proto3.util.initPartial(data, this);
1600
+ }
1601
+
1602
+ static readonly runtime: typeof proto3 = proto3;
1603
+ static readonly typeName = "livekit.StreamStateUpdate";
1604
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1605
+ { no: 1, name: "stream_states", kind: "message", T: StreamStateInfo, repeated: true },
1606
+ ]);
1607
+
1608
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamStateUpdate {
1609
+ return new StreamStateUpdate().fromBinary(bytes, options);
1610
+ }
1611
+
1612
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamStateUpdate {
1613
+ return new StreamStateUpdate().fromJson(jsonValue, options);
1614
+ }
1615
+
1616
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamStateUpdate {
1617
+ return new StreamStateUpdate().fromJsonString(jsonString, options);
1618
+ }
1619
+
1620
+ static equals(a: StreamStateUpdate | PlainMessage<StreamStateUpdate> | undefined, b: StreamStateUpdate | PlainMessage<StreamStateUpdate> | undefined): boolean {
1621
+ return proto3.util.equals(StreamStateUpdate, a, b);
1622
+ }
1623
+ }
1624
+
1625
+ /**
1626
+ * @generated from message livekit.SubscribedQuality
1627
+ */
1628
+ export class SubscribedQuality extends Message<SubscribedQuality> {
1629
+ /**
1630
+ * @generated from field: livekit.VideoQuality quality = 1;
1631
+ */
1632
+ quality = VideoQuality.LOW;
1633
+
1634
+ /**
1635
+ * @generated from field: bool enabled = 2;
1636
+ */
1637
+ enabled = false;
1638
+
1639
+ constructor(data?: PartialMessage<SubscribedQuality>) {
1640
+ super();
1641
+ proto3.util.initPartial(data, this);
1642
+ }
1643
+
1644
+ static readonly runtime: typeof proto3 = proto3;
1645
+ static readonly typeName = "livekit.SubscribedQuality";
1646
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1647
+ { no: 1, name: "quality", kind: "enum", T: proto3.getEnumType(VideoQuality) },
1648
+ { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1649
+ ]);
1650
+
1651
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SubscribedQuality {
1652
+ return new SubscribedQuality().fromBinary(bytes, options);
1653
+ }
1654
+
1655
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SubscribedQuality {
1656
+ return new SubscribedQuality().fromJson(jsonValue, options);
1657
+ }
1658
+
1659
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SubscribedQuality {
1660
+ return new SubscribedQuality().fromJsonString(jsonString, options);
1661
+ }
1662
+
1663
+ static equals(a: SubscribedQuality | PlainMessage<SubscribedQuality> | undefined, b: SubscribedQuality | PlainMessage<SubscribedQuality> | undefined): boolean {
1664
+ return proto3.util.equals(SubscribedQuality, a, b);
1665
+ }
1666
+ }
1667
+
1668
+ /**
1669
+ * @generated from message livekit.SubscribedCodec
1670
+ */
1671
+ export class SubscribedCodec extends Message<SubscribedCodec> {
1672
+ /**
1673
+ * @generated from field: string codec = 1;
1674
+ */
1675
+ codec = "";
1676
+
1677
+ /**
1678
+ * @generated from field: repeated livekit.SubscribedQuality qualities = 2;
1679
+ */
1680
+ qualities: SubscribedQuality[] = [];
1681
+
1682
+ constructor(data?: PartialMessage<SubscribedCodec>) {
1683
+ super();
1684
+ proto3.util.initPartial(data, this);
1685
+ }
1686
+
1687
+ static readonly runtime: typeof proto3 = proto3;
1688
+ static readonly typeName = "livekit.SubscribedCodec";
1689
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1690
+ { no: 1, name: "codec", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1691
+ { no: 2, name: "qualities", kind: "message", T: SubscribedQuality, repeated: true },
1692
+ ]);
1693
+
1694
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SubscribedCodec {
1695
+ return new SubscribedCodec().fromBinary(bytes, options);
1696
+ }
1697
+
1698
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SubscribedCodec {
1699
+ return new SubscribedCodec().fromJson(jsonValue, options);
1700
+ }
1701
+
1702
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SubscribedCodec {
1703
+ return new SubscribedCodec().fromJsonString(jsonString, options);
1704
+ }
1705
+
1706
+ static equals(a: SubscribedCodec | PlainMessage<SubscribedCodec> | undefined, b: SubscribedCodec | PlainMessage<SubscribedCodec> | undefined): boolean {
1707
+ return proto3.util.equals(SubscribedCodec, a, b);
1708
+ }
1709
+ }
1710
+
1711
+ /**
1712
+ * @generated from message livekit.SubscribedQualityUpdate
1713
+ */
1714
+ export class SubscribedQualityUpdate extends Message<SubscribedQualityUpdate> {
1715
+ /**
1716
+ * @generated from field: string track_sid = 1;
1717
+ */
1718
+ trackSid = "";
1719
+
1720
+ /**
1721
+ * @generated from field: repeated livekit.SubscribedQuality subscribed_qualities = 2;
1722
+ */
1723
+ subscribedQualities: SubscribedQuality[] = [];
1724
+
1725
+ /**
1726
+ * @generated from field: repeated livekit.SubscribedCodec subscribed_codecs = 3;
1727
+ */
1728
+ subscribedCodecs: SubscribedCodec[] = [];
1729
+
1730
+ constructor(data?: PartialMessage<SubscribedQualityUpdate>) {
1731
+ super();
1732
+ proto3.util.initPartial(data, this);
1733
+ }
1734
+
1735
+ static readonly runtime: typeof proto3 = proto3;
1736
+ static readonly typeName = "livekit.SubscribedQualityUpdate";
1737
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1738
+ { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1739
+ { no: 2, name: "subscribed_qualities", kind: "message", T: SubscribedQuality, repeated: true },
1740
+ { no: 3, name: "subscribed_codecs", kind: "message", T: SubscribedCodec, repeated: true },
1741
+ ]);
1742
+
1743
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SubscribedQualityUpdate {
1744
+ return new SubscribedQualityUpdate().fromBinary(bytes, options);
1745
+ }
1746
+
1747
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SubscribedQualityUpdate {
1748
+ return new SubscribedQualityUpdate().fromJson(jsonValue, options);
1749
+ }
1750
+
1751
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SubscribedQualityUpdate {
1752
+ return new SubscribedQualityUpdate().fromJsonString(jsonString, options);
1753
+ }
1754
+
1755
+ static equals(a: SubscribedQualityUpdate | PlainMessage<SubscribedQualityUpdate> | undefined, b: SubscribedQualityUpdate | PlainMessage<SubscribedQualityUpdate> | undefined): boolean {
1756
+ return proto3.util.equals(SubscribedQualityUpdate, a, b);
1757
+ }
1758
+ }
1759
+
1760
+ /**
1761
+ * @generated from message livekit.TrackPermission
1762
+ */
1763
+ export class TrackPermission extends Message<TrackPermission> {
1764
+ /**
1765
+ * permission could be granted either by participant sid or identity
1766
+ *
1767
+ * @generated from field: string participant_sid = 1;
1768
+ */
1769
+ participantSid = "";
1770
+
1771
+ /**
1772
+ * @generated from field: bool all_tracks = 2;
1773
+ */
1774
+ allTracks = false;
1775
+
1776
+ /**
1777
+ * @generated from field: repeated string track_sids = 3;
1778
+ */
1779
+ trackSids: string[] = [];
1780
+
1781
+ /**
1782
+ * @generated from field: string participant_identity = 4;
1783
+ */
1784
+ participantIdentity = "";
1785
+
1786
+ constructor(data?: PartialMessage<TrackPermission>) {
1787
+ super();
1788
+ proto3.util.initPartial(data, this);
1789
+ }
1790
+
1791
+ static readonly runtime: typeof proto3 = proto3;
1792
+ static readonly typeName = "livekit.TrackPermission";
1793
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1794
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1795
+ { no: 2, name: "all_tracks", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1796
+ { no: 3, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1797
+ { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1798
+ ]);
1799
+
1800
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPermission {
1801
+ return new TrackPermission().fromBinary(bytes, options);
1802
+ }
1803
+
1804
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPermission {
1805
+ return new TrackPermission().fromJson(jsonValue, options);
1806
+ }
1807
+
1808
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPermission {
1809
+ return new TrackPermission().fromJsonString(jsonString, options);
1810
+ }
1811
+
1812
+ static equals(a: TrackPermission | PlainMessage<TrackPermission> | undefined, b: TrackPermission | PlainMessage<TrackPermission> | undefined): boolean {
1813
+ return proto3.util.equals(TrackPermission, a, b);
1814
+ }
1815
+ }
1816
+
1817
+ /**
1818
+ * @generated from message livekit.SubscriptionPermission
1819
+ */
1820
+ export class SubscriptionPermission extends Message<SubscriptionPermission> {
1821
+ /**
1822
+ * @generated from field: bool all_participants = 1;
1823
+ */
1824
+ allParticipants = false;
1825
+
1826
+ /**
1827
+ * @generated from field: repeated livekit.TrackPermission track_permissions = 2;
1828
+ */
1829
+ trackPermissions: TrackPermission[] = [];
1830
+
1831
+ constructor(data?: PartialMessage<SubscriptionPermission>) {
1832
+ super();
1833
+ proto3.util.initPartial(data, this);
1834
+ }
1835
+
1836
+ static readonly runtime: typeof proto3 = proto3;
1837
+ static readonly typeName = "livekit.SubscriptionPermission";
1838
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1839
+ { no: 1, name: "all_participants", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1840
+ { no: 2, name: "track_permissions", kind: "message", T: TrackPermission, repeated: true },
1841
+ ]);
1842
+
1843
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SubscriptionPermission {
1844
+ return new SubscriptionPermission().fromBinary(bytes, options);
1845
+ }
1846
+
1847
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SubscriptionPermission {
1848
+ return new SubscriptionPermission().fromJson(jsonValue, options);
1849
+ }
1850
+
1851
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SubscriptionPermission {
1852
+ return new SubscriptionPermission().fromJsonString(jsonString, options);
1853
+ }
1854
+
1855
+ static equals(a: SubscriptionPermission | PlainMessage<SubscriptionPermission> | undefined, b: SubscriptionPermission | PlainMessage<SubscriptionPermission> | undefined): boolean {
1856
+ return proto3.util.equals(SubscriptionPermission, a, b);
1857
+ }
1858
+ }
1859
+
1860
+ /**
1861
+ * @generated from message livekit.SubscriptionPermissionUpdate
1862
+ */
1863
+ export class SubscriptionPermissionUpdate extends Message<SubscriptionPermissionUpdate> {
1864
+ /**
1865
+ * @generated from field: string participant_sid = 1;
1866
+ */
1867
+ participantSid = "";
1868
+
1869
+ /**
1870
+ * @generated from field: string track_sid = 2;
1871
+ */
1872
+ trackSid = "";
1873
+
1874
+ /**
1875
+ * @generated from field: bool allowed = 3;
1876
+ */
1877
+ allowed = false;
1878
+
1879
+ constructor(data?: PartialMessage<SubscriptionPermissionUpdate>) {
1880
+ super();
1881
+ proto3.util.initPartial(data, this);
1882
+ }
1883
+
1884
+ static readonly runtime: typeof proto3 = proto3;
1885
+ static readonly typeName = "livekit.SubscriptionPermissionUpdate";
1886
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1887
+ { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1888
+ { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1889
+ { no: 3, name: "allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1890
+ ]);
1891
+
1892
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SubscriptionPermissionUpdate {
1893
+ return new SubscriptionPermissionUpdate().fromBinary(bytes, options);
1894
+ }
1895
+
1896
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SubscriptionPermissionUpdate {
1897
+ return new SubscriptionPermissionUpdate().fromJson(jsonValue, options);
1898
+ }
1899
+
1900
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SubscriptionPermissionUpdate {
1901
+ return new SubscriptionPermissionUpdate().fromJsonString(jsonString, options);
1902
+ }
1903
+
1904
+ static equals(a: SubscriptionPermissionUpdate | PlainMessage<SubscriptionPermissionUpdate> | undefined, b: SubscriptionPermissionUpdate | PlainMessage<SubscriptionPermissionUpdate> | undefined): boolean {
1905
+ return proto3.util.equals(SubscriptionPermissionUpdate, a, b);
1906
+ }
1907
+ }
1908
+
1909
+ /**
1910
+ * @generated from message livekit.SyncState
1911
+ */
1912
+ export class SyncState extends Message<SyncState> {
1913
+ /**
1914
+ * last subscribe answer before reconnecting
1915
+ *
1916
+ * @generated from field: livekit.SessionDescription answer = 1;
1917
+ */
1918
+ answer?: SessionDescription;
1919
+
1920
+ /**
1921
+ * @generated from field: livekit.UpdateSubscription subscription = 2;
1922
+ */
1923
+ subscription?: UpdateSubscription;
1924
+
1925
+ /**
1926
+ * @generated from field: repeated livekit.TrackPublishedResponse publish_tracks = 3;
1927
+ */
1928
+ publishTracks: TrackPublishedResponse[] = [];
1929
+
1930
+ /**
1931
+ * @generated from field: repeated livekit.DataChannelInfo data_channels = 4;
1932
+ */
1933
+ dataChannels: DataChannelInfo[] = [];
1934
+
1935
+ /**
1936
+ * last received server side offer before reconnecting
1937
+ *
1938
+ * @generated from field: livekit.SessionDescription offer = 5;
1939
+ */
1940
+ offer?: SessionDescription;
1941
+
1942
+ constructor(data?: PartialMessage<SyncState>) {
1943
+ super();
1944
+ proto3.util.initPartial(data, this);
1945
+ }
1946
+
1947
+ static readonly runtime: typeof proto3 = proto3;
1948
+ static readonly typeName = "livekit.SyncState";
1949
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1950
+ { no: 1, name: "answer", kind: "message", T: SessionDescription },
1951
+ { no: 2, name: "subscription", kind: "message", T: UpdateSubscription },
1952
+ { no: 3, name: "publish_tracks", kind: "message", T: TrackPublishedResponse, repeated: true },
1953
+ { no: 4, name: "data_channels", kind: "message", T: DataChannelInfo, repeated: true },
1954
+ { no: 5, name: "offer", kind: "message", T: SessionDescription },
1955
+ ]);
1956
+
1957
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SyncState {
1958
+ return new SyncState().fromBinary(bytes, options);
1959
+ }
1960
+
1961
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SyncState {
1962
+ return new SyncState().fromJson(jsonValue, options);
1963
+ }
1964
+
1965
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SyncState {
1966
+ return new SyncState().fromJsonString(jsonString, options);
1967
+ }
1968
+
1969
+ static equals(a: SyncState | PlainMessage<SyncState> | undefined, b: SyncState | PlainMessage<SyncState> | undefined): boolean {
1970
+ return proto3.util.equals(SyncState, a, b);
1971
+ }
1972
+ }
1973
+
1974
+ /**
1975
+ * @generated from message livekit.DataChannelInfo
1976
+ */
1977
+ export class DataChannelInfo extends Message<DataChannelInfo> {
1978
+ /**
1979
+ * @generated from field: string label = 1;
1980
+ */
1981
+ label = "";
1982
+
1983
+ /**
1984
+ * @generated from field: uint32 id = 2;
1985
+ */
1986
+ id = 0;
1987
+
1988
+ /**
1989
+ * @generated from field: livekit.SignalTarget target = 3;
1990
+ */
1991
+ target = SignalTarget.PUBLISHER;
1992
+
1993
+ constructor(data?: PartialMessage<DataChannelInfo>) {
1994
+ super();
1995
+ proto3.util.initPartial(data, this);
1996
+ }
1997
+
1998
+ static readonly runtime: typeof proto3 = proto3;
1999
+ static readonly typeName = "livekit.DataChannelInfo";
2000
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2001
+ { no: 1, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2002
+ { no: 2, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
2003
+ { no: 3, name: "target", kind: "enum", T: proto3.getEnumType(SignalTarget) },
2004
+ ]);
2005
+
2006
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DataChannelInfo {
2007
+ return new DataChannelInfo().fromBinary(bytes, options);
2008
+ }
2009
+
2010
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DataChannelInfo {
2011
+ return new DataChannelInfo().fromJson(jsonValue, options);
2012
+ }
2013
+
2014
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DataChannelInfo {
2015
+ return new DataChannelInfo().fromJsonString(jsonString, options);
2016
+ }
2017
+
2018
+ static equals(a: DataChannelInfo | PlainMessage<DataChannelInfo> | undefined, b: DataChannelInfo | PlainMessage<DataChannelInfo> | undefined): boolean {
2019
+ return proto3.util.equals(DataChannelInfo, a, b);
2020
+ }
2021
+ }
2022
+
2023
+ /**
2024
+ * @generated from message livekit.SimulateScenario
2025
+ */
2026
+ export class SimulateScenario extends Message<SimulateScenario> {
2027
+ /**
2028
+ * @generated from oneof livekit.SimulateScenario.scenario
2029
+ */
2030
+ scenario: {
2031
+ /**
2032
+ * simulate N seconds of speaker activity
2033
+ *
2034
+ * @generated from field: int32 speaker_update = 1;
2035
+ */
2036
+ value: number;
2037
+ case: "speakerUpdate";
2038
+ } | {
2039
+ /**
2040
+ * simulate local node failure
2041
+ *
2042
+ * @generated from field: bool node_failure = 2;
2043
+ */
2044
+ value: boolean;
2045
+ case: "nodeFailure";
2046
+ } | {
2047
+ /**
2048
+ * simulate migration
2049
+ *
2050
+ * @generated from field: bool migration = 3;
2051
+ */
2052
+ value: boolean;
2053
+ case: "migration";
2054
+ } | {
2055
+ /**
2056
+ * server to send leave
2057
+ *
2058
+ * @generated from field: bool server_leave = 4;
2059
+ */
2060
+ value: boolean;
2061
+ case: "serverLeave";
2062
+ } | {
2063
+ /**
2064
+ * switch candidate protocol to tcp
2065
+ *
2066
+ * @generated from field: livekit.CandidateProtocol switch_candidate_protocol = 5;
2067
+ */
2068
+ value: CandidateProtocol;
2069
+ case: "switchCandidateProtocol";
2070
+ } | {
2071
+ /**
2072
+ * maximum bandwidth for subscribers, in bps
2073
+ * when zero, clears artificial bandwidth limit
2074
+ *
2075
+ * @generated from field: int64 subscriber_bandwidth = 6;
2076
+ */
2077
+ value: bigint;
2078
+ case: "subscriberBandwidth";
2079
+ } | { case: undefined; value?: undefined } = { case: undefined };
2080
+
2081
+ constructor(data?: PartialMessage<SimulateScenario>) {
2082
+ super();
2083
+ proto3.util.initPartial(data, this);
2084
+ }
2085
+
2086
+ static readonly runtime: typeof proto3 = proto3;
2087
+ static readonly typeName = "livekit.SimulateScenario";
2088
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2089
+ { no: 1, name: "speaker_update", kind: "scalar", T: 5 /* ScalarType.INT32 */, oneof: "scenario" },
2090
+ { no: 2, name: "node_failure", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" },
2091
+ { no: 3, name: "migration", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" },
2092
+ { no: 4, name: "server_leave", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" },
2093
+ { no: 5, name: "switch_candidate_protocol", kind: "enum", T: proto3.getEnumType(CandidateProtocol), oneof: "scenario" },
2094
+ { no: 6, name: "subscriber_bandwidth", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "scenario" },
2095
+ ]);
2096
+
2097
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SimulateScenario {
2098
+ return new SimulateScenario().fromBinary(bytes, options);
2099
+ }
2100
+
2101
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SimulateScenario {
2102
+ return new SimulateScenario().fromJson(jsonValue, options);
2103
+ }
2104
+
2105
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SimulateScenario {
2106
+ return new SimulateScenario().fromJsonString(jsonString, options);
2107
+ }
2108
+
2109
+ static equals(a: SimulateScenario | PlainMessage<SimulateScenario> | undefined, b: SimulateScenario | PlainMessage<SimulateScenario> | undefined): boolean {
2110
+ return proto3.util.equals(SimulateScenario, a, b);
2111
+ }
2112
+ }
2113
+
2114
+ /**
2115
+ * @generated from message livekit.Ping
2116
+ */
2117
+ export class Ping extends Message<Ping> {
2118
+ /**
2119
+ * @generated from field: int64 timestamp = 1;
2120
+ */
2121
+ timestamp = protoInt64.zero;
2122
+
2123
+ /**
2124
+ * rtt in milliseconds calculated by client
2125
+ *
2126
+ * @generated from field: int64 rtt = 2;
2127
+ */
2128
+ rtt = protoInt64.zero;
2129
+
2130
+ constructor(data?: PartialMessage<Ping>) {
2131
+ super();
2132
+ proto3.util.initPartial(data, this);
2133
+ }
2134
+
2135
+ static readonly runtime: typeof proto3 = proto3;
2136
+ static readonly typeName = "livekit.Ping";
2137
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2138
+ { no: 1, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
2139
+ { no: 2, name: "rtt", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
2140
+ ]);
2141
+
2142
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Ping {
2143
+ return new Ping().fromBinary(bytes, options);
2144
+ }
2145
+
2146
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Ping {
2147
+ return new Ping().fromJson(jsonValue, options);
2148
+ }
2149
+
2150
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Ping {
2151
+ return new Ping().fromJsonString(jsonString, options);
2152
+ }
2153
+
2154
+ static equals(a: Ping | PlainMessage<Ping> | undefined, b: Ping | PlainMessage<Ping> | undefined): boolean {
2155
+ return proto3.util.equals(Ping, a, b);
2156
+ }
2157
+ }
2158
+
2159
+ /**
2160
+ * @generated from message livekit.Pong
2161
+ */
2162
+ export class Pong extends Message<Pong> {
2163
+ /**
2164
+ * timestamp field of last received ping request
2165
+ *
2166
+ * @generated from field: int64 last_ping_timestamp = 1;
2167
+ */
2168
+ lastPingTimestamp = protoInt64.zero;
2169
+
2170
+ /**
2171
+ * @generated from field: int64 timestamp = 2;
2172
+ */
2173
+ timestamp = protoInt64.zero;
2174
+
2175
+ constructor(data?: PartialMessage<Pong>) {
2176
+ super();
2177
+ proto3.util.initPartial(data, this);
2178
+ }
2179
+
2180
+ static readonly runtime: typeof proto3 = proto3;
2181
+ static readonly typeName = "livekit.Pong";
2182
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2183
+ { no: 1, name: "last_ping_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
2184
+ { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
2185
+ ]);
2186
+
2187
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Pong {
2188
+ return new Pong().fromBinary(bytes, options);
2189
+ }
2190
+
2191
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Pong {
2192
+ return new Pong().fromJson(jsonValue, options);
2193
+ }
2194
+
2195
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Pong {
2196
+ return new Pong().fromJsonString(jsonString, options);
2197
+ }
2198
+
2199
+ static equals(a: Pong | PlainMessage<Pong> | undefined, b: Pong | PlainMessage<Pong> | undefined): boolean {
2200
+ return proto3.util.equals(Pong, a, b);
2201
+ }
2202
+ }
2203
+
2204
+ /**
2205
+ * @generated from message livekit.RegionSettings
2206
+ */
2207
+ export class RegionSettings extends Message<RegionSettings> {
2208
+ /**
2209
+ * @generated from field: repeated livekit.RegionInfo regions = 1;
2210
+ */
2211
+ regions: RegionInfo[] = [];
2212
+
2213
+ constructor(data?: PartialMessage<RegionSettings>) {
2214
+ super();
2215
+ proto3.util.initPartial(data, this);
2216
+ }
2217
+
2218
+ static readonly runtime: typeof proto3 = proto3;
2219
+ static readonly typeName = "livekit.RegionSettings";
2220
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2221
+ { no: 1, name: "regions", kind: "message", T: RegionInfo, repeated: true },
2222
+ ]);
2223
+
2224
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RegionSettings {
2225
+ return new RegionSettings().fromBinary(bytes, options);
2226
+ }
2227
+
2228
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RegionSettings {
2229
+ return new RegionSettings().fromJson(jsonValue, options);
2230
+ }
2231
+
2232
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RegionSettings {
2233
+ return new RegionSettings().fromJsonString(jsonString, options);
2234
+ }
2235
+
2236
+ static equals(a: RegionSettings | PlainMessage<RegionSettings> | undefined, b: RegionSettings | PlainMessage<RegionSettings> | undefined): boolean {
2237
+ return proto3.util.equals(RegionSettings, a, b);
2238
+ }
2239
+ }
2240
+
2241
+ /**
2242
+ * @generated from message livekit.RegionInfo
2243
+ */
2244
+ export class RegionInfo extends Message<RegionInfo> {
2245
+ /**
2246
+ * @generated from field: string region = 1;
2247
+ */
2248
+ region = "";
2249
+
2250
+ /**
2251
+ * @generated from field: string url = 2;
2252
+ */
2253
+ url = "";
2254
+
2255
+ /**
2256
+ * @generated from field: int64 distance = 3;
2257
+ */
2258
+ distance = protoInt64.zero;
2259
+
2260
+ constructor(data?: PartialMessage<RegionInfo>) {
2261
+ super();
2262
+ proto3.util.initPartial(data, this);
2263
+ }
2264
+
2265
+ static readonly runtime: typeof proto3 = proto3;
2266
+ static readonly typeName = "livekit.RegionInfo";
2267
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2268
+ { no: 1, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2269
+ { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2270
+ { no: 3, name: "distance", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
2271
+ ]);
2272
+
2273
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RegionInfo {
2274
+ return new RegionInfo().fromBinary(bytes, options);
2275
+ }
2276
+
2277
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RegionInfo {
2278
+ return new RegionInfo().fromJson(jsonValue, options);
2279
+ }
2280
+
2281
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RegionInfo {
2282
+ return new RegionInfo().fromJsonString(jsonString, options);
2283
+ }
2284
+
2285
+ static equals(a: RegionInfo | PlainMessage<RegionInfo> | undefined, b: RegionInfo | PlainMessage<RegionInfo> | undefined): boolean {
2286
+ return proto3.util.equals(RegionInfo, a, b);
2287
+ }
2288
+ }
2289
+
2290
+ /**
2291
+ * @generated from message livekit.SubscriptionResponse
2292
+ */
2293
+ export class SubscriptionResponse extends Message<SubscriptionResponse> {
2294
+ /**
2295
+ * @generated from field: string track_sid = 1;
2296
+ */
2297
+ trackSid = "";
2298
+
2299
+ /**
2300
+ * @generated from field: livekit.SubscriptionError err = 2;
2301
+ */
2302
+ err = SubscriptionError.SE_UNKNOWN;
2303
+
2304
+ constructor(data?: PartialMessage<SubscriptionResponse>) {
2305
+ super();
2306
+ proto3.util.initPartial(data, this);
2307
+ }
2308
+
2309
+ static readonly runtime: typeof proto3 = proto3;
2310
+ static readonly typeName = "livekit.SubscriptionResponse";
2311
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
2312
+ { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2313
+ { no: 2, name: "err", kind: "enum", T: proto3.getEnumType(SubscriptionError) },
2314
+ ]);
2315
+
2316
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SubscriptionResponse {
2317
+ return new SubscriptionResponse().fromBinary(bytes, options);
2318
+ }
2319
+
2320
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SubscriptionResponse {
2321
+ return new SubscriptionResponse().fromJson(jsonValue, options);
2322
+ }
2323
+
2324
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SubscriptionResponse {
2325
+ return new SubscriptionResponse().fromJsonString(jsonString, options);
2326
+ }
2327
+
2328
+ static equals(a: SubscriptionResponse | PlainMessage<SubscriptionResponse> | undefined, b: SubscriptionResponse | PlainMessage<SubscriptionResponse> | undefined): boolean {
2329
+ return proto3.util.equals(SubscriptionResponse, a, b);
2330
+ }
2331
+ }
2332
+