@livekit/rtc-node 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/audio_frame.cjs +2 -2
  2. package/dist/audio_frame.cjs.map +1 -1
  3. package/dist/audio_frame.d.cts +31 -0
  4. package/dist/audio_frame.d.ts +11 -5
  5. package/dist/audio_frame.d.ts.map +1 -1
  6. package/dist/audio_frame.js +3 -3
  7. package/dist/audio_frame.js.map +1 -1
  8. package/dist/audio_resampler.cjs +10 -7
  9. package/dist/audio_resampler.cjs.map +1 -1
  10. package/dist/audio_resampler.d.cts +59 -0
  11. package/dist/audio_resampler.d.ts +11 -3
  12. package/dist/audio_resampler.d.ts.map +1 -1
  13. package/dist/audio_resampler.js +13 -10
  14. package/dist/audio_resampler.js.map +1 -1
  15. package/dist/audio_source.cjs +6 -4
  16. package/dist/audio_source.cjs.map +1 -1
  17. package/dist/audio_source.d.cts +37 -0
  18. package/dist/audio_source.d.ts +13 -5
  19. package/dist/audio_source.d.ts.map +1 -1
  20. package/dist/audio_source.js +9 -7
  21. package/dist/audio_source.js.map +1 -1
  22. package/dist/audio_stream.cjs +1 -2
  23. package/dist/audio_stream.cjs.map +1 -1
  24. package/dist/audio_stream.d.cts +37 -0
  25. package/dist/audio_stream.d.ts +16 -5
  26. package/dist/audio_stream.d.ts.map +1 -1
  27. package/dist/audio_stream.js +2 -3
  28. package/dist/audio_stream.js.map +1 -1
  29. package/dist/e2ee.cjs +19 -20
  30. package/dist/e2ee.cjs.map +1 -1
  31. package/dist/e2ee.d.cts +47 -0
  32. package/dist/e2ee.d.ts +11 -8
  33. package/dist/e2ee.d.ts.map +1 -1
  34. package/dist/e2ee.js +29 -30
  35. package/dist/e2ee.js.map +1 -1
  36. package/dist/ffi_client.cjs +6 -5
  37. package/dist/ffi_client.cjs.map +1 -1
  38. package/dist/ffi_client.d.cts +35 -0
  39. package/dist/ffi_client.d.ts +23 -11
  40. package/dist/ffi_client.d.ts.map +1 -1
  41. package/dist/ffi_client.js +6 -10
  42. package/dist/ffi_client.js.map +1 -1
  43. package/dist/index.cjs +16 -49
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +28 -0
  46. package/dist/index.d.ts +20 -41
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +7 -46
  49. package/dist/index.js.map +1 -1
  50. package/dist/napi/native.d.cjs.map +1 -1
  51. package/dist/napi/native.d.d.cts +21 -0
  52. package/dist/napi/native.d.d.ts +21 -0
  53. package/dist/napi/native.d.ts +5 -5
  54. package/dist/native.d.ts +5 -5
  55. package/dist/participant.cjs +57 -34
  56. package/dist/participant.cjs.map +1 -1
  57. package/dist/participant.d.cts +126 -0
  58. package/dist/participant.d.ts +34 -20
  59. package/dist/participant.d.ts.map +1 -1
  60. package/dist/participant.js +75 -50
  61. package/dist/participant.js.map +1 -1
  62. package/dist/proto/audio_frame_pb.cjs +977 -125
  63. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  64. package/dist/proto/audio_frame_pb.d.cts +898 -0
  65. package/dist/proto/audio_frame_pb.d.ts +506 -417
  66. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  67. package/dist/proto/audio_frame_pb.js +943 -85
  68. package/dist/proto/audio_frame_pb.js.map +1 -1
  69. package/dist/proto/e2ee_pb.cjs +700 -85
  70. package/dist/proto/e2ee_pb.cjs.map +1 -1
  71. package/dist/proto/e2ee_pb.d.cts +653 -0
  72. package/dist/proto/e2ee_pb.d.ts +333 -263
  73. package/dist/proto/e2ee_pb.d.ts.map +1 -1
  74. package/dist/proto/e2ee_pb.js +675 -57
  75. package/dist/proto/e2ee_pb.js.map +1 -1
  76. package/dist/proto/ffi_pb.cjs +369 -36
  77. package/dist/proto/ffi_pb.cjs.map +1 -1
  78. package/dist/proto/ffi_pb.d.cts +898 -0
  79. package/dist/proto/ffi_pb.d.ts +164 -112
  80. package/dist/proto/ffi_pb.d.ts.map +1 -1
  81. package/dist/proto/ffi_pb.js +364 -29
  82. package/dist/proto/ffi_pb.js.map +1 -1
  83. package/dist/proto/handle_pb.cjs +27 -7
  84. package/dist/proto/handle_pb.cjs.map +1 -1
  85. package/dist/proto/handle_pb.d.cts +31 -0
  86. package/dist/proto/handle_pb.d.ts +15 -15
  87. package/dist/proto/handle_pb.d.ts.map +1 -1
  88. package/dist/proto/handle_pb.js +26 -5
  89. package/dist/proto/handle_pb.js.map +1 -1
  90. package/dist/proto/participant_pb.cjs +112 -15
  91. package/dist/proto/participant_pb.cjs.map +1 -1
  92. package/dist/proto/participant_pb.d.cts +181 -0
  93. package/dist/proto/participant_pb.d.ts +143 -53
  94. package/dist/proto/participant_pb.d.ts.map +1 -1
  95. package/dist/proto/participant_pb.js +109 -11
  96. package/dist/proto/participant_pb.js.map +1 -1
  97. package/dist/proto/room_pb.cjs +2693 -302
  98. package/dist/proto/room_pb.cjs.map +1 -1
  99. package/dist/proto/room_pb.d.cts +2475 -0
  100. package/dist/proto/room_pb.d.ts +1269 -864
  101. package/dist/proto/room_pb.d.ts.map +1 -1
  102. package/dist/proto/room_pb.js +2603 -210
  103. package/dist/proto/room_pb.js.map +1 -1
  104. package/dist/proto/rpc_pb.cjs +302 -37
  105. package/dist/proto/rpc_pb.cjs.map +1 -1
  106. package/dist/proto/rpc_pb.d.cts +267 -0
  107. package/dist/proto/rpc_pb.d.ts +140 -108
  108. package/dist/proto/rpc_pb.d.ts.map +1 -1
  109. package/dist/proto/rpc_pb.js +291 -25
  110. package/dist/proto/rpc_pb.js.map +1 -1
  111. package/dist/proto/stats_pb.cjs +1253 -139
  112. package/dist/proto/stats_pb.cjs.map +1 -1
  113. package/dist/proto/stats_pb.d.cts +1764 -0
  114. package/dist/proto/stats_pb.d.ts +806 -693
  115. package/dist/proto/stats_pb.d.ts.map +1 -1
  116. package/dist/proto/stats_pb.js +1216 -93
  117. package/dist/proto/stats_pb.js.map +1 -1
  118. package/dist/proto/track_pb.cjs +462 -64
  119. package/dist/proto/track_pb.cjs.map +1 -1
  120. package/dist/proto/track_pb.d.cts +434 -0
  121. package/dist/proto/track_pb.d.ts +254 -220
  122. package/dist/proto/track_pb.d.ts.map +1 -1
  123. package/dist/proto/track_pb.js +447 -45
  124. package/dist/proto/track_pb.js.map +1 -1
  125. package/dist/proto/track_publication_pb.cjs +130 -0
  126. package/dist/proto/track_publication_pb.cjs.map +1 -0
  127. package/dist/proto/track_publication_pb.d.cts +80 -0
  128. package/dist/proto/track_publication_pb.d.ts +80 -0
  129. package/dist/proto/track_publication_pb.d.ts.map +1 -0
  130. package/dist/proto/track_publication_pb.js +103 -0
  131. package/dist/proto/track_publication_pb.js.map +1 -0
  132. package/dist/proto/video_frame_pb.cjs +648 -88
  133. package/dist/proto/video_frame_pb.cjs.map +1 -1
  134. package/dist/proto/video_frame_pb.d.cts +660 -0
  135. package/dist/proto/video_frame_pb.d.ts +375 -328
  136. package/dist/proto/video_frame_pb.d.ts.map +1 -1
  137. package/dist/proto/video_frame_pb.js +626 -60
  138. package/dist/proto/video_frame_pb.js.map +1 -1
  139. package/dist/room.cjs +93 -125
  140. package/dist/room.cjs.map +1 -1
  141. package/dist/room.d.cts +123 -0
  142. package/dist/room.d.ts +37 -34
  143. package/dist/room.d.ts.map +1 -1
  144. package/dist/room.js +92 -122
  145. package/dist/room.js.map +1 -1
  146. package/dist/rpc.cjs.map +1 -1
  147. package/dist/rpc.d.cts +81 -0
  148. package/dist/rpc.d.ts +10 -7
  149. package/dist/rpc.js.map +1 -1
  150. package/dist/track.cjs +12 -8
  151. package/dist/track.cjs.map +1 -1
  152. package/dist/track.d.cts +45 -0
  153. package/dist/track.d.ts +30 -20
  154. package/dist/track.d.ts.map +1 -1
  155. package/dist/track.js +13 -9
  156. package/dist/track.js.map +1 -1
  157. package/dist/track_publication.cjs +21 -12
  158. package/dist/track_publication.cjs.map +1 -1
  159. package/dist/track_publication.d.cts +47 -0
  160. package/dist/track_publication.d.ts +30 -19
  161. package/dist/track_publication.d.ts.map +1 -1
  162. package/dist/track_publication.js +22 -13
  163. package/dist/track_publication.js.map +1 -1
  164. package/dist/transcription.d.cts +15 -0
  165. package/dist/transcription.d.ts +4 -3
  166. package/dist/types.d.cts +9 -0
  167. package/dist/types.d.ts +3 -2
  168. package/dist/version.cjs +1 -1
  169. package/dist/version.cjs.map +1 -1
  170. package/dist/version.d.cts +3 -0
  171. package/dist/version.d.ts +3 -2
  172. package/dist/version.js +1 -1
  173. package/dist/version.js.map +1 -1
  174. package/dist/video_frame.cjs +26 -45
  175. package/dist/video_frame.cjs.map +1 -1
  176. package/dist/video_frame.d.cts +24 -0
  177. package/dist/video_frame.d.ts +10 -4
  178. package/dist/video_frame.d.ts.map +1 -1
  179. package/dist/video_frame.js +29 -48
  180. package/dist/video_frame.js.map +1 -1
  181. package/dist/video_source.cjs +7 -4
  182. package/dist/video_source.cjs.map +1 -1
  183. package/dist/video_source.d.cts +22 -0
  184. package/dist/video_source.d.ts +14 -7
  185. package/dist/video_source.d.ts.map +1 -1
  186. package/dist/video_source.js +9 -6
  187. package/dist/video_source.js.map +1 -1
  188. package/dist/video_stream.cjs +16 -5
  189. package/dist/video_stream.cjs.map +1 -1
  190. package/dist/video_stream.d.cts +40 -0
  191. package/dist/video_stream.d.ts +18 -7
  192. package/dist/video_stream.d.ts.map +1 -1
  193. package/dist/video_stream.js +17 -6
  194. package/dist/video_stream.js.map +1 -1
  195. package/package.json +17 -12
  196. package/src/audio_frame.ts +10 -10
  197. package/src/audio_resampler.ts +15 -13
  198. package/src/audio_source.ts +11 -8
  199. package/src/audio_stream.ts +3 -4
  200. package/src/e2ee.ts +36 -37
  201. package/src/ffi_client.ts +8 -16
  202. package/src/index.ts +5 -68
  203. package/src/napi/native.d.ts +5 -5
  204. package/src/participant.ts +100 -72
  205. package/src/proto/audio_frame_pb.ts +1220 -496
  206. package/src/proto/e2ee_pb.ts +858 -337
  207. package/src/proto/ffi_pb.ts +442 -135
  208. package/src/proto/handle_pb.ts +33 -19
  209. package/src/proto/participant_pb.ts +225 -60
  210. package/src/proto/room_pb.ts +3149 -1013
  211. package/src/proto/rpc_pb.ts +358 -129
  212. package/src/proto/stats_pb.ts +1891 -877
  213. package/src/proto/track_pb.ts +587 -253
  214. package/src/proto/track_publication_pb.ts +180 -0
  215. package/src/proto/video_frame_pb.ts +861 -394
  216. package/src/room.ts +143 -188
  217. package/src/rpc.ts +1 -1
  218. package/src/track.ts +16 -17
  219. package/src/track_publication.ts +25 -26
  220. package/src/version.ts +1 -1
  221. package/src/video_frame.ts +48 -72
  222. package/src/video_source.ts +11 -8
  223. package/src/video_stream.ts +18 -8
