@livekit/rtc-node 0.12.2 → 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 (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 +0 -1
  32. package/dist/e2ee.d.ts +0 -1
  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 +57 -34
  54. package/dist/participant.cjs.map +1 -1
  55. package/dist/participant.d.cts +10 -10
  56. package/dist/participant.d.ts +10 -10
  57. package/dist/participant.d.ts.map +1 -1
  58. package/dist/participant.js +75 -50
  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 +93 -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 +92 -122
  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 +36 -37
  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 +100 -72
  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 +143 -188
  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
@@ -1,198 +1,280 @@
1
- import { GenFile, GenMessage, GenEnum } from '@bufbuild/protobuf/codegenv1';
1
+ import { Message, PartialMessage, proto2, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
2
+ import { RtcStats } from './stats_pb.js';
2
3
  import { EncryptionType } from './e2ee_pb.js';
3
4
  import { FfiOwnedHandle } from './handle_pb.js';
4
- import { RtcStats } from './stats_pb.js';
5
- import { Message } from '@bufbuild/protobuf';
6
5
 
7
6
  /**
8
- * Describes the file track.proto.
7
+ * @generated from enum livekit.proto.TrackKind
9
8
  */
10
- declare const file_track: GenFile;
9
+ declare enum TrackKind {
10
+ /**
11
+ * @generated from enum value: KIND_UNKNOWN = 0;
12
+ */
13
+ KIND_UNKNOWN = 0,
14
+ /**
15
+ * @generated from enum value: KIND_AUDIO = 1;
16
+ */
17
+ KIND_AUDIO = 1,
18
+ /**
19
+ * @generated from enum value: KIND_VIDEO = 2;
20
+ */
21
+ KIND_VIDEO = 2
22
+ }
23
+ /**
24
+ * @generated from enum livekit.proto.TrackSource
25
+ */
26
+ declare enum TrackSource {
27
+ /**
28
+ * @generated from enum value: SOURCE_UNKNOWN = 0;
29
+ */
30
+ SOURCE_UNKNOWN = 0,
31
+ /**
32
+ * @generated from enum value: SOURCE_CAMERA = 1;
33
+ */
34
+ SOURCE_CAMERA = 1,
35
+ /**
36
+ * @generated from enum value: SOURCE_MICROPHONE = 2;
37
+ */
38
+ SOURCE_MICROPHONE = 2,
39
+ /**
40
+ * @generated from enum value: SOURCE_SCREENSHARE = 3;
41
+ */
42
+ SOURCE_SCREENSHARE = 3,
43
+ /**
44
+ * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
45
+ */
46
+ SOURCE_SCREENSHARE_AUDIO = 4
47
+ }
48
+ /**
49
+ * @generated from enum livekit.proto.StreamState
50
+ */
51
+ declare enum StreamState {
52
+ /**
53
+ * @generated from enum value: STATE_UNKNOWN = 0;
54
+ */
55
+ STATE_UNKNOWN = 0,
56
+ /**
57
+ * @generated from enum value: STATE_ACTIVE = 1;
58
+ */
59
+ STATE_ACTIVE = 1,
60
+ /**
61
+ * @generated from enum value: STATE_PAUSED = 2;
62
+ */
63
+ STATE_PAUSED = 2
64
+ }
11
65
  /**
12
66
  * Create a new VideoTrack from a VideoSource
13
67
  *
14
68
  * @generated from message livekit.proto.CreateVideoTrackRequest
15
69
  */
16
- type CreateVideoTrackRequest = Message<"livekit.proto.CreateVideoTrackRequest"> & {
70
+ declare class CreateVideoTrackRequest extends Message<CreateVideoTrackRequest> {
17
71
  /**
18
72
  * @generated from field: required string name = 1;
19
73
  */
20
- name: string;
74
+ name?: string;
21
75
  /**
22
76
  * @generated from field: required uint64 source_handle = 2;
23
77
  */
24
- sourceHandle: bigint;
25
- };
26
- /**
27
- * Describes the message livekit.proto.CreateVideoTrackRequest.
28
- * Use `create(CreateVideoTrackRequestSchema)` to create a new message.
29
- */
30
- declare const CreateVideoTrackRequestSchema: GenMessage<CreateVideoTrackRequest>;
78
+ sourceHandle?: bigint;
79
+ constructor(data?: PartialMessage<CreateVideoTrackRequest>);
80
+ static readonly runtime: typeof proto2;
81
+ static readonly typeName = "livekit.proto.CreateVideoTrackRequest";
82
+ static readonly fields: FieldList;
83
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackRequest;
84
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest;
85
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest;
86
+ static equals(a: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined, b: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined): boolean;
87
+ }
31
88
  /**
32
89
  * @generated from message livekit.proto.CreateVideoTrackResponse
33
90
  */
34
- type CreateVideoTrackResponse = Message<"livekit.proto.CreateVideoTrackResponse"> & {
91
+ declare class CreateVideoTrackResponse extends Message<CreateVideoTrackResponse> {
35
92
  /**
36
93
  * @generated from field: required livekit.proto.OwnedTrack track = 1;
37
94
  */
38
95
  track?: OwnedTrack;
39
- };
40
- /**
41
- * Describes the message livekit.proto.CreateVideoTrackResponse.
42
- * Use `create(CreateVideoTrackResponseSchema)` to create a new message.
43
- */
44
- declare const CreateVideoTrackResponseSchema: GenMessage<CreateVideoTrackResponse>;
96
+ constructor(data?: PartialMessage<CreateVideoTrackResponse>);
97
+ static readonly runtime: typeof proto2;
98
+ static readonly typeName = "livekit.proto.CreateVideoTrackResponse";
99
+ static readonly fields: FieldList;
100
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackResponse;
101
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse;
102
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse;
103
+ static equals(a: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined, b: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined): boolean;
104
+ }
45
105
  /**
46
106
  * Create a new AudioTrack from a AudioSource
47
107
  *
48
108
  * @generated from message livekit.proto.CreateAudioTrackRequest
49
109
  */
50
- type CreateAudioTrackRequest = Message<"livekit.proto.CreateAudioTrackRequest"> & {
110
+ declare class CreateAudioTrackRequest extends Message<CreateAudioTrackRequest> {
51
111
  /**
52
112
  * @generated from field: required string name = 1;
53
113
  */
54
- name: string;
114
+ name?: string;
55
115
  /**
56
116
  * @generated from field: required uint64 source_handle = 2;
57
117
  */
58
- sourceHandle: bigint;
59
- };
60
- /**
61
- * Describes the message livekit.proto.CreateAudioTrackRequest.
62
- * Use `create(CreateAudioTrackRequestSchema)` to create a new message.
63
- */
64
- declare const CreateAudioTrackRequestSchema: GenMessage<CreateAudioTrackRequest>;
118
+ sourceHandle?: bigint;
119
+ constructor(data?: PartialMessage<CreateAudioTrackRequest>);
120
+ static readonly runtime: typeof proto2;
121
+ static readonly typeName = "livekit.proto.CreateAudioTrackRequest";
122
+ static readonly fields: FieldList;
123
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackRequest;
124
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest;
125
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest;
126
+ static equals(a: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined, b: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined): boolean;
127
+ }
65
128
  /**
66
129
  * @generated from message livekit.proto.CreateAudioTrackResponse
67
130
  */
68
- type CreateAudioTrackResponse = Message<"livekit.proto.CreateAudioTrackResponse"> & {
131
+ declare class CreateAudioTrackResponse extends Message<CreateAudioTrackResponse> {
69
132
  /**
70
133
  * @generated from field: required livekit.proto.OwnedTrack track = 1;
71
134
  */
72
135
  track?: OwnedTrack;
73
- };
74
- /**
75
- * Describes the message livekit.proto.CreateAudioTrackResponse.
76
- * Use `create(CreateAudioTrackResponseSchema)` to create a new message.
77
- */
78
- declare const CreateAudioTrackResponseSchema: GenMessage<CreateAudioTrackResponse>;
136
+ constructor(data?: PartialMessage<CreateAudioTrackResponse>);
137
+ static readonly runtime: typeof proto2;
138
+ static readonly typeName = "livekit.proto.CreateAudioTrackResponse";
139
+ static readonly fields: FieldList;
140
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackResponse;
141
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse;
142
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse;
143
+ static equals(a: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined, b: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined): boolean;
144
+ }
79
145
  /**
80
146
  * @generated from message livekit.proto.GetStatsRequest
81
147
  */
82
- type GetStatsRequest = Message<"livekit.proto.GetStatsRequest"> & {
148
+ declare class GetStatsRequest extends Message<GetStatsRequest> {
83
149
  /**
84
150
  * @generated from field: required uint64 track_handle = 1;
85
151
  */
86
- trackHandle: bigint;
87
- };
88
- /**
89
- * Describes the message livekit.proto.GetStatsRequest.
90
- * Use `create(GetStatsRequestSchema)` to create a new message.
91
- */
92
- declare const GetStatsRequestSchema: GenMessage<GetStatsRequest>;
152
+ trackHandle?: bigint;
153
+ constructor(data?: PartialMessage<GetStatsRequest>);
154
+ static readonly runtime: typeof proto2;
155
+ static readonly typeName = "livekit.proto.GetStatsRequest";
156
+ static readonly fields: FieldList;
157
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsRequest;
158
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsRequest;
159
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsRequest;
160
+ static equals(a: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined, b: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined): boolean;
161
+ }
93
162
  /**
94
163
  * @generated from message livekit.proto.GetStatsResponse
95
164
  */
96
- type GetStatsResponse = Message<"livekit.proto.GetStatsResponse"> & {
165
+ declare class GetStatsResponse extends Message<GetStatsResponse> {
97
166
  /**
98
167
  * @generated from field: required uint64 async_id = 1;
99
168
  */
100
- asyncId: bigint;
101
- };
102
- /**
103
- * Describes the message livekit.proto.GetStatsResponse.
104
- * Use `create(GetStatsResponseSchema)` to create a new message.
105
- */
106
- declare const GetStatsResponseSchema: GenMessage<GetStatsResponse>;
169
+ asyncId?: bigint;
170
+ constructor(data?: PartialMessage<GetStatsResponse>);
171
+ static readonly runtime: typeof proto2;
172
+ static readonly typeName = "livekit.proto.GetStatsResponse";
173
+ static readonly fields: FieldList;
174
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsResponse;
175
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsResponse;
176
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsResponse;
177
+ static equals(a: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined, b: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined): boolean;
178
+ }
107
179
  /**
108
180
  * @generated from message livekit.proto.GetStatsCallback
109
181
  */
110
- type GetStatsCallback = Message<"livekit.proto.GetStatsCallback"> & {
182
+ declare class GetStatsCallback extends Message<GetStatsCallback> {
111
183
  /**
112
184
  * @generated from field: required uint64 async_id = 1;
113
185
  */
114
- asyncId: bigint;
186
+ asyncId?: bigint;
115
187
  /**
116
188
  * @generated from field: optional string error = 2;
117
189
  */
118
- error: string;
190
+ error?: string;
119
191
  /**
120
192
  * @generated from field: repeated livekit.proto.RtcStats stats = 3;
121
193
  */
122
194
  stats: RtcStats[];
123
- };
124
- /**
125
- * Describes the message livekit.proto.GetStatsCallback.
126
- * Use `create(GetStatsCallbackSchema)` to create a new message.
127
- */
128
- declare const GetStatsCallbackSchema: GenMessage<GetStatsCallback>;
195
+ constructor(data?: PartialMessage<GetStatsCallback>);
196
+ static readonly runtime: typeof proto2;
197
+ static readonly typeName = "livekit.proto.GetStatsCallback";
198
+ static readonly fields: FieldList;
199
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsCallback;
200
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsCallback;
201
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsCallback;
202
+ static equals(a: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined, b: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined): boolean;
203
+ }
129
204
  /**
130
205
  * @generated from message livekit.proto.TrackEvent
131
206
  */
132
- type TrackEvent = Message<"livekit.proto.TrackEvent"> & {};
133
- /**
134
- * Describes the message livekit.proto.TrackEvent.
135
- * Use `create(TrackEventSchema)` to create a new message.
136
- */
137
- declare const TrackEventSchema: GenMessage<TrackEvent>;
207
+ declare class TrackEvent extends Message<TrackEvent> {
208
+ constructor(data?: PartialMessage<TrackEvent>);
209
+ static readonly runtime: typeof proto2;
210
+ static readonly typeName = "livekit.proto.TrackEvent";
211
+ static readonly fields: FieldList;
212
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackEvent;
213
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackEvent;
214
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackEvent;
215
+ static equals(a: TrackEvent | PlainMessage<TrackEvent> | undefined, b: TrackEvent | PlainMessage<TrackEvent> | undefined): boolean;
216
+ }
138
217
  /**
139
218
  * @generated from message livekit.proto.TrackPublicationInfo
140
219
  */
141
- type TrackPublicationInfo = Message<"livekit.proto.TrackPublicationInfo"> & {
220
+ declare class TrackPublicationInfo extends Message<TrackPublicationInfo> {
142
221
  /**
143
222
  * @generated from field: required string sid = 1;
144
223
  */
145
- sid: string;
224
+ sid?: string;
146
225
  /**
147
226
  * @generated from field: required string name = 2;
148
227
  */
149
- name: string;
228
+ name?: string;
150
229
  /**
151
230
  * @generated from field: required livekit.proto.TrackKind kind = 3;
152
231
  */
153
- kind: TrackKind;
232
+ kind?: TrackKind;
154
233
  /**
155
234
  * @generated from field: required livekit.proto.TrackSource source = 4;
156
235
  */
157
- source: TrackSource;
236
+ source?: TrackSource;
158
237
  /**
159
238
  * @generated from field: required bool simulcasted = 5;
160
239
  */
161
- simulcasted: boolean;
240
+ simulcasted?: boolean;
162
241
  /**
163
242
  * @generated from field: required uint32 width = 6;
164
243
  */
165
- width: number;
244
+ width?: number;
166
245
  /**
167
246
  * @generated from field: required uint32 height = 7;
168
247
  */
169
- height: number;
248
+ height?: number;
170
249
  /**
171
250
  * @generated from field: required string mime_type = 8;
172
251
  */
173
- mimeType: string;
252
+ mimeType?: string;
174
253
  /**
175
254
  * @generated from field: required bool muted = 9;
176
255
  */
177
- muted: boolean;
256
+ muted?: boolean;
178
257
  /**
179
258
  * @generated from field: required bool remote = 10;
180
259
  */
181
- remote: boolean;
260
+ remote?: boolean;
182
261
  /**
183
262
  * @generated from field: required livekit.proto.EncryptionType encryption_type = 11;
184
263
  */
185
- encryptionType: EncryptionType;
186
- };
187
- /**
188
- * Describes the message livekit.proto.TrackPublicationInfo.
189
- * Use `create(TrackPublicationInfoSchema)` to create a new message.
190
- */
191
- declare const TrackPublicationInfoSchema: GenMessage<TrackPublicationInfo>;
264
+ encryptionType?: EncryptionType;
265
+ constructor(data?: PartialMessage<TrackPublicationInfo>);
266
+ static readonly runtime: typeof proto2;
267
+ static readonly typeName = "livekit.proto.TrackPublicationInfo";
268
+ static readonly fields: FieldList;
269
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublicationInfo;
270
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublicationInfo;
271
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublicationInfo;
272
+ static equals(a: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined, b: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined): boolean;
273
+ }
192
274
  /**
193
275
  * @generated from message livekit.proto.OwnedTrackPublication
194
276
  */
195
- type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication"> & {
277
+ declare class OwnedTrackPublication extends Message<OwnedTrackPublication> {
196
278
  /**
197
279
  * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
198
280
  */
@@ -201,50 +283,56 @@ type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication"> & {
201
283
  * @generated from field: required livekit.proto.TrackPublicationInfo info = 2;
202
284
  */
203
285
  info?: TrackPublicationInfo;
204
- };
205
- /**
206
- * Describes the message livekit.proto.OwnedTrackPublication.
207
- * Use `create(OwnedTrackPublicationSchema)` to create a new message.
208
- */
209
- declare const OwnedTrackPublicationSchema: GenMessage<OwnedTrackPublication>;
286
+ constructor(data?: PartialMessage<OwnedTrackPublication>);
287
+ static readonly runtime: typeof proto2;
288
+ static readonly typeName = "livekit.proto.OwnedTrackPublication";
289
+ static readonly fields: FieldList;
290
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrackPublication;
291
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrackPublication;
292
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrackPublication;
293
+ static equals(a: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined, b: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined): boolean;
294
+ }
210
295
  /**
211
296
  * @generated from message livekit.proto.TrackInfo
212
297
  */
213
- type TrackInfo = Message<"livekit.proto.TrackInfo"> & {
298
+ declare class TrackInfo extends Message<TrackInfo> {
214
299
  /**
215
300
  * @generated from field: required string sid = 1;
216
301
  */
217
- sid: string;
302
+ sid?: string;
218
303
  /**
219
304
  * @generated from field: required string name = 2;
220
305
  */
221
- name: string;
306
+ name?: string;
222
307
  /**
223
308
  * @generated from field: required livekit.proto.TrackKind kind = 3;
224
309
  */
225
- kind: TrackKind;
310
+ kind?: TrackKind;
226
311
  /**
227
312
  * @generated from field: required livekit.proto.StreamState stream_state = 4;
228
313
  */
229
- streamState: StreamState;
314
+ streamState?: StreamState;
230
315
  /**
231
316
  * @generated from field: required bool muted = 5;
232
317
  */
233
- muted: boolean;
318
+ muted?: boolean;
234
319
  /**
235
320
  * @generated from field: required bool remote = 6;
236
321
  */
237
- remote: boolean;
238
- };
239
- /**
240
- * Describes the message livekit.proto.TrackInfo.
241
- * Use `create(TrackInfoSchema)` to create a new message.
242
- */
243
- declare const TrackInfoSchema: GenMessage<TrackInfo>;
322
+ remote?: boolean;
323
+ constructor(data?: PartialMessage<TrackInfo>);
324
+ static readonly runtime: typeof proto2;
325
+ static readonly typeName = "livekit.proto.TrackInfo";
326
+ static readonly fields: FieldList;
327
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackInfo;
328
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackInfo;
329
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackInfo;
330
+ static equals(a: TrackInfo | PlainMessage<TrackInfo> | undefined, b: TrackInfo | PlainMessage<TrackInfo> | undefined): boolean;
331
+ }
244
332
  /**
245
333
  * @generated from message livekit.proto.OwnedTrack
246
334
  */
247
- type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & {
335
+ declare class OwnedTrack extends Message<OwnedTrack> {
248
336
  /**
249
337
  * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
250
338
  */
@@ -253,150 +341,94 @@ type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & {
253
341
  * @generated from field: required livekit.proto.TrackInfo info = 2;
254
342
  */
255
343
  info?: TrackInfo;
256
- };
257
- /**
258
- * Describes the message livekit.proto.OwnedTrack.
259
- * Use `create(OwnedTrackSchema)` to create a new message.
260
- */
261
- declare const OwnedTrackSchema: GenMessage<OwnedTrack>;
344
+ constructor(data?: PartialMessage<OwnedTrack>);
345
+ static readonly runtime: typeof proto2;
346
+ static readonly typeName = "livekit.proto.OwnedTrack";
347
+ static readonly fields: FieldList;
348
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrack;
349
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrack;
350
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrack;
351
+ static equals(a: OwnedTrack | PlainMessage<OwnedTrack> | undefined, b: OwnedTrack | PlainMessage<OwnedTrack> | undefined): boolean;
352
+ }
262
353
  /**
263
354
  * Mute/UnMute a track
264
355
  *
265
356
  * @generated from message livekit.proto.LocalTrackMuteRequest
266
357
  */
267
- type LocalTrackMuteRequest = Message<"livekit.proto.LocalTrackMuteRequest"> & {
358
+ declare class LocalTrackMuteRequest extends Message<LocalTrackMuteRequest> {
268
359
  /**
269
360
  * @generated from field: required uint64 track_handle = 1;
270
361
  */
271
- trackHandle: bigint;
362
+ trackHandle?: bigint;
272
363
  /**
273
364
  * @generated from field: required bool mute = 2;
274
365
  */
275
- mute: boolean;
276
- };
277
- /**
278
- * Describes the message livekit.proto.LocalTrackMuteRequest.
279
- * Use `create(LocalTrackMuteRequestSchema)` to create a new message.
280
- */
281
- declare const LocalTrackMuteRequestSchema: GenMessage<LocalTrackMuteRequest>;
366
+ mute?: boolean;
367
+ constructor(data?: PartialMessage<LocalTrackMuteRequest>);
368
+ static readonly runtime: typeof proto2;
369
+ static readonly typeName = "livekit.proto.LocalTrackMuteRequest";
370
+ static readonly fields: FieldList;
371
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteRequest;
372
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest;
373
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest;
374
+ static equals(a: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined, b: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined): boolean;
375
+ }
282
376
  /**
283
377
  * @generated from message livekit.proto.LocalTrackMuteResponse
284
378
  */
285
- type LocalTrackMuteResponse = Message<"livekit.proto.LocalTrackMuteResponse"> & {
379
+ declare class LocalTrackMuteResponse extends Message<LocalTrackMuteResponse> {
286
380
  /**
287
381
  * @generated from field: required bool muted = 1;
288
382
  */
289
- muted: boolean;
290
- };
291
- /**
292
- * Describes the message livekit.proto.LocalTrackMuteResponse.
293
- * Use `create(LocalTrackMuteResponseSchema)` to create a new message.
294
- */
295
- declare const LocalTrackMuteResponseSchema: GenMessage<LocalTrackMuteResponse>;
383
+ muted?: boolean;
384
+ constructor(data?: PartialMessage<LocalTrackMuteResponse>);
385
+ static readonly runtime: typeof proto2;
386
+ static readonly typeName = "livekit.proto.LocalTrackMuteResponse";
387
+ static readonly fields: FieldList;
388
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteResponse;
389
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse;
390
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse;
391
+ static equals(a: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined, b: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined): boolean;
392
+ }
296
393
  /**
297
394
  * Enable/Disable a remote track
298
395
  *
299
396
  * @generated from message livekit.proto.EnableRemoteTrackRequest
300
397
  */
301
- type EnableRemoteTrackRequest = Message<"livekit.proto.EnableRemoteTrackRequest"> & {
398
+ declare class EnableRemoteTrackRequest extends Message<EnableRemoteTrackRequest> {
302
399
  /**
303
400
  * @generated from field: required uint64 track_handle = 1;
304
401
  */
305
- trackHandle: bigint;
402
+ trackHandle?: bigint;
306
403
  /**
307
404
  * @generated from field: required bool enabled = 2;
308
405
  */
309
- enabled: boolean;
310
- };
311
- /**
312
- * Describes the message livekit.proto.EnableRemoteTrackRequest.
313
- * Use `create(EnableRemoteTrackRequestSchema)` to create a new message.
314
- */
315
- declare const EnableRemoteTrackRequestSchema: GenMessage<EnableRemoteTrackRequest>;
406
+ enabled?: boolean;
407
+ constructor(data?: PartialMessage<EnableRemoteTrackRequest>);
408
+ static readonly runtime: typeof proto2;
409
+ static readonly typeName = "livekit.proto.EnableRemoteTrackRequest";
410
+ static readonly fields: FieldList;
411
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackRequest;
412
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest;
413
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest;
414
+ static equals(a: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined, b: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined): boolean;
415
+ }
316
416
  /**
317
417
  * @generated from message livekit.proto.EnableRemoteTrackResponse
318
418
  */
319
- type EnableRemoteTrackResponse = Message<"livekit.proto.EnableRemoteTrackResponse"> & {
419
+ declare class EnableRemoteTrackResponse extends Message<EnableRemoteTrackResponse> {
320
420
  /**
321
421
  * @generated from field: required bool enabled = 1;
322
422
  */
323
- enabled: boolean;
324
- };
325
- /**
326
- * Describes the message livekit.proto.EnableRemoteTrackResponse.
327
- * Use `create(EnableRemoteTrackResponseSchema)` to create a new message.
328
- */
329
- declare const EnableRemoteTrackResponseSchema: GenMessage<EnableRemoteTrackResponse>;
330
- /**
331
- * @generated from enum livekit.proto.TrackKind
332
- */
333
- declare enum TrackKind {
334
- /**
335
- * @generated from enum value: KIND_UNKNOWN = 0;
336
- */
337
- KIND_UNKNOWN = 0,
338
- /**
339
- * @generated from enum value: KIND_AUDIO = 1;
340
- */
341
- KIND_AUDIO = 1,
342
- /**
343
- * @generated from enum value: KIND_VIDEO = 2;
344
- */
345
- KIND_VIDEO = 2
423
+ enabled?: boolean;
424
+ constructor(data?: PartialMessage<EnableRemoteTrackResponse>);
425
+ static readonly runtime: typeof proto2;
426
+ static readonly typeName = "livekit.proto.EnableRemoteTrackResponse";
427
+ static readonly fields: FieldList;
428
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackResponse;
429
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse;
430
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse;
431
+ static equals(a: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined, b: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined): boolean;
346
432
  }
347
- /**
348
- * Describes the enum livekit.proto.TrackKind.
349
- */
350
- declare const TrackKindSchema: GenEnum<TrackKind>;
351
- /**
352
- * @generated from enum livekit.proto.TrackSource
353
- */
354
- declare enum TrackSource {
355
- /**
356
- * @generated from enum value: SOURCE_UNKNOWN = 0;
357
- */
358
- SOURCE_UNKNOWN = 0,
359
- /**
360
- * @generated from enum value: SOURCE_CAMERA = 1;
361
- */
362
- SOURCE_CAMERA = 1,
363
- /**
364
- * @generated from enum value: SOURCE_MICROPHONE = 2;
365
- */
366
- SOURCE_MICROPHONE = 2,
367
- /**
368
- * @generated from enum value: SOURCE_SCREENSHARE = 3;
369
- */
370
- SOURCE_SCREENSHARE = 3,
371
- /**
372
- * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
373
- */
374
- SOURCE_SCREENSHARE_AUDIO = 4
375
- }
376
- /**
377
- * Describes the enum livekit.proto.TrackSource.
378
- */
379
- declare const TrackSourceSchema: GenEnum<TrackSource>;
380
- /**
381
- * @generated from enum livekit.proto.StreamState
382
- */
383
- declare enum StreamState {
384
- /**
385
- * @generated from enum value: STATE_UNKNOWN = 0;
386
- */
387
- STATE_UNKNOWN = 0,
388
- /**
389
- * @generated from enum value: STATE_ACTIVE = 1;
390
- */
391
- STATE_ACTIVE = 1,
392
- /**
393
- * @generated from enum value: STATE_PAUSED = 2;
394
- */
395
- STATE_PAUSED = 2
396
- }
397
- /**
398
- * Describes the enum livekit.proto.StreamState.
399
- */
400
- declare const StreamStateSchema: GenEnum<StreamState>;
401
433
 
402
- export { type CreateAudioTrackRequest, CreateAudioTrackRequestSchema, type CreateAudioTrackResponse, CreateAudioTrackResponseSchema, type CreateVideoTrackRequest, CreateVideoTrackRequestSchema, type CreateVideoTrackResponse, CreateVideoTrackResponseSchema, type EnableRemoteTrackRequest, EnableRemoteTrackRequestSchema, type EnableRemoteTrackResponse, EnableRemoteTrackResponseSchema, type GetStatsCallback, GetStatsCallbackSchema, type GetStatsRequest, GetStatsRequestSchema, type GetStatsResponse, GetStatsResponseSchema, type LocalTrackMuteRequest, LocalTrackMuteRequestSchema, type LocalTrackMuteResponse, LocalTrackMuteResponseSchema, type OwnedTrack, type OwnedTrackPublication, OwnedTrackPublicationSchema, OwnedTrackSchema, StreamState, StreamStateSchema, type TrackEvent, TrackEventSchema, type TrackInfo, TrackInfoSchema, TrackKind, TrackKindSchema, type TrackPublicationInfo, TrackPublicationInfoSchema, TrackSource, TrackSourceSchema, file_track };
434
+ export { CreateAudioTrackRequest, CreateAudioTrackResponse, CreateVideoTrackRequest, CreateVideoTrackResponse, EnableRemoteTrackRequest, EnableRemoteTrackResponse, GetStatsCallback, GetStatsRequest, GetStatsResponse, LocalTrackMuteRequest, LocalTrackMuteResponse, OwnedTrack, OwnedTrackPublication, StreamState, TrackEvent, TrackInfo, TrackKind, TrackPublicationInfo, TrackSource };