@livekit/rtc-node 0.12.2 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) 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 +2 -3
  4. package/dist/audio_frame.d.ts +2 -3
  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 +2 -3
  11. package/dist/audio_resampler.d.ts +2 -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 +3 -3
  18. package/dist/audio_source.d.ts +3 -3
  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 +2 -3
  25. package/dist/audio_stream.d.ts +2 -3
  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 +5 -6
  32. package/dist/e2ee.d.ts +5 -6
  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 +10 -10
  39. package/dist/ffi_client.d.ts +10 -10
  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 +6 -35
  46. package/dist/index.d.ts +6 -35
  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.ts +5 -5
  52. package/dist/native.d.ts +5 -5
  53. package/dist/participant.cjs +60 -36
  54. package/dist/participant.cjs.map +1 -1
  55. package/dist/participant.d.cts +11 -11
  56. package/dist/participant.d.ts +11 -11
  57. package/dist/participant.d.ts.map +1 -1
  58. package/dist/participant.js +78 -52
  59. package/dist/participant.js.map +1 -1
  60. package/dist/proto/audio_frame_pb.cjs +977 -125
  61. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  62. package/dist/proto/audio_frame_pb.d.cts +502 -417
  63. package/dist/proto/audio_frame_pb.d.ts +502 -417
  64. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  65. package/dist/proto/audio_frame_pb.js +943 -85
  66. package/dist/proto/audio_frame_pb.js.map +1 -1
  67. package/dist/proto/e2ee_pb.cjs +700 -85
  68. package/dist/proto/e2ee_pb.cjs.map +1 -1
  69. package/dist/proto/e2ee_pb.d.cts +331 -263
  70. package/dist/proto/e2ee_pb.d.ts +331 -263
  71. package/dist/proto/e2ee_pb.d.ts.map +1 -1
  72. package/dist/proto/e2ee_pb.js +675 -57
  73. package/dist/proto/e2ee_pb.js.map +1 -1
  74. package/dist/proto/ffi_pb.cjs +369 -36
  75. package/dist/proto/ffi_pb.cjs.map +1 -1
  76. package/dist/proto/ffi_pb.d.cts +156 -109
  77. package/dist/proto/ffi_pb.d.ts +156 -109
  78. package/dist/proto/ffi_pb.d.ts.map +1 -1
  79. package/dist/proto/ffi_pb.js +364 -29
  80. package/dist/proto/ffi_pb.js.map +1 -1
  81. package/dist/proto/handle_pb.cjs +27 -7
  82. package/dist/proto/handle_pb.cjs.map +1 -1
  83. package/dist/proto/handle_pb.d.cts +13 -15
  84. package/dist/proto/handle_pb.d.ts +13 -15
  85. package/dist/proto/handle_pb.d.ts.map +1 -1
  86. package/dist/proto/handle_pb.js +26 -5
  87. package/dist/proto/handle_pb.js.map +1 -1
  88. package/dist/proto/participant_pb.cjs +112 -15
  89. package/dist/proto/participant_pb.cjs.map +1 -1
  90. package/dist/proto/participant_pb.d.cts +140 -52
  91. package/dist/proto/participant_pb.d.ts +140 -52
  92. package/dist/proto/participant_pb.d.ts.map +1 -1
  93. package/dist/proto/participant_pb.js +109 -11
  94. package/dist/proto/participant_pb.js.map +1 -1
  95. package/dist/proto/room_pb.cjs +2693 -302
  96. package/dist/proto/room_pb.cjs.map +1 -1
  97. package/dist/proto/room_pb.d.cts +1265 -862
  98. package/dist/proto/room_pb.d.ts +1265 -862
  99. package/dist/proto/room_pb.d.ts.map +1 -1
  100. package/dist/proto/room_pb.js +2603 -210
  101. package/dist/proto/room_pb.js.map +1 -1
  102. package/dist/proto/rpc_pb.cjs +302 -37
  103. package/dist/proto/rpc_pb.cjs.map +1 -1
  104. package/dist/proto/rpc_pb.d.cts +138 -108
  105. package/dist/proto/rpc_pb.d.ts +138 -108
  106. package/dist/proto/rpc_pb.d.ts.map +1 -1
  107. package/dist/proto/rpc_pb.js +291 -25
  108. package/dist/proto/rpc_pb.js.map +1 -1
  109. package/dist/proto/stats_pb.cjs +1253 -139
  110. package/dist/proto/stats_pb.cjs.map +1 -1
  111. package/dist/proto/stats_pb.d.cts +803 -692
  112. package/dist/proto/stats_pb.d.ts +803 -692
  113. package/dist/proto/stats_pb.d.ts.map +1 -1
  114. package/dist/proto/stats_pb.js +1216 -93
  115. package/dist/proto/stats_pb.js.map +1 -1
  116. package/dist/proto/track_pb.cjs +462 -64
  117. package/dist/proto/track_pb.cjs.map +1 -1
  118. package/dist/proto/track_pb.d.cts +250 -218
  119. package/dist/proto/track_pb.d.ts +250 -218
  120. package/dist/proto/track_pb.d.ts.map +1 -1
  121. package/dist/proto/track_pb.js +447 -45
  122. package/dist/proto/track_pb.js.map +1 -1
  123. package/dist/proto/track_publication_pb.cjs +130 -0
  124. package/dist/proto/track_publication_pb.cjs.map +1 -0
  125. package/dist/proto/track_publication_pb.d.cts +80 -0
  126. package/dist/proto/track_publication_pb.d.ts +80 -0
  127. package/dist/proto/track_publication_pb.d.ts.map +1 -0
  128. package/dist/proto/track_publication_pb.js +103 -0
  129. package/dist/proto/track_publication_pb.js.map +1 -0
  130. package/dist/proto/video_frame_pb.cjs +648 -88
  131. package/dist/proto/video_frame_pb.cjs.map +1 -1
  132. package/dist/proto/video_frame_pb.d.cts +371 -328
  133. package/dist/proto/video_frame_pb.d.ts +371 -328
  134. package/dist/proto/video_frame_pb.d.ts.map +1 -1
  135. package/dist/proto/video_frame_pb.js +626 -60
  136. package/dist/proto/video_frame_pb.js.map +1 -1
  137. package/dist/room.cjs +85 -125
  138. package/dist/room.cjs.map +1 -1
  139. package/dist/room.d.cts +6 -17
  140. package/dist/room.d.ts +6 -17
  141. package/dist/room.d.ts.map +1 -1
  142. package/dist/room.js +85 -123
  143. package/dist/room.js.map +1 -1
  144. package/dist/rpc.cjs.map +1 -1
  145. package/dist/rpc.d.cts +0 -1
  146. package/dist/rpc.d.ts +0 -1
  147. package/dist/rpc.js.map +1 -1
  148. package/dist/track.cjs +12 -8
  149. package/dist/track.cjs.map +1 -1
  150. package/dist/track.d.cts +8 -9
  151. package/dist/track.d.ts +8 -9
  152. package/dist/track.d.ts.map +1 -1
  153. package/dist/track.js +13 -9
  154. package/dist/track.js.map +1 -1
  155. package/dist/track_publication.cjs +21 -12
  156. package/dist/track_publication.cjs.map +1 -1
  157. package/dist/track_publication.d.cts +12 -13
  158. package/dist/track_publication.d.ts +12 -13
  159. package/dist/track_publication.d.ts.map +1 -1
  160. package/dist/track_publication.js +22 -13
  161. package/dist/track_publication.js.map +1 -1
  162. package/dist/version.cjs +1 -1
  163. package/dist/version.cjs.map +1 -1
  164. package/dist/version.d.cts +1 -1
  165. package/dist/version.d.ts +1 -1
  166. package/dist/version.js +1 -1
  167. package/dist/version.js.map +1 -1
  168. package/dist/video_frame.cjs +26 -45
  169. package/dist/video_frame.cjs.map +1 -1
  170. package/dist/video_frame.d.cts +2 -3
  171. package/dist/video_frame.d.ts +2 -3
  172. package/dist/video_frame.d.ts.map +1 -1
  173. package/dist/video_frame.js +29 -48
  174. package/dist/video_frame.js.map +1 -1
  175. package/dist/video_source.cjs +7 -4
  176. package/dist/video_source.cjs.map +1 -1
  177. package/dist/video_source.d.cts +4 -4
  178. package/dist/video_source.d.ts +4 -4
  179. package/dist/video_source.d.ts.map +1 -1
  180. package/dist/video_source.js +9 -6
  181. package/dist/video_source.js.map +1 -1
  182. package/dist/video_stream.cjs +16 -5
  183. package/dist/video_stream.cjs.map +1 -1
  184. package/dist/video_stream.d.cts +3 -4
  185. package/dist/video_stream.d.ts +3 -4
  186. package/dist/video_stream.d.ts.map +1 -1
  187. package/dist/video_stream.js +17 -6
  188. package/dist/video_stream.js.map +1 -1
  189. package/package.json +9 -9
  190. package/src/audio_frame.ts +10 -10
  191. package/src/audio_resampler.ts +15 -13
  192. package/src/audio_source.ts +11 -8
  193. package/src/audio_stream.ts +3 -4
  194. package/src/e2ee.ts +41 -42
  195. package/src/ffi_client.ts +8 -16
  196. package/src/index.ts +5 -68
  197. package/src/napi/native.d.ts +5 -5
  198. package/src/participant.ts +102 -73
  199. package/src/proto/audio_frame_pb.ts +1220 -496
  200. package/src/proto/e2ee_pb.ts +858 -337
  201. package/src/proto/ffi_pb.ts +442 -135
  202. package/src/proto/handle_pb.ts +33 -19
  203. package/src/proto/participant_pb.ts +225 -60
  204. package/src/proto/room_pb.ts +3149 -1013
  205. package/src/proto/rpc_pb.ts +358 -129
  206. package/src/proto/stats_pb.ts +1891 -877
  207. package/src/proto/track_pb.ts +587 -253
  208. package/src/proto/track_publication_pb.ts +180 -0
  209. package/src/proto/video_frame_pb.ts +861 -394
  210. package/src/room.ts +137 -189
  211. package/src/rpc.ts +1 -1
  212. package/src/track.ts +16 -17
  213. package/src/track_publication.ts +25 -26
  214. package/src/version.ts +1 -1
  215. package/src/video_frame.ts +48 -72
  216. package/src/video_source.ts +11 -8
  217. package/src/video_stream.ts +18 -8
