@livekit/rtc-node 0.0.4 → 0.0.5

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.
@@ -21,6 +21,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM
21
21
  import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
22
22
  import { OwnedParticipant } from "./participant_pb.js";
23
23
  import { OwnedTrack, OwnedTrackPublication, TrackSource } from "./track_pb.js";
24
+ import { RtcStats } from "./stats_pb.js";
24
25
  import { VideoCodec } from "./video_frame_pb.js";
25
26
  import { E2eeOptions, EncryptionState } from "./e2ee_pb.js";
26
27
  import { FfiOwnedHandle } from "./handle_pb.js";
@@ -752,6 +753,11 @@ export class PublishDataRequest extends Message<PublishDataRequest> {
752
753
  */
753
754
  destinationSids: string[] = [];
754
755
 
756
+ /**
757
+ * @generated from field: optional string topic = 6;
758
+ */
759
+ topic?: string;
760
+
755
761
  constructor(data?: PartialMessage<PublishDataRequest>) {
756
762
  super();
757
763
  proto3.util.initPartial(data, this);
@@ -765,6 +771,7 @@ export class PublishDataRequest extends Message<PublishDataRequest> {
765
771
  { no: 3, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
766
772
  { no: 4, name: "kind", kind: "enum", T: proto3.getEnumType(DataPacketKind) },
767
773
  { no: 5, name: "destination_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
774
+ { no: 6, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
768
775
  ]);
769
776
 
770
777
  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublishDataRequest {
@@ -1178,6 +1185,135 @@ export class SetSubscribedResponse extends Message<SetSubscribedResponse> {
1178
1185
  }
1179
1186
  }
1180
1187
 
1188
+ /**
1189
+ * @generated from message livekit.proto.GetSessionStatsRequest
1190
+ */
1191
+ export class GetSessionStatsRequest extends Message<GetSessionStatsRequest> {
1192
+ /**
1193
+ * @generated from field: uint64 room_handle = 1;
1194
+ */
1195
+ roomHandle = protoInt64.zero;
1196
+
1197
+ constructor(data?: PartialMessage<GetSessionStatsRequest>) {
1198
+ super();
1199
+ proto3.util.initPartial(data, this);
1200
+ }
1201
+
1202
+ static readonly runtime: typeof proto3 = proto3;
1203
+ static readonly typeName = "livekit.proto.GetSessionStatsRequest";
1204
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1205
+ { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1206
+ ]);
1207
+
1208
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetSessionStatsRequest {
1209
+ return new GetSessionStatsRequest().fromBinary(bytes, options);
1210
+ }
1211
+
1212
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetSessionStatsRequest {
1213
+ return new GetSessionStatsRequest().fromJson(jsonValue, options);
1214
+ }
1215
+
1216
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetSessionStatsRequest {
1217
+ return new GetSessionStatsRequest().fromJsonString(jsonString, options);
1218
+ }
1219
+
1220
+ static equals(a: GetSessionStatsRequest | PlainMessage<GetSessionStatsRequest> | undefined, b: GetSessionStatsRequest | PlainMessage<GetSessionStatsRequest> | undefined): boolean {
1221
+ return proto3.util.equals(GetSessionStatsRequest, a, b);
1222
+ }
1223
+ }
1224
+
1225
+ /**
1226
+ * @generated from message livekit.proto.GetSessionStatsResponse
1227
+ */
1228
+ export class GetSessionStatsResponse extends Message<GetSessionStatsResponse> {
1229
+ /**
1230
+ * @generated from field: uint64 async_id = 1;
1231
+ */
1232
+ asyncId = protoInt64.zero;
1233
+
1234
+ constructor(data?: PartialMessage<GetSessionStatsResponse>) {
1235
+ super();
1236
+ proto3.util.initPartial(data, this);
1237
+ }
1238
+
1239
+ static readonly runtime: typeof proto3 = proto3;
1240
+ static readonly typeName = "livekit.proto.GetSessionStatsResponse";
1241
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1242
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1243
+ ]);
1244
+
1245
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetSessionStatsResponse {
1246
+ return new GetSessionStatsResponse().fromBinary(bytes, options);
1247
+ }
1248
+
1249
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetSessionStatsResponse {
1250
+ return new GetSessionStatsResponse().fromJson(jsonValue, options);
1251
+ }
1252
+
1253
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetSessionStatsResponse {
1254
+ return new GetSessionStatsResponse().fromJsonString(jsonString, options);
1255
+ }
1256
+
1257
+ static equals(a: GetSessionStatsResponse | PlainMessage<GetSessionStatsResponse> | undefined, b: GetSessionStatsResponse | PlainMessage<GetSessionStatsResponse> | undefined): boolean {
1258
+ return proto3.util.equals(GetSessionStatsResponse, a, b);
1259
+ }
1260
+ }
1261
+
1262
+ /**
1263
+ * @generated from message livekit.proto.GetSessionStatsCallback
1264
+ */
1265
+ export class GetSessionStatsCallback extends Message<GetSessionStatsCallback> {
1266
+ /**
1267
+ * @generated from field: uint64 async_id = 1;
1268
+ */
1269
+ asyncId = protoInt64.zero;
1270
+
1271
+ /**
1272
+ * @generated from field: optional string error = 2;
1273
+ */
1274
+ error?: string;
1275
+
1276
+ /**
1277
+ * @generated from field: repeated livekit.proto.RtcStats publisher_stats = 3;
1278
+ */
1279
+ publisherStats: RtcStats[] = [];
1280
+
1281
+ /**
1282
+ * @generated from field: repeated livekit.proto.RtcStats subscriber_stats = 4;
1283
+ */
1284
+ subscriberStats: RtcStats[] = [];
1285
+
1286
+ constructor(data?: PartialMessage<GetSessionStatsCallback>) {
1287
+ super();
1288
+ proto3.util.initPartial(data, this);
1289
+ }
1290
+
1291
+ static readonly runtime: typeof proto3 = proto3;
1292
+ static readonly typeName = "livekit.proto.GetSessionStatsCallback";
1293
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1294
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1295
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1296
+ { no: 3, name: "publisher_stats", kind: "message", T: RtcStats, repeated: true },
1297
+ { no: 4, name: "subscriber_stats", kind: "message", T: RtcStats, repeated: true },
1298
+ ]);
1299
+
1300
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetSessionStatsCallback {
1301
+ return new GetSessionStatsCallback().fromBinary(bytes, options);
1302
+ }
1303
+
1304
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetSessionStatsCallback {
1305
+ return new GetSessionStatsCallback().fromJson(jsonValue, options);
1306
+ }
1307
+
1308
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetSessionStatsCallback {
1309
+ return new GetSessionStatsCallback().fromJsonString(jsonString, options);
1310
+ }
1311
+
1312
+ static equals(a: GetSessionStatsCallback | PlainMessage<GetSessionStatsCallback> | undefined, b: GetSessionStatsCallback | PlainMessage<GetSessionStatsCallback> | undefined): boolean {
1313
+ return proto3.util.equals(GetSessionStatsCallback, a, b);
1314
+ }
1315
+ }
1316
+
1181
1317
  /**
1182
1318
  * @generated from message livekit.proto.VideoEncoding
1183
1319
  */
