@livekit/rtc-node 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/audio_frame.cjs +2 -2
  2. package/dist/audio_frame.cjs.map +1 -1
  3. package/dist/audio_frame.d.cts +31 -0
  4. package/dist/audio_frame.d.ts +11 -5
  5. package/dist/audio_frame.d.ts.map +1 -1
  6. package/dist/audio_frame.js +3 -3
  7. package/dist/audio_frame.js.map +1 -1
  8. package/dist/audio_resampler.cjs +10 -7
  9. package/dist/audio_resampler.cjs.map +1 -1
  10. package/dist/audio_resampler.d.cts +59 -0
  11. package/dist/audio_resampler.d.ts +11 -3
  12. package/dist/audio_resampler.d.ts.map +1 -1
  13. package/dist/audio_resampler.js +13 -10
  14. package/dist/audio_resampler.js.map +1 -1
  15. package/dist/audio_source.cjs +6 -4
  16. package/dist/audio_source.cjs.map +1 -1
  17. package/dist/audio_source.d.cts +37 -0
  18. package/dist/audio_source.d.ts +13 -5
  19. package/dist/audio_source.d.ts.map +1 -1
  20. package/dist/audio_source.js +9 -7
  21. package/dist/audio_source.js.map +1 -1
  22. package/dist/audio_stream.cjs +1 -2
  23. package/dist/audio_stream.cjs.map +1 -1
  24. package/dist/audio_stream.d.cts +37 -0
  25. package/dist/audio_stream.d.ts +16 -5
  26. package/dist/audio_stream.d.ts.map +1 -1
  27. package/dist/audio_stream.js +2 -3
  28. package/dist/audio_stream.js.map +1 -1
  29. package/dist/e2ee.cjs +19 -20
  30. package/dist/e2ee.cjs.map +1 -1
  31. package/dist/e2ee.d.cts +47 -0
  32. package/dist/e2ee.d.ts +11 -8
  33. package/dist/e2ee.d.ts.map +1 -1
  34. package/dist/e2ee.js +29 -30
  35. package/dist/e2ee.js.map +1 -1
  36. package/dist/ffi_client.cjs +6 -5
  37. package/dist/ffi_client.cjs.map +1 -1
  38. package/dist/ffi_client.d.cts +35 -0
  39. package/dist/ffi_client.d.ts +23 -11
  40. package/dist/ffi_client.d.ts.map +1 -1
  41. package/dist/ffi_client.js +6 -10
  42. package/dist/ffi_client.js.map +1 -1
  43. package/dist/index.cjs +16 -49
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +28 -0
  46. package/dist/index.d.ts +20 -41
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +7 -46
  49. package/dist/index.js.map +1 -1
  50. package/dist/napi/native.d.cjs.map +1 -1
  51. package/dist/napi/native.d.d.cts +21 -0
  52. package/dist/napi/native.d.d.ts +21 -0
  53. package/dist/napi/native.d.ts +5 -5
  54. package/dist/native.d.ts +5 -5
  55. package/dist/participant.cjs +57 -34
  56. package/dist/participant.cjs.map +1 -1
  57. package/dist/participant.d.cts +126 -0
  58. package/dist/participant.d.ts +34 -20
  59. package/dist/participant.d.ts.map +1 -1
  60. package/dist/participant.js +75 -50
  61. package/dist/participant.js.map +1 -1
  62. package/dist/proto/audio_frame_pb.cjs +977 -125
  63. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  64. package/dist/proto/audio_frame_pb.d.cts +898 -0
  65. package/dist/proto/audio_frame_pb.d.ts +506 -417
  66. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  67. package/dist/proto/audio_frame_pb.js +943 -85
  68. package/dist/proto/audio_frame_pb.js.map +1 -1
  69. package/dist/proto/e2ee_pb.cjs +700 -85
  70. package/dist/proto/e2ee_pb.cjs.map +1 -1
  71. package/dist/proto/e2ee_pb.d.cts +653 -0
  72. package/dist/proto/e2ee_pb.d.ts +333 -263
  73. package/dist/proto/e2ee_pb.d.ts.map +1 -1
  74. package/dist/proto/e2ee_pb.js +675 -57
  75. package/dist/proto/e2ee_pb.js.map +1 -1
  76. package/dist/proto/ffi_pb.cjs +369 -36
  77. package/dist/proto/ffi_pb.cjs.map +1 -1
  78. package/dist/proto/ffi_pb.d.cts +898 -0
  79. package/dist/proto/ffi_pb.d.ts +164 -112
  80. package/dist/proto/ffi_pb.d.ts.map +1 -1
  81. package/dist/proto/ffi_pb.js +364 -29
  82. package/dist/proto/ffi_pb.js.map +1 -1
  83. package/dist/proto/handle_pb.cjs +27 -7
  84. package/dist/proto/handle_pb.cjs.map +1 -1
  85. package/dist/proto/handle_pb.d.cts +31 -0
  86. package/dist/proto/handle_pb.d.ts +15 -15
  87. package/dist/proto/handle_pb.d.ts.map +1 -1
  88. package/dist/proto/handle_pb.js +26 -5
  89. package/dist/proto/handle_pb.js.map +1 -1
  90. package/dist/proto/participant_pb.cjs +112 -15
  91. package/dist/proto/participant_pb.cjs.map +1 -1
  92. package/dist/proto/participant_pb.d.cts +181 -0
  93. package/dist/proto/participant_pb.d.ts +143 -53
  94. package/dist/proto/participant_pb.d.ts.map +1 -1
  95. package/dist/proto/participant_pb.js +109 -11
  96. package/dist/proto/participant_pb.js.map +1 -1
  97. package/dist/proto/room_pb.cjs +2693 -302
  98. package/dist/proto/room_pb.cjs.map +1 -1
  99. package/dist/proto/room_pb.d.cts +2475 -0
  100. package/dist/proto/room_pb.d.ts +1269 -864
  101. package/dist/proto/room_pb.d.ts.map +1 -1
  102. package/dist/proto/room_pb.js +2603 -210
  103. package/dist/proto/room_pb.js.map +1 -1
  104. package/dist/proto/rpc_pb.cjs +302 -37
  105. package/dist/proto/rpc_pb.cjs.map +1 -1
  106. package/dist/proto/rpc_pb.d.cts +267 -0
  107. package/dist/proto/rpc_pb.d.ts +140 -108
  108. package/dist/proto/rpc_pb.d.ts.map +1 -1
  109. package/dist/proto/rpc_pb.js +291 -25
  110. package/dist/proto/rpc_pb.js.map +1 -1
  111. package/dist/proto/stats_pb.cjs +1253 -139
  112. package/dist/proto/stats_pb.cjs.map +1 -1
  113. package/dist/proto/stats_pb.d.cts +1764 -0
  114. package/dist/proto/stats_pb.d.ts +806 -693
  115. package/dist/proto/stats_pb.d.ts.map +1 -1
  116. package/dist/proto/stats_pb.js +1216 -93
  117. package/dist/proto/stats_pb.js.map +1 -1
  118. package/dist/proto/track_pb.cjs +462 -64
  119. package/dist/proto/track_pb.cjs.map +1 -1
  120. package/dist/proto/track_pb.d.cts +434 -0
  121. package/dist/proto/track_pb.d.ts +254 -220
  122. package/dist/proto/track_pb.d.ts.map +1 -1
  123. package/dist/proto/track_pb.js +447 -45
  124. package/dist/proto/track_pb.js.map +1 -1
  125. package/dist/proto/track_publication_pb.cjs +130 -0
  126. package/dist/proto/track_publication_pb.cjs.map +1 -0
  127. package/dist/proto/track_publication_pb.d.cts +80 -0
  128. package/dist/proto/track_publication_pb.d.ts +80 -0
  129. package/dist/proto/track_publication_pb.d.ts.map +1 -0
  130. package/dist/proto/track_publication_pb.js +103 -0
  131. package/dist/proto/track_publication_pb.js.map +1 -0
  132. package/dist/proto/video_frame_pb.cjs +648 -88
  133. package/dist/proto/video_frame_pb.cjs.map +1 -1
  134. package/dist/proto/video_frame_pb.d.cts +660 -0
  135. package/dist/proto/video_frame_pb.d.ts +375 -328
  136. package/dist/proto/video_frame_pb.d.ts.map +1 -1
  137. package/dist/proto/video_frame_pb.js +626 -60
  138. package/dist/proto/video_frame_pb.js.map +1 -1
  139. package/dist/room.cjs +93 -125
  140. package/dist/room.cjs.map +1 -1
  141. package/dist/room.d.cts +123 -0
  142. package/dist/room.d.ts +37 -34
  143. package/dist/room.d.ts.map +1 -1
  144. package/dist/room.js +92 -122
  145. package/dist/room.js.map +1 -1
  146. package/dist/rpc.cjs.map +1 -1
  147. package/dist/rpc.d.cts +81 -0
  148. package/dist/rpc.d.ts +10 -7
  149. package/dist/rpc.js.map +1 -1
  150. package/dist/track.cjs +12 -8
  151. package/dist/track.cjs.map +1 -1
  152. package/dist/track.d.cts +45 -0
  153. package/dist/track.d.ts +30 -20
  154. package/dist/track.d.ts.map +1 -1
  155. package/dist/track.js +13 -9
  156. package/dist/track.js.map +1 -1
  157. package/dist/track_publication.cjs +21 -12
  158. package/dist/track_publication.cjs.map +1 -1
  159. package/dist/track_publication.d.cts +47 -0
  160. package/dist/track_publication.d.ts +30 -19
  161. package/dist/track_publication.d.ts.map +1 -1
  162. package/dist/track_publication.js +22 -13
  163. package/dist/track_publication.js.map +1 -1
  164. package/dist/transcription.d.cts +15 -0
  165. package/dist/transcription.d.ts +4 -3
  166. package/dist/types.d.cts +9 -0
  167. package/dist/types.d.ts +3 -2
  168. package/dist/version.cjs +1 -1
  169. package/dist/version.cjs.map +1 -1
  170. package/dist/version.d.cts +3 -0
  171. package/dist/version.d.ts +3 -2
  172. package/dist/version.js +1 -1
  173. package/dist/version.js.map +1 -1
  174. package/dist/video_frame.cjs +26 -45
  175. package/dist/video_frame.cjs.map +1 -1
  176. package/dist/video_frame.d.cts +24 -0
  177. package/dist/video_frame.d.ts +10 -4
  178. package/dist/video_frame.d.ts.map +1 -1
  179. package/dist/video_frame.js +29 -48
  180. package/dist/video_frame.js.map +1 -1
  181. package/dist/video_source.cjs +7 -4
  182. package/dist/video_source.cjs.map +1 -1
  183. package/dist/video_source.d.cts +22 -0
  184. package/dist/video_source.d.ts +14 -7
  185. package/dist/video_source.d.ts.map +1 -1
  186. package/dist/video_source.js +9 -6
  187. package/dist/video_source.js.map +1 -1
  188. package/dist/video_stream.cjs +16 -5
  189. package/dist/video_stream.cjs.map +1 -1
  190. package/dist/video_stream.d.cts +40 -0
  191. package/dist/video_stream.d.ts +18 -7
  192. package/dist/video_stream.d.ts.map +1 -1
  193. package/dist/video_stream.js +17 -6
  194. package/dist/video_stream.js.map +1 -1
  195. package/package.json +17 -12
  196. package/src/audio_frame.ts +10 -10
  197. package/src/audio_resampler.ts +15 -13
  198. package/src/audio_source.ts +11 -8
  199. package/src/audio_stream.ts +3 -4
  200. package/src/e2ee.ts +36 -37
  201. package/src/ffi_client.ts +8 -16
  202. package/src/index.ts +5 -68
  203. package/src/napi/native.d.ts +5 -5
  204. package/src/participant.ts +100 -72
  205. package/src/proto/audio_frame_pb.ts +1220 -496
  206. package/src/proto/e2ee_pb.ts +858 -337
  207. package/src/proto/ffi_pb.ts +442 -135
  208. package/src/proto/handle_pb.ts +33 -19
  209. package/src/proto/participant_pb.ts +225 -60
  210. package/src/proto/room_pb.ts +3149 -1013
  211. package/src/proto/rpc_pb.ts +358 -129
  212. package/src/proto/stats_pb.ts +1891 -877
  213. package/src/proto/track_pb.ts +587 -253
  214. package/src/proto/track_publication_pb.ts +180 -0
  215. package/src/proto/video_frame_pb.ts +861 -394
  216. package/src/room.ts +143 -188
  217. package/src/rpc.ts +1 -1
  218. package/src/track.ts +16 -17
  219. package/src/track_publication.ts +25 -26
  220. package/src/version.ts +1 -1
  221. package/src/video_frame.ts +48 -72
  222. package/src/video_source.ts +11 -8
  223. package/src/video_stream.ts +18 -8