@@ -12,253 +12,526 @@
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 track.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 { EncryptionType } from "./e2ee_pb.js";
22
- import { file_e2ee } from "./e2ee_pb.js";
23
- import type { FfiOwnedHandle } from "./handle_pb.js";
24
- import { file_handle } from "./handle_pb.js";
25
- import type { RtcStats } from "./stats_pb.js";
26
- import { file_stats } from "./stats_pb.js";
27
- 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 { RtcStats } from "./stats_pb.js";
23
+ import { EncryptionType } from "./e2ee_pb.js";
24
+ import { FfiOwnedHandle } from "./handle_pb.js";
28
25
 
29
26
  /**
30
- * Describes the file track.proto.
27
+ * @generated from enum livekit.proto.TrackKind
28
+ */
29
+ export enum TrackKind {
30
+ /**
31
+ * @generated from enum value: KIND_UNKNOWN = 0;
32
+ */
33
+ KIND_UNKNOWN = 0,
34
+
35
+ /**
36
+ * @generated from enum value: KIND_AUDIO = 1;
37
+ */
38
+ KIND_AUDIO = 1,
39
+
40
+ /**
41
+ * @generated from enum value: KIND_VIDEO = 2;
42
+ */
43
+ KIND_VIDEO = 2,
44
+ }
45
+ // Retrieve enum metadata with: proto2.getEnumType(TrackKind)
46
+ proto2.util.setEnumType(TrackKind, "livekit.proto.TrackKind", [
47
+ { no: 0, name: "KIND_UNKNOWN" },
48
+ { no: 1, name: "KIND_AUDIO" },
49
+ { no: 2, name: "KIND_VIDEO" },
50
+ ]);
51
+
52
+ /**
53
+ * @generated from enum livekit.proto.TrackSource
31
54
  */