@@ -0,0 +1,180 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js"
16
+ // @generated from file track_publication.proto (package livekit.proto, syntax proto2)
17
+ /* eslint-disable */
18
+ // @ts-nocheck
19
+
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto2 } from "@bufbuild/protobuf";
22
+
23
+ /**
24
+ * Enable/Disable a remote track publication
25
+ *
26
+ * @generated from message livekit.proto.EnableRemoteTrackPublicationRequest
27
+ */
28
+ export class EnableRemoteTrackPublicationRequest extends Message<EnableRemoteTrackPublicationRequest> {
29
+ /**
30
+ * @generated from field: required uint64 track_publication_handle = 1;
31
+ */
32
+ trackPublicationHandle?: bigint;
33
+
34
+ /**
35
+ * @generated from field: required bool enabled = 2;
36
+ */
37
+ enabled?: boolean;
38
+
39
+ constructor(data?: PartialMessage<EnableRemoteTrackPublicationRequest>) {
40
+ super();
41
+ proto2.util.initPartial(data, this);
42
+ }
43
+
44
+ static readonly runtime: typeof proto2 = proto2;
45
+ static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationRequest";
46
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
47
+ { no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
48
+ { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
49
+ ]);
50
+
51
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackPublicationRequest {
52
+ return new EnableRemoteTrackPublicationRequest().fromBinary(bytes, options);
53
+ }
54
+
55
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationRequest {
56
+ return new EnableRemoteTrackPublicationRequest().fromJson(jsonValue, options);
57
+ }
58
+
59
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationRequest {
60
+ return new EnableRemoteTrackPublicationRequest().fromJsonString(jsonString, options);
61
+ }
62
+
63
+ static equals(a: EnableRemoteTrackPublicationRequest | PlainMessage<EnableRemoteTrackPublicationRequest> | undefined, b: EnableRemoteTrackPublicationRequest | PlainMessage<EnableRemoteTrackPublicationRequest> | undefined): boolean {
64
+ return proto2.util.equals(EnableRemoteTrackPublicationRequest, a, b);
65
+ }
66
+ }
67
+
68
+ /**
69
+ * @generated from message livekit.proto.EnableRemoteTrackPublicationResponse
70
+ */
71
+ export class EnableRemoteTrackPublicationResponse extends Message<EnableRemoteTrackPublicationResponse> {
72
+ constructor(data?: PartialMessage<EnableRemoteTrackPublicationResponse>) {
73
+ super();
74
+ proto2.util.initPartial(data, this);
75
+ }
76
+
77
+ static readonly runtime: typeof proto2 = proto2;
78
+ static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationResponse";
79
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
80
+ ]);
81
+
82
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackPublicationResponse {
83
+ return new EnableRemoteTrackPublicationResponse().fromBinary(bytes, options);
84
+ }
85
+
86
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationResponse {
87
+ return new EnableRemoteTrackPublicationResponse().fromJson(jsonValue, options);
88
+ }
89
+
90
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationResponse {
91
+ return new EnableRemoteTrackPublicationResponse().fromJsonString(jsonString, options);
92
+ }
93
+
94
+ static equals(a: EnableRemoteTrackPublicationResponse | PlainMessage<EnableRemoteTrackPublicationResponse> | undefined, b: EnableRemoteTrackPublicationResponse | PlainMessage<EnableRemoteTrackPublicationResponse> | undefined): boolean {
95
+ return proto2.util.equals(EnableRemoteTrackPublicationResponse, a, b);
96
+ }
97
+ }
98
+
99
+ /**
100
+ * update a remote track publication dimension
101
+ *
102
+ * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionRequest
103
+ */
104
+ export class UpdateRemoteTrackPublicationDimensionRequest extends Message<UpdateRemoteTrackPublicationDimensionRequest> {
105
+ /**
106
+ * @generated from field: required uint64 track_publication_handle = 1;
107
+ */
108
+ trackPublicationHandle?: bigint;
109
+
110
+ /**
111
+ * @generated from field: required uint32 width = 2;
112
+ */
113
+ width?: number;
114
+
115
+ /**
116
+ * @generated from field: required uint32 height = 3;
117
+ */
118
+ height?: number;
119
+
120
+ constructor(data?: PartialMessage<UpdateRemoteTrackPublicationDimensionRequest>) {
121
+ super();
122
+ proto2.util.initPartial(data, this);
123
+ }
124
+
125
+ static readonly runtime: typeof proto2 = proto2;
126
+ static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionRequest";
127
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
128
+ { no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
129
+ { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
130
+ { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
131
+ ]);
132
+
133
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateRemoteTrackPublicationDimensionRequest {
134
+ return new UpdateRemoteTrackPublicationDimensionRequest().fromBinary(bytes, options);
135
+ }
136
+
137
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionRequest {
138
+ return new UpdateRemoteTrackPublicationDimensionRequest().fromJson(jsonValue, options);
139
+ }
140
+
141
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionRequest {
142
+ return new UpdateRemoteTrackPublicationDimensionRequest().fromJsonString(jsonString, options);
143
+ }
144
+
145
+ static equals(a: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage<UpdateRemoteTrackPublicationDimensionRequest> | undefined, b: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage<UpdateRemoteTrackPublicationDimensionRequest> | undefined): boolean {
146
+ return proto2.util.equals(UpdateRemoteTrackPublicationDimensionRequest, a, b);
147
+ }
148
+ }
149
+
150
+ /**
151
+ * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionResponse
152
+ */
153
+ export class UpdateRemoteTrackPublicationDimensionResponse extends Message<UpdateRemoteTrackPublicationDimensionResponse> {
154
+ constructor(data?: PartialMessage<UpdateRemoteTrackPublicationDimensionResponse>) {
155
+ super();
156
+ proto2.util.initPartial(data, this);
157
+ }
158
+
159
+ static readonly runtime: typeof proto2 = proto2;
160
+ static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionResponse";
161
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
162
+ ]);
163
+
164
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateRemoteTrackPublicationDimensionResponse {
165
+ return new UpdateRemoteTrackPublicationDimensionResponse().fromBinary(bytes, options);
166
+ }
167
+
168
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionResponse {
169
+ return new UpdateRemoteTrackPublicationDimensionResponse().fromJson(jsonValue, options);
170
+ }
171
+
172
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionResponse {
173
+ return new UpdateRemoteTrackPublicationDimensionResponse().fromJsonString(jsonString, options);
174
+ }
175
+
176
+ static equals(a: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage<UpdateRemoteTrackPublicationDimensionResponse> | undefined, b: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage<UpdateRemoteTrackPublicationDimensionResponse> | undefined): boolean {
177
+ return proto2.util.equals(UpdateRemoteTrackPublicationDimensionResponse, a, b);
178
+ }
179
+ }
180
+