@@ -12,19 +12,13 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v2.2.0 with parameter "target=ts,import_extension=js"
15
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js"
16
16
  // @generated from file handle.proto (package livekit.proto, syntax proto2)
17
17
  /* eslint-disable */
18
+ // @ts-nocheck
18
19
 
19
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
20
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
21
- import type { Message } from "@bufbuild/protobuf";
22
-
23
- /**
24
- * Describes the file handle.proto.
25
- */
26
- export const file_handle: GenFile = /*@__PURE__*/
27
- fileDesc("CgxoYW5kbGUucHJvdG8SDWxpdmVraXQucHJvdG8iHAoORmZpT3duZWRIYW5kbGUSCgoCaWQYASACKARCEKoCDUxpdmVLaXQuUHJvdG8");
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto2 } from "@bufbuild/protobuf";
28
22
 
29
23
  /**
30
24
  * # Safety
@@ -39,17 +33,37 @@ export const file_handle: GenFile = /*@__PURE__*/
39
33
  *
40
34
  * @generated from message livekit.proto.FfiOwnedHandle
41
35
  */
42
- export type FfiOwnedHandle = Message<"livekit.proto.FfiOwnedHandle"> & {
36
+ export class FfiOwnedHandle extends Message<FfiOwnedHandle> {
43
37
  /**
44
38
  * @generated from field: required uint64 id = 1;
45
39
  */
46
- id: bigint;
47
- };
40
+ id?: bigint;
48
41
 
49
- /**
50
- * Describes the message livekit.proto.FfiOwnedHandle.
51
- * Use `create(FfiOwnedHandleSchema)` to create a new message.
52
- */
53
- export const FfiOwnedHandleSchema: GenMessage<FfiOwnedHandle> = /*@__PURE__*/
54
- messageDesc(file_handle, 0);
42
+ constructor(data?: PartialMessage<FfiOwnedHandle>) {
43
+ super();
44
+ proto2.util.initPartial(data, this);
45
+ }
46
+
47
+ static readonly runtime: typeof proto2 = proto2;
48
+ static readonly typeName = "livekit.proto.FfiOwnedHandle";
49
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
50
+ { no: 1, name: "id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
51
+ ]);
52
+
53
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FfiOwnedHandle {
54
+ return new FfiOwnedHandle().fromBinary(bytes, options);
55
+ }
56
+
57
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FfiOwnedHandle {
58
+ return new FfiOwnedHandle().fromJson(jsonValue, options);
59
+ }
60
+
61
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FfiOwnedHandle {
62
+ return new FfiOwnedHandle().fromJsonString(jsonString, options);
63
+ }
64
+
65
+ static equals(a: FfiOwnedHandle | PlainMessage<FfiOwnedHandle> | undefined, b: FfiOwnedHandle | PlainMessage<FfiOwnedHandle> | undefined): boolean {
66
+ return proto2.util.equals(FfiOwnedHandle, a, b);
67
+ }
68
+ }
55
69
 