32
- export const file_track: GenFile = /*@__PURE__*/
33
- fileDesc("Cgt0cmFjay5wcm90bxINbGl2ZWtpdC5wcm90byI+ChdDcmVhdGVWaWRlb1RyYWNrUmVxdWVzdBIMCgRuYW1lGAEgAigJEhUKDXNvdXJjZV9oYW5kbGUYAiACKAQiRAoYQ3JlYXRlVmlkZW9UcmFja1Jlc3BvbnNlEigKBXRyYWNrGAEgAigLMhkubGl2ZWtpdC5wcm90by5Pd25lZFRyYWNrIj4KF0NyZWF0ZUF1ZGlvVHJhY2tSZXF1ZXN0EgwKBG5hbWUYASACKAkSFQoNc291cmNlX2hhbmRsZRgCIAIoBCJEChhDcmVhdGVBdWRpb1RyYWNrUmVzcG9uc2USKAoFdHJhY2sYASACKAsyGS5saXZla2l0LnByb3RvLk93bmVkVHJhY2siJwoPR2V0U3RhdHNSZXF1ZXN0EhQKDHRyYWNrX2hhbmRsZRgBIAIoBCIkChBHZXRTdGF0c1Jlc3BvbnNlEhAKCGFzeW5jX2lkGAEgAigEIlsKEEdldFN0YXRzQ2FsbGJhY2sSEAoIYXN5bmNfaWQYASACKAQSDQoFZXJyb3IYAiABKAkSJgoFc3RhdHMYAyADKAsyFy5saXZla2l0LnByb3RvLlJ0Y1N0YXRzIgwKClRyYWNrRXZlbnQiowIKFFRyYWNrUHVibGljYXRpb25JbmZvEgsKA3NpZBgBIAIoCRIMCgRuYW1lGAIgAigJEiYKBGtpbmQYAyACKA4yGC5saXZla2l0LnByb3RvLlRyYWNrS2luZBIqCgZzb3VyY2UYBCACKA4yGi5saXZla2l0LnByb3RvLlRyYWNrU291cmNlEhMKC3NpbXVsY2FzdGVkGAUgAigIEg0KBXdpZHRoGAYgAigNEg4KBmhlaWdodBgHIAIoDRIRCgltaW1lX3R5cGUYCCACKAkSDQoFbXV0ZWQYCSACKAgSDgoGcmVtb3RlGAogAigIEjYKD2VuY3J5cHRpb25fdHlwZRgLIAIoDjIdLmxpdmVraXQucHJvdG8uRW5jcnlwdGlvblR5cGUieQoVT3duZWRUcmFja1B1YmxpY2F0aW9uEi0KBmhhbmRsZRgBIAIoCzIdLmxpdmVraXQucHJvdG8uRmZpT3duZWRIYW5kbGUSMQoEaW5mbxgCIAIoCzIjLmxpdmVraXQucHJvdG8uVHJhY2tQdWJsaWNhdGlvbkluZm8inwEKCVRyYWNrSW5mbxILCgNzaWQYASACKAkSDAoEbmFtZRgCIAIoCRImCgRraW5kGAMgAigOMhgubGl2ZWtpdC5wcm90by5UcmFja0tpbmQSMAoMc3RyZWFtX3N0YXRlGAQgAigOMhoubGl2ZWtpdC5wcm90by5TdHJlYW1TdGF0ZRINCgVtdXRlZBgFIAIoCBIOCgZyZW1vdGUYBiACKAgiYwoKT3duZWRUcmFjaxItCgZoYW5kbGUYASACKAsyHS5saXZla2l0LnByb3RvLkZmaU93bmVkSGFuZGxlEiYKBGluZm8YAiACKAsyGC5saXZla2l0LnByb3RvLlRyYWNrSW5mbyI7ChVMb2NhbFRyYWNrTXV0ZVJlcXVlc3QSFAoMdHJhY2tfaGFuZGxlGAEgAigEEgwKBG11dGUYAiACKAgiJwoWTG9jYWxUcmFja011dGVSZXNwb25zZRINCgVtdXRlZBgBIAIoCCJBChhFbmFibGVSZW1vdGVUcmFja1JlcXVlc3QSFAoMdHJhY2tfaGFuZGxlGAEgAigEEg8KB2VuYWJsZWQYAiACKAgiLAoZRW5hYmxlUmVtb3RlVHJhY2tSZXNwb25zZRIPCgdlbmFibGVkGAEgAigIKj0KCVRyYWNrS2luZBIQCgxLSU5EX1VOS05PV04QABIOCgpLSU5EX0FVRElPEAESDgoKS0lORF9WSURFTxACKoEBCgtUcmFja1NvdXJjZRISCg5TT1VSQ0VfVU5LTk9XThAAEhEKDVNPVVJDRV9DQU1FUkEQARIVChFTT1VSQ0VfTUlDUk9QSE9ORRACEhYKElNPVVJDRV9TQ1JFRU5TSEFSRRADEhwKGFNPVVJDRV9TQ1JFRU5TSEFSRV9BVURJTxAEKkQKC1N0cmVhbVN0YXRlEhEKDVNUQVRFX1VOS05PV04QABIQCgxTVEFURV9BQ1RJVkUQARIQCgxTVEFURV9QQVVTRUQQAkIQqgINTGl2ZUtpdC5Qcm90bw", [file_e2ee, file_handle, file_stats]);
55
+ export enum TrackSource {
56
+ /**
57
+ * @generated from enum value: SOURCE_UNKNOWN = 0;
58
+ */
59
+ SOURCE_UNKNOWN = 0,
60
+
61
+ /**
62
+ * @generated from enum value: SOURCE_CAMERA = 1;
63
+ */
64
+ SOURCE_CAMERA = 1,
65
+
66
+ /**
67
+ * @generated from enum value: SOURCE_MICROPHONE = 2;
68
+ */
69
+ SOURCE_MICROPHONE = 2,
70
+
71
+ /**
72
+ * @generated from enum value: SOURCE_SCREENSHARE = 3;
73
+ */
74
+ SOURCE_SCREENSHARE = 3,
75
+
76
+ /**
77
+ * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
78
+ */
79
+ SOURCE_SCREENSHARE_AUDIO = 4,
80
+ }
81
+ // Retrieve enum metadata with: proto2.getEnumType(TrackSource)
82
+ proto2.util.setEnumType(TrackSource, "livekit.proto.TrackSource", [
83
+ { no: 0, name: "SOURCE_UNKNOWN" },
84
+ { no: 1, name: "SOURCE_CAMERA" },
85
+ { no: 2, name: "SOURCE_MICROPHONE" },
86
+ { no: 3, name: "SOURCE_SCREENSHARE" },
87
+ { no: 4, name: "SOURCE_SCREENSHARE_AUDIO" },
88
+ ]);
89
+
90
+ /**
91
+ * @generated from enum livekit.proto.StreamState
92
+ */
93
+ export enum StreamState {
94
+ /**
95
+ * @generated from enum value: STATE_UNKNOWN = 0;
96
+ */
97
+ STATE_UNKNOWN = 0,
98
+
99
+ /**
100
+ * @generated from enum value: STATE_ACTIVE = 1;
101
+ */
102
+ STATE_ACTIVE = 1,
103
+
104
+ /**
105
+ * @generated from enum value: STATE_PAUSED = 2;
106
+ */
107
+ STATE_PAUSED = 2,
108
+ }
109
+ // Retrieve enum metadata with: proto2.getEnumType(StreamState)
110
+ proto2.util.setEnumType(StreamState, "livekit.proto.StreamState", [
111
+ { no: 0, name: "STATE_UNKNOWN" },
112
+ { no: 1, name: "STATE_ACTIVE" },
113
+ { no: 2, name: "STATE_PAUSED" },
114
+ ]);
34
115
 
35
116
  /**
36
117
  * Create a new VideoTrack from a VideoSource
37
118
  *
38
119
  * @generated from message livekit.proto.CreateVideoTrackRequest
39
120
  */