@@ -2619,6 +2755,11 @@ export class DataReceived extends Message<DataReceived> {
2619
2755
  */
2620
2756
  kind = DataPacketKind.KIND_LOSSY;
2621
2757
 
2758
+ /**
2759
+ * @generated from field: optional string topic = 4;
2760
+ */
2761
+ topic?: string;
2762
+
2622
2763
  constructor(data?: PartialMessage<DataReceived>) {
2623
2764
  super();
2624
2765
  proto3.util.initPartial(data, this);
@@ -2630,6 +2771,7 @@ export class DataReceived extends Message<DataReceived> {
2630
2771
  { no: 1, name: "data", kind: "message", T: OwnedBuffer },
2631
2772
  { no: 2, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2632
2773
  { no: 3, name: "kind", kind: "enum", T: proto3.getEnumType(DataPacketKind) },
2774
+ { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2633
2775
  ]);
2634
2776
 
2635
2777
  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DataReceived {
@@ -39,12 +39,18 @@ export enum VideoCodec {
39
39
  * @generated from enum value: AV1 = 2;
40
40
  */
41
41
  AV1 = 2,
42
+
43
+ /**
44
+ * @generated from enum value: VP9 = 3;
45
+ */
46
+ VP9 = 3,
42
47
  }
43
48
  // Retrieve enum metadata with: proto3.getEnumType(VideoCodec)
44
49
  proto3.util.setEnumType(VideoCodec, "livekit.proto.VideoCodec", [
45
50
  { no: 0, name: "VP8" },
46
51
  { no: 1, name: "H264" },
47
52
  { no: 2, name: "AV1" },
53
+ { no: 3, name: "VP9" },
48
54
  ]);
49
55
 
50
56
  /**