@@ -12,119 +12,284 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v2.2.0 with parameter "target=ts,import_extension=js"
15
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js"
16
16
  // @generated from file participant.proto (package livekit.proto, syntax proto2)
17
17
  /* eslint-disable */
18
+ // @ts-nocheck
18
19
 
19
- import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
20
- import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
21
- import type { FfiOwnedHandle } from "./handle_pb.js";
22
- import { file_handle } from "./handle_pb.js";
23
- import type { Message } from "@bufbuild/protobuf";
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto2 } from "@bufbuild/protobuf";
22
+ import { FfiOwnedHandle } from "./handle_pb.js";
24
23
 
25
24
  /**
26
- * Describes the file participant.proto.
25
+ * @generated from enum livekit.proto.ParticipantKind
27
26
  */
28
- export const file_participant: GenFile = /*@__PURE__*/
29
- fileDesc("ChFwYXJ0aWNpcGFudC5wcm90bxINbGl2ZWtpdC5wcm90byL1AQoPUGFydGljaXBhbnRJbmZvEgsKA3NpZBgBIAIoCRIMCgRuYW1lGAIgAigJEhAKCGlkZW50aXR5GAMgAigJEhAKCG1ldGFkYXRhGAQgAigJEkIKCmF0dHJpYnV0ZXMYBSADKAsyLi5saXZla2l0LnByb3RvLlBhcnRpY2lwYW50SW5mby5BdHRyaWJ1dGVzRW50cnkSLAoEa2luZBgGIAIoDjIeLmxpdmVraXQucHJvdG8uUGFydGljaXBhbnRLaW5kGjEKD0F0dHJpYnV0ZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIm8KEE93bmVkUGFydGljaXBhbnQSLQoGaGFuZGxlGAEgAigLMh0ubGl2ZWtpdC5wcm90by5GZmlPd25lZEhhbmRsZRIsCgRpbmZvGAIgAigLMh4ubGl2ZWtpdC5wcm90by5QYXJ0aWNpcGFudEluZm8qoQEKD1BhcnRpY2lwYW50S2luZBIdChlQQVJUSUNJUEFOVF9LSU5EX1NUQU5EQVJEEAASHAoYUEFSVElDSVBBTlRfS0lORF9JTkdSRVNTEAESGwoXUEFSVElDSVBBTlRfS0lORF9FR1JFU1MQAhIYChRQQVJUSUNJUEFOVF9LSU5EX1NJUBADEhoKFlBBUlRJQ0lQQU5UX0tJTkRfQUdFTlQQBEIQqgINTGl2ZUtpdC5Qcm90bw", [file_handle]);
27
+ export enum ParticipantKind {
28
+ /**
29
+ * @generated from enum value: PARTICIPANT_KIND_STANDARD = 0;
30
+ */
31
+ STANDARD = 0,
32
+
33
+ /**
34
+ * @generated from enum value: PARTICIPANT_KIND_INGRESS = 1;
35
+ */
36
+ INGRESS = 1,
37
+
38
+ /**
39
+ * @generated from enum value: PARTICIPANT_KIND_EGRESS = 2;
40
+ */
41
+ EGRESS = 2,
42
+
43
+ /**
44
+ * @generated from enum value: PARTICIPANT_KIND_SIP = 3;
45
+ */
46
+ SIP = 3,
47
+
48
+ /**
49
+ * @generated from enum value: PARTICIPANT_KIND_AGENT = 4;
50
+ */
51
+ AGENT = 4,
52
+ }
53
+ // Retrieve enum metadata with: proto2.getEnumType(ParticipantKind)
54
+ proto2.util.setEnumType(ParticipantKind, "livekit.proto.ParticipantKind", [
55
+ { no: 0, name: "PARTICIPANT_KIND_STANDARD" },
56
+ { no: 1, name: "PARTICIPANT_KIND_INGRESS" },
57
+ { no: 2, name: "PARTICIPANT_KIND_EGRESS" },
58
+ { no: 3, name: "PARTICIPANT_KIND_SIP" },
59
+ { no: 4, name: "PARTICIPANT_KIND_AGENT" },
60
+ ]);
30
61
 