40
- export type CreateVideoTrackRequest = Message<"livekit.proto.CreateVideoTrackRequest"> & {
121
+ export class CreateVideoTrackRequest extends Message<CreateVideoTrackRequest> {
41
122
  /**
42
123
  * @generated from field: required string name = 1;
43
124
  */
44
- name: string;
125
+ name?: string;
45
126
 
46
127
  /**
47
128
  * @generated from field: required uint64 source_handle = 2;
48
129
  */
49
- sourceHandle: bigint;
50
- };
130
+ sourceHandle?: bigint;
51
131
 
52
- /**
53
- * Describes the message livekit.proto.CreateVideoTrackRequest.
54
- * Use `create(CreateVideoTrackRequestSchema)` to create a new message.
55
- */
56
- export const CreateVideoTrackRequestSchema: GenMessage<CreateVideoTrackRequest> = /*@__PURE__*/
57
- messageDesc(file_track, 0);
132
+ constructor(data?: PartialMessage<CreateVideoTrackRequest>) {
133
+ super();
134
+ proto2.util.initPartial(data, this);
135
+ }
136
+
137
+ static readonly runtime: typeof proto2 = proto2;
138
+ static readonly typeName = "livekit.proto.CreateVideoTrackRequest";
139
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
140
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
141
+ { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
142
+ ]);
143
+
144
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackRequest {
145
+ return new CreateVideoTrackRequest().fromBinary(bytes, options);
146
+ }
147
+
148
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest {
149
+ return new CreateVideoTrackRequest().fromJson(jsonValue, options);
150
+ }
151
+
152
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest {
153
+ return new CreateVideoTrackRequest().fromJsonString(jsonString, options);
154
+ }
155
+
156
+ static equals(a: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined, b: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined): boolean {
157
+ return proto2.util.equals(CreateVideoTrackRequest, a, b);
158
+ }
159
+ }
58
160
 
59
161
  /**
60
162
  * @generated from message livekit.proto.CreateVideoTrackResponse
61
163
  */
62
- export type CreateVideoTrackResponse = Message<"livekit.proto.CreateVideoTrackResponse"> & {
164
+ export class CreateVideoTrackResponse extends Message<CreateVideoTrackResponse> {
63
165
  /**
64
166
  * @generated from field: required livekit.proto.OwnedTrack track = 1;
65
167
  */
66
168
  track?: OwnedTrack;
67
- };
68
169
 
69
- /**
70
- * Describes the message livekit.proto.CreateVideoTrackResponse.
71
- * Use `create(CreateVideoTrackResponseSchema)` to create a new message.
72
- */
73
- export const CreateVideoTrackResponseSchema: GenMessage<CreateVideoTrackResponse> = /*@__PURE__*/
74
- messageDesc(file_track, 1);
170
+ constructor(data?: PartialMessage<CreateVideoTrackResponse>) {
171
+ super();
172
+ proto2.util.initPartial(data, this);
173
+ }
174
+
175
+ static readonly runtime: typeof proto2 = proto2;
176
+ static readonly typeName = "livekit.proto.CreateVideoTrackResponse";
177
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
178
+ { no: 1, name: "track", kind: "message", T: OwnedTrack, req: true },
179
+ ]);
180
+
181
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackResponse {
182
+ return new CreateVideoTrackResponse().fromBinary(bytes, options);
183
+ }
184
+
185
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse {
186
+ return new CreateVideoTrackResponse().fromJson(jsonValue, options);
187
+ }
188
+
189
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse {
190
+ return new CreateVideoTrackResponse().fromJsonString(jsonString, options);
191
+ }
192
+
193
+ static equals(a: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined, b: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined): boolean {
194
+ return proto2.util.equals(CreateVideoTrackResponse, a, b);
195
+ }
196
+ }
75
197
 
76
198
  /**
77
199
  * Create a new AudioTrack from a AudioSource
78
200
  *
79
201
  * @generated from message livekit.proto.CreateAudioTrackRequest
80
202
  */
81
- export type CreateAudioTrackRequest = Message<"livekit.proto.CreateAudioTrackRequest"> & {
203
+ export class CreateAudioTrackRequest extends Message<CreateAudioTrackRequest> {
82
204
  /**
83
205
  * @generated from field: required string name = 1;
84
206
  */
85
- name: string;
207
+ name?: string;
86
208
 
87
209
  /**
88
210
  * @generated from field: required uint64 source_handle = 2;
89
211
  */
90
- sourceHandle: bigint;
91
- };
212
+ sourceHandle?: bigint;
92
213
 
93
- /**
94
- * Describes the message livekit.proto.CreateAudioTrackRequest.
95
- * Use `create(CreateAudioTrackRequestSchema)` to create a new message.
96
- */
97
- export const CreateAudioTrackRequestSchema: GenMessage<CreateAudioTrackRequest> = /*@__PURE__*/
98
- messageDesc(file_track, 2);
214
+ constructor(data?: PartialMessage<CreateAudioTrackRequest>) {
215
+ super();
216
+ proto2.util.initPartial(data, this);
217
+ }
218
+
219
+ static readonly runtime: typeof proto2 = proto2;
220
+ static readonly typeName = "livekit.proto.CreateAudioTrackRequest";
221
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
222
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
223
+ { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
224
+ ]);
225
+
226
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackRequest {
227
+ return new CreateAudioTrackRequest().fromBinary(bytes, options);
228
+ }
229
+
230
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest {
231
+ return new CreateAudioTrackRequest().fromJson(jsonValue, options);
232
+ }
233
+
234
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest {
235
+ return new CreateAudioTrackRequest().fromJsonString(jsonString, options);
236
+ }
237
+
238
+ static equals(a: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined, b: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined): boolean {
239
+ return proto2.util.equals(CreateAudioTrackRequest, a, b);
240
+ }
241
+ }
99
242
 
100
243
  /**
101
244
  * @generated from message livekit.proto.CreateAudioTrackResponse
102
245
  */
103
- export type CreateAudioTrackResponse = Message<"livekit.proto.CreateAudioTrackResponse"> & {
246
+ export class CreateAudioTrackResponse extends Message<CreateAudioTrackResponse> {
104
247
  /**
105
248
  * @generated from field: required livekit.proto.OwnedTrack track = 1;
106
249
  */
107
250
  track?: OwnedTrack;
108
- };
109
251
 
110
- /**
111
- * Describes the message livekit.proto.CreateAudioTrackResponse.
112
- * Use `create(CreateAudioTrackResponseSchema)` to create a new message.
113
- */
114
- export const CreateAudioTrackResponseSchema: GenMessage<CreateAudioTrackResponse> = /*@__PURE__*/
115
- messageDesc(file_track, 3);
252
+ constructor(data?: PartialMessage<CreateAudioTrackResponse>) {
253
+ super();
254
+ proto2.util.initPartial(data, this);
255
+ }
256
+
257
+ static readonly runtime: typeof proto2 = proto2;
258
+ static readonly typeName = "livekit.proto.CreateAudioTrackResponse";
259
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
260
+ { no: 1, name: "track", kind: "message", T: OwnedTrack, req: true },
261
+ ]);
262
+
263
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackResponse {
264
+ return new CreateAudioTrackResponse().fromBinary(bytes, options);
265
+ }
266
+
267
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse {
268
+ return new CreateAudioTrackResponse().fromJson(jsonValue, options);
269
+ }
270
+
271
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse {
272
+ return new CreateAudioTrackResponse().fromJsonString(jsonString, options);
273
+ }
274
+
275
+ static equals(a: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined, b: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined): boolean {
276
+ return proto2.util.equals(CreateAudioTrackResponse, a, b);
277
+ }
278
+ }
116
279
 
117
280
  /**
118
281
  * @generated from message livekit.proto.GetStatsRequest
119
282
  */
120
- export type GetStatsRequest = Message<"livekit.proto.GetStatsRequest"> & {
283
+ export class GetStatsRequest extends Message<GetStatsRequest> {
121
284
  /**
122
285
  * @generated from field: required uint64 track_handle = 1;
123
286
  */
124
- trackHandle: bigint;
125
- };
287
+ trackHandle?: bigint;
126
288
 
127
- /**
128
- * Describes the message livekit.proto.GetStatsRequest.
129
- * Use `create(GetStatsRequestSchema)` to create a new message.
130
- */
131
- export const GetStatsRequestSchema: GenMessage<GetStatsRequest> = /*@__PURE__*/
132
- messageDesc(file_track, 4);
289
+ constructor(data?: PartialMessage<GetStatsRequest>) {
290
+ super();
291
+ proto2.util.initPartial(data, this);
292
+ }
293
+
294
+ static readonly runtime: typeof proto2 = proto2;
295
+ static readonly typeName = "livekit.proto.GetStatsRequest";
296
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
297
+ { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
298
+ ]);
299
+
300
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsRequest {
301
+ return new GetStatsRequest().fromBinary(bytes, options);
302
+ }
303
+
304
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsRequest {
305
+ return new GetStatsRequest().fromJson(jsonValue, options);
306
+ }
307
+
308
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsRequest {
309
+ return new GetStatsRequest().fromJsonString(jsonString, options);
310
+ }
311
+
312
+ static equals(a: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined, b: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined): boolean {
313
+ return proto2.util.equals(GetStatsRequest, a, b);
314
+ }
315
+ }
133
316
 
134
317
  /**
135
318
  * @generated from message livekit.proto.GetStatsResponse
136
319
  */
137
- export type GetStatsResponse = Message<"livekit.proto.GetStatsResponse"> & {
320
+ export class GetStatsResponse extends Message<GetStatsResponse> {
138
321
  /**
139
322
  * @generated from field: required uint64 async_id = 1;
140
323
  */
141
- asyncId: bigint;
142
- };
324
+ asyncId?: bigint;
143
325
 
144
- /**
145
- * Describes the message livekit.proto.GetStatsResponse.
146
- * Use `create(GetStatsResponseSchema)` to create a new message.
147
- */
148
- export const GetStatsResponseSchema: GenMessage<GetStatsResponse> = /*@__PURE__*/
149
- messageDesc(file_track, 5);
326
+ constructor(data?: PartialMessage<GetStatsResponse>) {
327
+ super();
328
+ proto2.util.initPartial(data, this);
329
+ }
330
+
331
+ static readonly runtime: typeof proto2 = proto2;
332
+ static readonly typeName = "livekit.proto.GetStatsResponse";
333
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
334
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
335
+ ]);
336
+
337
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsResponse {
338
+ return new GetStatsResponse().fromBinary(bytes, options);
339
+ }
340
+
341
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsResponse {
342
+ return new GetStatsResponse().fromJson(jsonValue, options);
343
+ }
344
+
345
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsResponse {
346
+ return new GetStatsResponse().fromJsonString(jsonString, options);
347
+ }
348
+
349
+ static equals(a: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined, b: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined): boolean {
350
+ return proto2.util.equals(GetStatsResponse, a, b);
351
+ }
352
+ }
150
353
 
151
354
  /**
152
355
  * @generated from message livekit.proto.GetStatsCallback
153
356
  */
154
- export type GetStatsCallback = Message<"livekit.proto.GetStatsCallback"> & {
357
+ export class GetStatsCallback extends Message<GetStatsCallback> {
155
358
  /**
156
359
  * @generated from field: required uint64 async_id = 1;
157
360
  */
158
- asyncId: bigint;
361
+ asyncId?: bigint;
159
362
 
160
363
  /**
161
364
  * @generated from field: optional string error = 2;
162
365
  */
163
- error: string;
366
+ error?: string;
164
367
 
165
368
  /**
166
369
  * @generated from field: repeated livekit.proto.RtcStats stats = 3;
167
370
  */
168
- stats: RtcStats[];
169
- };
371
+ stats: RtcStats[] = [];
170
372
 
171
- /**
172
- * Describes the message livekit.proto.GetStatsCallback.
173
- * Use `create(GetStatsCallbackSchema)` to create a new message.
174
- */
175
- export const GetStatsCallbackSchema: GenMessage<GetStatsCallback> = /*@__PURE__*/
176
- messageDesc(file_track, 6);
373
+ constructor(data?: PartialMessage<GetStatsCallback>) {
374
+ super();
375
+ proto2.util.initPartial(data, this);
376
+ }
377
+
378
+ static readonly runtime: typeof proto2 = proto2;
379
+ static readonly typeName = "livekit.proto.GetStatsCallback";
380
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
381
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
382
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
383
+ { no: 3, name: "stats", kind: "message", T: RtcStats, repeated: true },
384
+ ]);
385
+
386
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsCallback {
387
+ return new GetStatsCallback().fromBinary(bytes, options);
388
+ }
389
+
390
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsCallback {
391
+ return new GetStatsCallback().fromJson(jsonValue, options);
392
+ }
393
+
394
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsCallback {
395
+ return new GetStatsCallback().fromJsonString(jsonString, options);
396
+ }
397
+
398
+ static equals(a: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined, b: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined): boolean {
399
+ return proto2.util.equals(GetStatsCallback, a, b);
400
+ }
401
+ }
177
402
 
178
403
  /**
179
404
  * @generated from message livekit.proto.TrackEvent
180
405
  */
181
- export type TrackEvent = Message<"livekit.proto.TrackEvent"> & {
182
- };
406
+ export class TrackEvent extends Message<TrackEvent> {
407
+ constructor(data?: PartialMessage<TrackEvent>) {
408
+ super();
409
+ proto2.util.initPartial(data, this);
410
+ }
183
411
 
184
- /**
185
- * Describes the message livekit.proto.TrackEvent.
186
- * Use `create(TrackEventSchema)` to create a new message.
187
- */
188
- export const TrackEventSchema: GenMessage<TrackEvent> = /*@__PURE__*/
189
- messageDesc(file_track, 7);
412
+ static readonly runtime: typeof proto2 = proto2;
413
+ static readonly typeName = "livekit.proto.TrackEvent";
414
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
415
+ ]);
416
+
417
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackEvent {
418
+ return new TrackEvent().fromBinary(bytes, options);
419
+ }
420
+
421
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackEvent {
422
+ return new TrackEvent().fromJson(jsonValue, options);
423
+ }
424
+
425
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackEvent {
426
+ return new TrackEvent().fromJsonString(jsonString, options);
427
+ }
428
+
429
+ static equals(a: TrackEvent | PlainMessage<TrackEvent> | undefined, b: TrackEvent | PlainMessage<TrackEvent> | undefined): boolean {
430
+ return proto2.util.equals(TrackEvent, a, b);
431
+ }
432
+ }
190
433
 
191
434
  /**
192
435
  * @generated from message livekit.proto.TrackPublicationInfo
193
436
  */