31
62
  /**
32
- * @generated from message livekit.proto.ParticipantInfo
63
+ * @generated from enum livekit.proto.DisconnectReason
33
64
  */
34
- export type ParticipantInfo = Message<"livekit.proto.ParticipantInfo"> & {
65
+ export enum DisconnectReason {
35
66
  /**
36
- * @generated from field: required string sid = 1;
67
+ * @generated from enum value: UNKNOWN_REASON = 0;
37
68
  */
38
- sid: string;
69
+ UNKNOWN_REASON = 0,
39
70
 
40
71
  /**
41
- * @generated from field: required string name = 2;
72
+ * the client initiated the disconnect
73
+ *
74
+ * @generated from enum value: CLIENT_INITIATED = 1;
42
75
  */
43
- name: string;
76
+ CLIENT_INITIATED = 1,
44
77
 
45
78
  /**
46
- * @generated from field: required string identity = 3;
79
+ * another participant with the same identity has joined the room
80
+ *
81
+ * @generated from enum value: DUPLICATE_IDENTITY = 2;
47
82
  */
48
- identity: string;
83
+ DUPLICATE_IDENTITY = 2,
49
84
 
50
85
  /**
51
- * @generated from field: required string metadata = 4;
86
+ * the server instance is shutting down
87
+ *
88
+ * @generated from enum value: SERVER_SHUTDOWN = 3;
52
89
  */
53
- metadata: string;
90
+ SERVER_SHUTDOWN = 3,
54
91
 
55
92
  /**
56
- * @generated from field: map<string, string> attributes = 5;
93
+ * RoomService.RemoveParticipant was called
94
+ *
95
+ * @generated from enum value: PARTICIPANT_REMOVED = 4;
57
96
  */
58
- attributes: { [key: string]: string };
97
+ PARTICIPANT_REMOVED = 4,
59
98
 
60
99
  /**
61
- * @generated from field: required livekit.proto.ParticipantKind kind = 6;
100
+ * RoomService.DeleteRoom was called
101
+ *
102
+ * @generated from enum value: ROOM_DELETED = 5;
62
103
  */
63
- kind: ParticipantKind;
64
- };
104
+ ROOM_DELETED = 5,
65
105
 
66
- /**
67
- * Describes the message livekit.proto.ParticipantInfo.
68
- * Use `create(ParticipantInfoSchema)` to create a new message.
69
- */
70
- export const ParticipantInfoSchema: GenMessage<ParticipantInfo> = /*@__PURE__*/
71
- messageDesc(file_participant, 0);
106
+ /**
107
+ * the client is attempting to resume a session, but server is not aware of it
108
+ *
109
+ * @generated from enum value: STATE_MISMATCH = 6;
110
+ */
111
+ STATE_MISMATCH = 6,
72
112
 
73
- /**
74
- * @generated from message livekit.proto.OwnedParticipant
75
- */
76
- export type OwnedParticipant = Message<"livekit.proto.OwnedParticipant"> & {
77
113
  /**
78
- * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
114
+ * client was unable to connect fully
115
+ *
116
+ * @generated from enum value: JOIN_FAILURE = 7;
79
117
  */
80
- handle?: FfiOwnedHandle;
118
+ JOIN_FAILURE = 7,
81
119
 
82
120
  /**
83
- * @generated from field: required livekit.proto.ParticipantInfo info = 2;
121
+ * Cloud-only, the server requested Participant to migrate the connection elsewhere
122
+ *
123
+ * @generated from enum value: MIGRATION = 8;
84
124
  */
85
- info?: ParticipantInfo;
86
- };
125
+ MIGRATION = 8,
87
126
 
88
- /**
89
- * Describes the message livekit.proto.OwnedParticipant.
90
- * Use `create(OwnedParticipantSchema)` to create a new message.
91
- */
92
- export const OwnedParticipantSchema: GenMessage<OwnedParticipant> = /*@__PURE__*/
93
- messageDesc(file_participant, 1);
127
+ /**
128
+ * the signal websocket was closed unexpectedly
129
+ *
130
+ * @generated from enum value: SIGNAL_CLOSE = 9;
131
+ */
132
+ SIGNAL_CLOSE = 9,
133
+
134
+ /**
135
+ * the room was closed, due to all Standard and Ingress participants having left
136
+ *
137
+ * @generated from enum value: ROOM_CLOSED = 10;
138
+ */
139
+ ROOM_CLOSED = 10,
140
+
141
+ /**
142
+ * SIP callee did not respond in time
143
+ *
144
+ * @generated from enum value: USER_UNAVAILABLE = 11;
145
+ */
146
+ USER_UNAVAILABLE = 11,
147
+
148
+ /**
149
+ * SIP callee rejected the call (busy)
150
+ *
151
+ * @generated from enum value: USER_REJECTED = 12;
152
+ */
153
+ USER_REJECTED = 12,
154
+
155
+ /**
156
+ * SIP protocol failure or unexpected response
157
+ *
158
+ * @generated from enum value: SIP_TRUNK_FAILURE = 13;
159
+ */
160
+ SIP_TRUNK_FAILURE = 13,
161
+ }
162
+ // Retrieve enum metadata with: proto2.getEnumType(DisconnectReason)
163
+ proto2.util.setEnumType(DisconnectReason, "livekit.proto.DisconnectReason", [
164
+ { no: 0, name: "UNKNOWN_REASON" },
165
+ { no: 1, name: "CLIENT_INITIATED" },
166
+ { no: 2, name: "DUPLICATE_IDENTITY" },
167
+ { no: 3, name: "SERVER_SHUTDOWN" },
168
+ { no: 4, name: "PARTICIPANT_REMOVED" },
169
+ { no: 5, name: "ROOM_DELETED" },
170
+ { no: 6, name: "STATE_MISMATCH" },
171
+ { no: 7, name: "JOIN_FAILURE" },
172
+ { no: 8, name: "MIGRATION" },
173
+ { no: 9, name: "SIGNAL_CLOSE" },
174
+ { no: 10, name: "ROOM_CLOSED" },
175
+ { no: 11, name: "USER_UNAVAILABLE" },
176
+ { no: 12, name: "USER_REJECTED" },
177
+ { no: 13, name: "SIP_TRUNK_FAILURE" },
178
+ ]);
94
179
 