194
- export type TrackPublicationInfo = Message<"livekit.proto.TrackPublicationInfo"> & {
437
+ export class TrackPublicationInfo extends Message<TrackPublicationInfo> {
195
438
  /**
196
439
  * @generated from field: required string sid = 1;
197
440
  */
198
- sid: string;
441
+ sid?: string;
199
442
 
200
443
  /**
201
444
  * @generated from field: required string name = 2;
202
445
  */
203
- name: string;
446
+ name?: string;
204
447
 
205
448
  /**
206
449
  * @generated from field: required livekit.proto.TrackKind kind = 3;
207
450
  */
208
- kind: TrackKind;
451
+ kind?: TrackKind;
209
452
 
210
453
  /**
211
454
  * @generated from field: required livekit.proto.TrackSource source = 4;
212
455
  */
213
- source: TrackSource;
456
+ source?: TrackSource;
214
457
 
215
458
  /**
216
459
  * @generated from field: required bool simulcasted = 5;
217
460
  */
218
- simulcasted: boolean;
461
+ simulcasted?: boolean;
219
462
 
220
463
  /**
221
464
  * @generated from field: required uint32 width = 6;
222
465
  */
223
- width: number;
466
+ width?: number;
224
467
 
225
468
  /**
226
469
  * @generated from field: required uint32 height = 7;
227
470
  */
228
- height: number;
471
+ height?: number;
229
472
 
230
473
  /**
231
474
  * @generated from field: required string mime_type = 8;
232
475
  */
233
- mimeType: string;
476
+ mimeType?: string;
234
477
 
235
478
  /**
236
479
  * @generated from field: required bool muted = 9;
237
480
  */
238
- muted: boolean;
481
+ muted?: boolean;
239
482
 
240
483
  /**
241
484
  * @generated from field: required bool remote = 10;
242
485
  */
243
- remote: boolean;
486
+ remote?: boolean;
244
487
 
245
488
  /**
246
489
  * @generated from field: required livekit.proto.EncryptionType encryption_type = 11;
247
490
  */
248
- encryptionType: EncryptionType;
249
- };
250
-
251
- /**
252
- * Describes the message livekit.proto.TrackPublicationInfo.
253
- * Use `create(TrackPublicationInfoSchema)` to create a new message.
254
- */
255
- export const TrackPublicationInfoSchema: GenMessage<TrackPublicationInfo> = /*@__PURE__*/
256
- messageDesc(file_track, 8);
491
+ encryptionType?: EncryptionType;
492
+
493
+ constructor(data?: PartialMessage<TrackPublicationInfo>) {
494
+ super();
495
+ proto2.util.initPartial(data, this);
496
+ }
497
+
498
+ static readonly runtime: typeof proto2 = proto2;
499
+ static readonly typeName = "livekit.proto.TrackPublicationInfo";
500
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
501
+ { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
502
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
503
+ { no: 3, name: "kind", kind: "enum", T: proto2.getEnumType(TrackKind), req: true },
504
+ { no: 4, name: "source", kind: "enum", T: proto2.getEnumType(TrackSource), req: true },
505
+ { no: 5, name: "simulcasted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
506
+ { no: 6, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
507
+ { no: 7, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
508
+ { no: 8, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
509
+ { no: 9, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
510
+ { no: 10, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
511
+ { no: 11, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true },
512
+ ]);
513
+
514
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublicationInfo {
515
+ return new TrackPublicationInfo().fromBinary(bytes, options);
516
+ }
517
+
518
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublicationInfo {
519
+ return new TrackPublicationInfo().fromJson(jsonValue, options);
520
+ }
521
+
522
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublicationInfo {
523
+ return new TrackPublicationInfo().fromJsonString(jsonString, options);
524
+ }
525
+
526
+ static equals(a: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined, b: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined): boolean {
527
+ return proto2.util.equals(TrackPublicationInfo, a, b);
528
+ }
529
+ }
257
530
 
258
531
  /**
259
532
  * @generated from message livekit.proto.OwnedTrackPublication
260
533
  */
261
- export type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication"> & {
534
+ export class OwnedTrackPublication extends Message<OwnedTrackPublication> {
262
535
  /**
263
536
  * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
264
537
  */
@@ -268,61 +541,107 @@ export type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication
268
541
  * @generated from field: required livekit.proto.TrackPublicationInfo info = 2;
269
542
  */
270
543
  info?: TrackPublicationInfo;
271
- };
272
544
 
273
- /**
274
- * Describes the message livekit.proto.OwnedTrackPublication.
275
- * Use `create(OwnedTrackPublicationSchema)` to create a new message.
276
- */
277
- export const OwnedTrackPublicationSchema: GenMessage<OwnedTrackPublication> = /*@__PURE__*/
278
- messageDesc(file_track, 9);
545
+ constructor(data?: PartialMessage<OwnedTrackPublication>) {
546
+ super();
547
+ proto2.util.initPartial(data, this);
548
+ }
549
+
550
+ static readonly runtime: typeof proto2 = proto2;
551
+ static readonly typeName = "livekit.proto.OwnedTrackPublication";
552
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
553
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
554
+ { no: 2, name: "info", kind: "message", T: TrackPublicationInfo, req: true },
555
+ ]);
556
+
557
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrackPublication {
558
+ return new OwnedTrackPublication().fromBinary(bytes, options);
559
+ }
560
+
561
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrackPublication {
562
+ return new OwnedTrackPublication().fromJson(jsonValue, options);
563
+ }
564
+
565
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrackPublication {
566
+ return new OwnedTrackPublication().fromJsonString(jsonString, options);
567
+ }
568
+
569
+ static equals(a: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined, b: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined): boolean {
570
+ return proto2.util.equals(OwnedTrackPublication, a, b);
571
+ }
572
+ }
279
573
 
280
574
  /**
281
575
  * @generated from message livekit.proto.TrackInfo
282
576
  */
283
- export type TrackInfo = Message<"livekit.proto.TrackInfo"> & {
577
+ export class TrackInfo extends Message<TrackInfo> {
284
578
  /**
285
579
  * @generated from field: required string sid = 1;
286
580
  */
287
- sid: string;
581
+ sid?: string;
288
582
 
289
583
  /**
290
584
  * @generated from field: required string name = 2;
291
585
  */
292
- name: string;
586
+ name?: string;
293
587
 
294
588
  /**
295
589
  * @generated from field: required livekit.proto.TrackKind kind = 3;
296
590
  */
297
- kind: TrackKind;
591
+ kind?: TrackKind;
298
592
 
299
593
  /**
300
594
  * @generated from field: required livekit.proto.StreamState stream_state = 4;
301
595
  */
302
- streamState: StreamState;
596
+ streamState?: StreamState;
303
597
 
304
598
  /**
305
599
  * @generated from field: required bool muted = 5;
306
600
  */
307
- muted: boolean;
601
+ muted?: boolean;
308
602
 
309
603
  /**
310
604
  * @generated from field: required bool remote = 6;
311
605
  */
312
- remote: boolean;
313
- };
314
-
315
- /**
316
- * Describes the message livekit.proto.TrackInfo.
317
- * Use `create(TrackInfoSchema)` to create a new message.
318
- */
319
- export const TrackInfoSchema: GenMessage<TrackInfo> = /*@__PURE__*/
320
- messageDesc(file_track, 10);
606
+ remote?: boolean;
607
+
608
+ constructor(data?: PartialMessage<TrackInfo>) {
609
+ super();
610
+ proto2.util.initPartial(data, this);
611
+ }
612
+
613
+ static readonly runtime: typeof proto2 = proto2;
614
+ static readonly typeName = "livekit.proto.TrackInfo";
615
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
616
+ { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
617
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
618
+ { no: 3, name: "kind", kind: "enum", T: proto2.getEnumType(TrackKind), req: true },
619
+ { no: 4, name: "stream_state", kind: "enum", T: proto2.getEnumType(StreamState), req: true },
620
+ { no: 5, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
621
+ { no: 6, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
622
+ ]);
623
+
624
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackInfo {
625
+ return new TrackInfo().fromBinary(bytes, options);
626
+ }
627
+
628
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackInfo {
629
+ return new TrackInfo().fromJson(jsonValue, options);
630
+ }
631
+
632
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackInfo {
633
+ return new TrackInfo().fromJsonString(jsonString, options);
634
+ }
635
+
636
+ static equals(a: TrackInfo | PlainMessage<TrackInfo> | undefined, b: TrackInfo | PlainMessage<TrackInfo> | undefined): boolean {
637
+ return proto2.util.equals(TrackInfo, a, b);
638
+ }
639
+ }
321
640
 
322
641
  /**
323
642
  * @generated from message livekit.proto.OwnedTrack
324
643
  */
325
- export type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & {
644
+ export class OwnedTrack extends Message<OwnedTrack> {
326
645
  /**
327
646
  * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
328
647
  */
@@ -332,182 +651,197 @@ export type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & {
332
651
  * @generated from field: required livekit.proto.TrackInfo info = 2;
333
652
  */
334
653
  info?: TrackInfo;
335
- };
336
654
 
337
- /**
338
- * Describes the message livekit.proto.OwnedTrack.
339
- * Use `create(OwnedTrackSchema)` to create a new message.
340
- */
341
- export const OwnedTrackSchema: GenMessage<OwnedTrack> = /*@__PURE__*/
342
- messageDesc(file_track, 11);
655
+ constructor(data?: PartialMessage<OwnedTrack>) {
656
+ super();
657
+ proto2.util.initPartial(data, this);
658
+ }
659
+
660
+ static readonly runtime: typeof proto2 = proto2;
661
+ static readonly typeName = "livekit.proto.OwnedTrack";
662
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
663
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
664
+ { no: 2, name: "info", kind: "message", T: TrackInfo, req: true },
665
+ ]);
666
+
667
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrack {
668
+ return new OwnedTrack().fromBinary(bytes, options);
669
+ }
670
+
671
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrack {
672
+ return new OwnedTrack().fromJson(jsonValue, options);
673
+ }
674
+
675
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrack {
676
+ return new OwnedTrack().fromJsonString(jsonString, options);
677
+ }
678
+
679
+ static equals(a: OwnedTrack | PlainMessage<OwnedTrack> | undefined, b: OwnedTrack | PlainMessage<OwnedTrack> | undefined): boolean {
680
+ return proto2.util.equals(OwnedTrack, a, b);
681
+ }
682
+ }
343
683
 
344
684
  /**
345
685
  * Mute/UnMute a track
346
686
  *
347
687
  * @generated from message livekit.proto.LocalTrackMuteRequest
348
688
  */
349
- export type LocalTrackMuteRequest = Message<"livekit.proto.LocalTrackMuteRequest"> & {
689
+ export class LocalTrackMuteRequest extends Message<LocalTrackMuteRequest> {
350
690
  /**
351
691
  * @generated from field: required uint64 track_handle = 1;
352
692
  */
353
- trackHandle: bigint;
693
+ trackHandle?: bigint;
354
694
 
355
695
  /**
356
696
  * @generated from field: required bool mute = 2;
357
697
  */
358
- mute: boolean;
359
- };
698
+ mute?: boolean;
360
699
 
361
- /**
362
- * Describes the message livekit.proto.LocalTrackMuteRequest.
363
- * Use `create(LocalTrackMuteRequestSchema)` to create a new message.
364
- */
365
- export const LocalTrackMuteRequestSchema: GenMessage<LocalTrackMuteRequest> = /*@__PURE__*/
366
- messageDesc(file_track, 12);
700
+ constructor(data?: PartialMessage<LocalTrackMuteRequest>) {
701
+ super();
702
+ proto2.util.initPartial(data, this);
703
+ }
704
+
705
+ static readonly runtime: typeof proto2 = proto2;
706
+ static readonly typeName = "livekit.proto.LocalTrackMuteRequest";
707
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
708
+ { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
709
+ { no: 2, name: "mute", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
710
+ ]);
711
+
712
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteRequest {
713
+ return new LocalTrackMuteRequest().fromBinary(bytes, options);
714
+ }
715
+
716
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest {
717
+ return new LocalTrackMuteRequest().fromJson(jsonValue, options);
718
+ }
719
+
720
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest {
721
+ return new LocalTrackMuteRequest().fromJsonString(jsonString, options);
722
+ }
723
+
724
+ static equals(a: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined, b: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined): boolean {
725
+ return proto2.util.equals(LocalTrackMuteRequest, a, b);
726
+ }
727
+ }
367
728
 
368
729
  /**
369
730
  * @generated from message livekit.proto.LocalTrackMuteResponse
370
731
  */
371
- export type LocalTrackMuteResponse = Message<"livekit.proto.LocalTrackMuteResponse"> & {
732
+ export class LocalTrackMuteResponse extends Message<LocalTrackMuteResponse> {
372
733
  /**
373
734
  * @generated from field: required bool muted = 1;
374
735
  */
375
- muted: boolean;
376
- };
736
+ muted?: boolean;
377
737
 
378
- /**
379
- * Describes the message livekit.proto.LocalTrackMuteResponse.
380
- * Use `create(LocalTrackMuteResponseSchema)` to create a new message.
381
- */
382
- export const LocalTrackMuteResponseSchema: GenMessage<LocalTrackMuteResponse> = /*@__PURE__*/
383
- messageDesc(file_track, 13);
738
+ constructor(data?: PartialMessage<LocalTrackMuteResponse>) {
739
+ super();
740
+ proto2.util.initPartial(data, this);
741
+ }
742
+
743
+ static readonly runtime: typeof proto2 = proto2;
744
+ static readonly typeName = "livekit.proto.LocalTrackMuteResponse";
745
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
746
+ { no: 1, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
747
+ ]);
748
+
749
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteResponse {
750
+ return new LocalTrackMuteResponse().fromBinary(bytes, options);
751
+ }
752
+
753
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse {
754
+ return new LocalTrackMuteResponse().fromJson(jsonValue, options);
755
+ }
756
+
757
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse {
758
+ return new LocalTrackMuteResponse().fromJsonString(jsonString, options);
759
+ }
760
+
761
+ static equals(a: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined, b: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined): boolean {
762
+ return proto2.util.equals(LocalTrackMuteResponse, a, b);
763
+ }
764
+ }
384
765
 
385
766
  /**
386
767
  * Enable/Disable a remote track
387
768
  *
388
769
  * @generated from message livekit.proto.EnableRemoteTrackRequest
389
770
  */
390
- export type EnableRemoteTrackRequest = Message<"livekit.proto.EnableRemoteTrackRequest"> & {
771
+ export class EnableRemoteTrackRequest extends Message<EnableRemoteTrackRequest> {
391
772
  /**
392
773
  * @generated from field: required uint64 track_handle = 1;
393
774
  */
394
- trackHandle: bigint;
775
+ trackHandle?: bigint;
395
776
 
396
777
  /**
397
778
  * @generated from field: required bool enabled = 2;
398
779
  */
399
- enabled: boolean;
400
- };
780
+ enabled?: boolean;
401
781
 
402
- /**
403
- * Describes the message livekit.proto.EnableRemoteTrackRequest.
404
- * Use `create(EnableRemoteTrackRequestSchema)` to create a new message.
405
- */
406
- export const EnableRemoteTrackRequestSchema: GenMessage<EnableRemoteTrackRequest> = /*@__PURE__*/
407
- messageDesc(file_track, 14);
782
+ constructor(data?: PartialMessage<EnableRemoteTrackRequest>) {
783
+ super();
784
+ proto2.util.initPartial(data, this);
785
+ }
408
786
 
409
- /**
410
- * @generated from message livekit.proto.EnableRemoteTrackResponse
411
- */
412
- export type EnableRemoteTrackResponse = Message<"livekit.proto.EnableRemoteTrackResponse"> & {
413
- /**
414
- * @generated from field: required bool enabled = 1;
415
- */
416
- enabled: boolean;
417
- };
787
+ static readonly runtime: typeof proto2 = proto2;
788
+ static readonly typeName = "livekit.proto.EnableRemoteTrackRequest";
789
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
790
+ { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
791
+ { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
792
+ ]);
418
793
 
419
- /**
420
- * Describes the message livekit.proto.EnableRemoteTrackResponse.
421
- * Use `create(EnableRemoteTrackResponseSchema)` to create a new message.
422
- */
423
- export const EnableRemoteTrackResponseSchema: GenMessage<EnableRemoteTrackResponse> = /*@__PURE__*/
424
- messageDesc(file_track, 15);
794
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackRequest {
795
+ return new EnableRemoteTrackRequest().fromBinary(bytes, options);
796
+ }
425
797
 
426
- /**
427
- * @generated from enum livekit.proto.TrackKind
428
- */
429
- export enum TrackKind {
430
- /**
431
- * @generated from enum value: KIND_UNKNOWN = 0;
432
- */
433
- KIND_UNKNOWN = 0,
798
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest {
799
+ return new EnableRemoteTrackRequest().fromJson(jsonValue, options);
800
+ }
434
801
 
435
- /**
436
- * @generated from enum value: KIND_AUDIO = 1;
437
- */
438
- KIND_AUDIO = 1,
802
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest {
803
+ return new EnableRemoteTrackRequest().fromJsonString(jsonString, options);
804
+ }
439
805
 
440
- /**
441
- * @generated from enum value: KIND_VIDEO = 2;
442
- */
443
- KIND_VIDEO = 2,
806
+ static equals(a: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined, b: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined): boolean {
807
+ return proto2.util.equals(EnableRemoteTrackRequest, a, b);
808
+ }
444
809
  }
445
810
 
446
811
  /**
447
- * Describes the enum livekit.proto.TrackKind.
448
- */
449
- export const TrackKindSchema: GenEnum<TrackKind> = /*@__PURE__*/
450
- enumDesc(file_track, 0);
451
-
452
- /**
453
- * @generated from enum livekit.proto.TrackSource
812
+ * @generated from message livekit.proto.EnableRemoteTrackResponse
454
813
  */
455
- export enum TrackSource {
814
+ export class EnableRemoteTrackResponse extends Message<EnableRemoteTrackResponse> {
456
815
  /**
457
- * @generated from enum value: SOURCE_UNKNOWN = 0;
458
- */
459
- SOURCE_UNKNOWN = 0,
460
-
461
- /**
462
- * @generated from enum value: SOURCE_CAMERA = 1;
463
- */
464
- SOURCE_CAMERA = 1,
465
-
466
- /**
467
- * @generated from enum value: SOURCE_MICROPHONE = 2;
816
+ * @generated from field: required bool enabled = 1;
468
817
  */
469
- SOURCE_MICROPHONE = 2,
818
+ enabled?: boolean;
470
819
 
471
- /**
472
- * @generated from enum value: SOURCE_SCREENSHARE = 3;
473
- */
474
- SOURCE_SCREENSHARE = 3,
820
+ constructor(data?: PartialMessage<EnableRemoteTrackResponse>) {
821
+ super();
822
+ proto2.util.initPartial(data, this);
823
+ }
475
824
 
476
- /**
477
- * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
478
- */
479
- SOURCE_SCREENSHARE_AUDIO = 4,
480
- }
825
+ static readonly runtime: typeof proto2 = proto2;
826
+ static readonly typeName = "livekit.proto.EnableRemoteTrackResponse";
827
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
828
+ { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
829
+ ]);
481
830
 
482
- /**
483
- * Describes the enum livekit.proto.TrackSource.
484
- */
485
- export const TrackSourceSchema: GenEnum<TrackSource> = /*@__PURE__*/
486
- enumDesc(file_track, 1);
831
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackResponse {
832
+ return new EnableRemoteTrackResponse().fromBinary(bytes, options);
833
+ }
487
834
 
488
- /**
489
- * @generated from enum livekit.proto.StreamState
490
- */
491
- export enum StreamState {
492
- /**
493
- * @generated from enum value: STATE_UNKNOWN = 0;
494
- */
495
- STATE_UNKNOWN = 0,
835
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse {
836
+ return new EnableRemoteTrackResponse().fromJson(jsonValue, options);
837
+ }
496
838
 
497
- /**
498
- * @generated from enum value: STATE_ACTIVE = 1;
499
- */
500
- STATE_ACTIVE = 1,
839
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse {
840
+ return new EnableRemoteTrackResponse().fromJsonString(jsonString, options);
841
+ }
501
842
 
502
- /**
503
- * @generated from enum value: STATE_PAUSED = 2;
504
- */
505
- STATE_PAUSED = 2,
843
+ static equals(a: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined, b: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined): boolean {
844
+ return proto2.util.equals(EnableRemoteTrackResponse, a, b);
845
+ }
506
846
  }
507
847
 
508
- /**
509
- * Describes the enum livekit.proto.StreamState.
510
- */
511
- export const StreamStateSchema: GenEnum<StreamState> = /*@__PURE__*/
512
- enumDesc(file_track, 2);
513
-