95
180
  /**
96
- * @generated from enum livekit.proto.ParticipantKind
181
+ * @generated from message livekit.proto.ParticipantInfo
97
182
  */
98
- export enum ParticipantKind {
183
+ export class ParticipantInfo extends Message<ParticipantInfo> {
99
184
  /**
100
- * @generated from enum value: PARTICIPANT_KIND_STANDARD = 0;
185
+ * @generated from field: required string sid = 1;
101
186
  */
102
- STANDARD = 0,
187
+ sid?: string;
103
188
 
104
189
  /**
105
- * @generated from enum value: PARTICIPANT_KIND_INGRESS = 1;
190
+ * @generated from field: required string name = 2;
106
191
  */
107
- INGRESS = 1,
192
+ name?: string;
108
193
 
109
194
  /**
110
- * @generated from enum value: PARTICIPANT_KIND_EGRESS = 2;
195
+ * @generated from field: required string identity = 3;
111
196
  */
112
- EGRESS = 2,
197
+ identity?: string;
113
198
 
114
199
  /**
115
- * @generated from enum value: PARTICIPANT_KIND_SIP = 3;
200
+ * @generated from field: required string metadata = 4;
116
201
  */
117
- SIP = 3,
202
+ metadata?: string;
118
203
 
119
204
  /**
120
- * @generated from enum value: PARTICIPANT_KIND_AGENT = 4;
205
+ * @generated from field: map<string, string> attributes = 5;
121
206
  */
122
- AGENT = 4,
207
+ attributes: { [key: string]: string } = {};
208
+
209
+ /**
210
+ * @generated from field: required livekit.proto.ParticipantKind kind = 6;
211
+ */
212
+ kind?: ParticipantKind;
213
+
214
+ /**
215
+ * @generated from field: required livekit.proto.DisconnectReason disconnect_reason = 7;
216
+ */
217
+ disconnectReason?: DisconnectReason;
218
+
219
+ constructor(data?: PartialMessage<ParticipantInfo>) {
220
+ super();
221
+ proto2.util.initPartial(data, this);
222
+ }
223
+
224
+ static readonly runtime: typeof proto2 = proto2;
225
+ static readonly typeName = "livekit.proto.ParticipantInfo";
226
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
227
+ { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
228
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
229
+ { no: 3, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
230
+ { no: 4, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
231
+ { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
232
+ { no: 6, name: "kind", kind: "enum", T: proto2.getEnumType(ParticipantKind), req: true },
233
+ { no: 7, name: "disconnect_reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), req: true },
234
+ ]);
235
+
236
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantInfo {
237
+ return new ParticipantInfo().fromBinary(bytes, options);
238
+ }
239
+
240
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantInfo {
241
+ return new ParticipantInfo().fromJson(jsonValue, options);
242
+ }
243
+
244
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantInfo {
245
+ return new ParticipantInfo().fromJsonString(jsonString, options);
246
+ }
247
+
248
+ static equals(a: ParticipantInfo | PlainMessage<ParticipantInfo> | undefined, b: ParticipantInfo | PlainMessage<ParticipantInfo> | undefined): boolean {
249
+ return proto2.util.equals(ParticipantInfo, a, b);
250
+ }
123
251
  }
124
252
 
125
253
  /**
126
- * Describes the enum livekit.proto.ParticipantKind.
254
+ * @generated from message livekit.proto.OwnedParticipant
127
255
  */
128
- export const ParticipantKindSchema: GenEnum<ParticipantKind> = /*@__PURE__*/
129
- enumDesc(file_participant, 0);
256
+ export class OwnedParticipant extends Message<OwnedParticipant> {
257
+ /**
258
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
259
+ */
260
+ handle?: FfiOwnedHandle;
261
+
262
+ /**
263
+ * @generated from field: required livekit.proto.ParticipantInfo info = 2;
264
+ */
265
+ info?: ParticipantInfo;
266
+
267
+ constructor(data?: PartialMessage<OwnedParticipant>) {
268
+ super();
269
+ proto2.util.initPartial(data, this);
270
+ }
271
+
272
+ static readonly runtime: typeof proto2 = proto2;
273
+ static readonly typeName = "livekit.proto.OwnedParticipant";
274
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
275
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
276
+ { no: 2, name: "info", kind: "message", T: ParticipantInfo, req: true },
277
+ ]);
278
+
279
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedParticipant {
280
+ return new OwnedParticipant().fromBinary(bytes, options);
281
+ }
282
+
283
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedParticipant {
284
+ return new OwnedParticipant().fromJson(jsonValue, options);
285
+ }
286
+
287
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedParticipant {
288
+ return new OwnedParticipant().fromJsonString(jsonString, options);
289
+ }
290
+
291
+ static equals(a: OwnedParticipant | PlainMessage<OwnedParticipant> | undefined, b: OwnedParticipant | PlainMessage<OwnedParticipant> | undefined): boolean {
292
+ return proto2.util.equals(OwnedParticipant, a, b);
293
+ }
294
+ }
130
295