livekit-server-sdk 1.2.4 → 1.2.6

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.
@@ -104,11 +104,16 @@ export interface Room {
104
104
  numParticipants: number;
105
105
  numPublishers: number;
106
106
  activeRecording: boolean;
107
+ playoutDelay?: PlayoutDelay;
107
108
  }
108
109
  export interface Codec {
109
110
  mime: string;
110
111
  fmtpLine: string;
111
112
  }
113
+ export interface PlayoutDelay {
114
+ enabled: boolean;
115
+ min: number;
116
+ }
112
117
  export interface ParticipantPermission {
113
118
  /** allow participant to subscribe to other tracks in the room */
114
119
  canSubscribe: boolean;
@@ -199,6 +204,7 @@ export interface TrackInfo {
199
204
  /** true if RED (Redundant Encoding) is disabled for audio */
200
205
  disableRed: boolean;
201
206
  encryption: Encryption_Type;
207
+ stream: string;
202
208
  }
203
209
  /** provide information about available spatial layers */
204
210
  export interface VideoLayer {
@@ -289,6 +295,8 @@ export declare enum ClientInfo_SDK {
289
295
  UNITY = 6,
290
296
  REACT_NATIVE = 7,
291
297
  RUST = 8,
298
+ PYTHON = 9,
299
+ CPP = 10,
292
300
  UNRECOGNIZED = -1
293
301
  }
294
302
  export declare function clientInfo_SDKFromJSON(object: any): ClientInfo_SDK;
@@ -386,6 +394,10 @@ export declare const Room: {
386
394
  numParticipants?: number | undefined;
387
395
  numPublishers?: number | undefined;
388
396
  activeRecording?: boolean | undefined;
397
+ playoutDelay?: {
398
+ enabled?: boolean | undefined;
399
+ min?: number | undefined;
400
+ } | undefined;
389
401
  } & {
390
402
  sid?: string | undefined;
391
403
  name?: string | undefined;
@@ -410,7 +422,14 @@ export declare const Room: {
410
422
  numParticipants?: number | undefined;
411
423
  numPublishers?: number | undefined;
412
424
  activeRecording?: boolean | undefined;
413
- } & { [K_2 in Exclude<keyof I, keyof Room>]: never; }>(object: I): Room;
425
+ playoutDelay?: ({
426
+ enabled?: boolean | undefined;
427
+ min?: number | undefined;
428
+ } & {
429
+ enabled?: boolean | undefined;
430
+ min?: number | undefined;
431
+ } & { [K_2 in Exclude<keyof I["playoutDelay"], keyof PlayoutDelay>]: never; }) | undefined;
432
+ } & { [K_3 in Exclude<keyof I, keyof Room>]: never; }>(object: I): Room;
414
433
  };
415
434
  export declare const Codec: {
416
435
  encode(message: Codec, writer?: _m0.Writer): _m0.Writer;
@@ -425,6 +444,19 @@ export declare const Codec: {
425
444
  fmtpLine?: string | undefined;
426
445
  } & { [K in Exclude<keyof I, keyof Codec>]: never; }>(object: I): Codec;
427
446
  };
447
+ export declare const PlayoutDelay: {
448
+ encode(message: PlayoutDelay, writer?: _m0.Writer): _m0.Writer;
449
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PlayoutDelay;
450
+ fromJSON(object: any): PlayoutDelay;
451
+ toJSON(message: PlayoutDelay): unknown;
452
+ fromPartial<I extends {
453
+ enabled?: boolean | undefined;
454
+ min?: number | undefined;
455
+ } & {
456
+ enabled?: boolean | undefined;
457
+ min?: number | undefined;
458
+ } & { [K in Exclude<keyof I, keyof PlayoutDelay>]: never; }>(object: I): PlayoutDelay;
459
+ };
428
460
  export declare const ParticipantPermission: {
429
461
  encode(message: ParticipantPermission, writer?: _m0.Writer): _m0.Writer;
430
462
  decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ParticipantPermission;
@@ -491,6 +523,7 @@ export declare const ParticipantInfo: {
491
523
  stereo?: boolean | undefined;
492
524
  disableRed?: boolean | undefined;
493
525
  encryption?: Encryption_Type | undefined;
526
+ stream?: string | undefined;
494
527
  }[] | undefined;
495
528
  metadata?: string | undefined;
496
529
  joinedAt?: number | undefined;
@@ -545,6 +578,7 @@ export declare const ParticipantInfo: {
545
578
  stereo?: boolean | undefined;
546
579
  disableRed?: boolean | undefined;
547
580
  encryption?: Encryption_Type | undefined;
581
+ stream?: string | undefined;
548
582
  }[] & ({
549
583
  sid?: string | undefined;
550
584
  type?: TrackType | undefined;
@@ -579,6 +613,7 @@ export declare const ParticipantInfo: {
579
613
  stereo?: boolean | undefined;
580
614
  disableRed?: boolean | undefined;
581
615
  encryption?: Encryption_Type | undefined;
616
+ stream?: string | undefined;
582
617
  } & {
583
618
  sid?: string | undefined;
584
619
  type?: TrackType | undefined;
@@ -682,6 +717,7 @@ export declare const ParticipantInfo: {
682
717
  stereo?: boolean | undefined;
683
718
  disableRed?: boolean | undefined;
684
719
  encryption?: Encryption_Type | undefined;
720
+ stream?: string | undefined;
685
721
  } & { [K_6 in Exclude<keyof I["tracks"][number], keyof TrackInfo>]: never; })[] & { [K_7 in Exclude<keyof I["tracks"], number | keyof {
686
722
  sid?: string | undefined;
687
723
  type?: TrackType | undefined;
@@ -716,6 +752,7 @@ export declare const ParticipantInfo: {
716
752
  stereo?: boolean | undefined;
717
753
  disableRed?: boolean | undefined;
718
754
  encryption?: Encryption_Type | undefined;
755
+ stream?: string | undefined;
719
756
  }[]>]: never; }) | undefined;
720
757
  metadata?: string | undefined;
721
758
  joinedAt?: number | undefined;
@@ -835,6 +872,7 @@ export declare const TrackInfo: {
835
872
  stereo?: boolean | undefined;
836
873
  disableRed?: boolean | undefined;
837
874
  encryption?: Encryption_Type | undefined;
875
+ stream?: string | undefined;
838
876
  } & {
839
877
  sid?: string | undefined;
840
878
  type?: TrackType | undefined;
@@ -938,6 +976,7 @@ export declare const TrackInfo: {
938
976
  stereo?: boolean | undefined;
939
977
  disableRed?: boolean | undefined;
940
978
  encryption?: Encryption_Type | undefined;
979
+ stream?: string | undefined;
941
980
  } & { [K_6 in Exclude<keyof I, keyof TrackInfo>]: never; }>(object: I): TrackInfo;
942
981
  };
943
982
  export declare const VideoLayer: {
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ParticipantInfo = exports.ParticipantPermission = exports.Codec = exports.Room = exports.clientInfo_SDKToJSON = exports.clientInfo_SDKFromJSON = exports.ClientInfo_SDK = exports.serverInfo_EditionToJSON = exports.serverInfo_EditionFromJSON = exports.ServerInfo_Edition = exports.dataPacket_KindToJSON = exports.dataPacket_KindFromJSON = exports.DataPacket_Kind = exports.encryption_TypeToJSON = exports.encryption_TypeFromJSON = exports.Encryption_Type = exports.participantInfo_StateToJSON = exports.participantInfo_StateFromJSON = exports.ParticipantInfo_State = exports.subscriptionErrorToJSON = exports.subscriptionErrorFromJSON = exports.SubscriptionError = exports.reconnectReasonToJSON = exports.reconnectReasonFromJSON = exports.ReconnectReason = exports.disconnectReasonToJSON = exports.disconnectReasonFromJSON = exports.DisconnectReason = exports.clientConfigSettingToJSON = exports.clientConfigSettingFromJSON = exports.ClientConfigSetting = exports.connectionQualityToJSON = exports.connectionQualityFromJSON = exports.ConnectionQuality = exports.videoQualityToJSON = exports.videoQualityFromJSON = exports.VideoQuality = exports.trackSourceToJSON = exports.trackSourceFromJSON = exports.TrackSource = exports.trackTypeToJSON = exports.trackTypeFromJSON = exports.TrackType = exports.videoCodecToJSON = exports.videoCodecFromJSON = exports.VideoCodec = exports.audioCodecToJSON = exports.audioCodecFromJSON = exports.AudioCodec = exports.protobufPackage = void 0;
7
- exports.TimedVersion = exports.RTPStats_GapHistogramEntry = exports.RTPStats = exports.DisabledCodecs = exports.VideoConfiguration = exports.ClientConfiguration = exports.ClientInfo = exports.ServerInfo = exports.ParticipantTracks = exports.UserPacket = exports.SpeakerInfo = exports.ActiveSpeakerUpdate = exports.DataPacket = exports.VideoLayer = exports.TrackInfo = exports.SimulcastCodecInfo = exports.Encryption = void 0;
6
+ exports.ParticipantPermission = exports.PlayoutDelay = exports.Codec = exports.Room = exports.clientInfo_SDKToJSON = exports.clientInfo_SDKFromJSON = exports.ClientInfo_SDK = exports.serverInfo_EditionToJSON = exports.serverInfo_EditionFromJSON = exports.ServerInfo_Edition = exports.dataPacket_KindToJSON = exports.dataPacket_KindFromJSON = exports.DataPacket_Kind = exports.encryption_TypeToJSON = exports.encryption_TypeFromJSON = exports.Encryption_Type = exports.participantInfo_StateToJSON = exports.participantInfo_StateFromJSON = exports.ParticipantInfo_State = exports.subscriptionErrorToJSON = exports.subscriptionErrorFromJSON = exports.SubscriptionError = exports.reconnectReasonToJSON = exports.reconnectReasonFromJSON = exports.ReconnectReason = exports.disconnectReasonToJSON = exports.disconnectReasonFromJSON = exports.DisconnectReason = exports.clientConfigSettingToJSON = exports.clientConfigSettingFromJSON = exports.ClientConfigSetting = exports.connectionQualityToJSON = exports.connectionQualityFromJSON = exports.ConnectionQuality = exports.videoQualityToJSON = exports.videoQualityFromJSON = exports.VideoQuality = exports.trackSourceToJSON = exports.trackSourceFromJSON = exports.TrackSource = exports.trackTypeToJSON = exports.trackTypeFromJSON = exports.TrackType = exports.videoCodecToJSON = exports.videoCodecFromJSON = exports.VideoCodec = exports.audioCodecToJSON = exports.audioCodecFromJSON = exports.AudioCodec = exports.protobufPackage = void 0;
7
+ exports.TimedVersion = exports.RTPStats_GapHistogramEntry = exports.RTPStats = exports.DisabledCodecs = exports.VideoConfiguration = exports.ClientConfiguration = exports.ClientInfo = exports.ServerInfo = exports.ParticipantTracks = exports.UserPacket = exports.SpeakerInfo = exports.ActiveSpeakerUpdate = exports.DataPacket = exports.VideoLayer = exports.TrackInfo = exports.SimulcastCodecInfo = exports.Encryption = exports.ParticipantInfo = void 0;
8
8
  /* eslint-disable */
9
9
  const long_1 = __importDefault(require("long"));
10
10
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -637,6 +637,8 @@ var ClientInfo_SDK;
637
637
  ClientInfo_SDK[ClientInfo_SDK["UNITY"] = 6] = "UNITY";
638
638
  ClientInfo_SDK[ClientInfo_SDK["REACT_NATIVE"] = 7] = "REACT_NATIVE";
639
639
  ClientInfo_SDK[ClientInfo_SDK["RUST"] = 8] = "RUST";
640
+ ClientInfo_SDK[ClientInfo_SDK["PYTHON"] = 9] = "PYTHON";
641
+ ClientInfo_SDK[ClientInfo_SDK["CPP"] = 10] = "CPP";
640
642
  ClientInfo_SDK[ClientInfo_SDK["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
641
643
  })(ClientInfo_SDK = exports.ClientInfo_SDK || (exports.ClientInfo_SDK = {}));
642
644
  function clientInfo_SDKFromJSON(object) {
@@ -668,6 +670,12 @@ function clientInfo_SDKFromJSON(object) {
668
670
  case 8:
669
671
  case "RUST":
670
672
  return ClientInfo_SDK.RUST;
673
+ case 9:
674
+ case "PYTHON":
675
+ return ClientInfo_SDK.PYTHON;
676
+ case 10:
677
+ case "CPP":
678
+ return ClientInfo_SDK.CPP;
671
679
  case -1:
672
680
  case "UNRECOGNIZED":
673
681
  default:
@@ -695,6 +703,10 @@ function clientInfo_SDKToJSON(object) {
695
703
  return "REACT_NATIVE";
696
704
  case ClientInfo_SDK.RUST:
697
705
  return "RUST";
706
+ case ClientInfo_SDK.PYTHON:
707
+ return "PYTHON";
708
+ case ClientInfo_SDK.CPP:
709
+ return "CPP";
698
710
  case ClientInfo_SDK.UNRECOGNIZED:
699
711
  default:
700
712
  return "UNRECOGNIZED";
@@ -714,6 +726,7 @@ function createBaseRoom() {
714
726
  numParticipants: 0,
715
727
  numPublishers: 0,
716
728
  activeRecording: false,
729
+ playoutDelay: undefined,
717
730
  };
718
731
  }
719
732
  exports.Room = {
@@ -751,6 +764,9 @@ exports.Room = {
751
764
  if (message.activeRecording === true) {
752
765
  writer.uint32(80).bool(message.activeRecording);
753
766
  }
767
+ if (message.playoutDelay !== undefined) {
768
+ exports.PlayoutDelay.encode(message.playoutDelay, writer.uint32(98).fork()).ldelim();
769
+ }
754
770
  return writer;
755
771
  },
756
772
  decode(input, length) {
@@ -793,6 +809,9 @@ exports.Room = {
793
809
  case 10:
794
810
  message.activeRecording = reader.bool();
795
811
  break;
812
+ case 12:
813
+ message.playoutDelay = exports.PlayoutDelay.decode(reader, reader.uint32());
814
+ break;
796
815
  default:
797
816
  reader.skipType(tag & 7);
798
817
  break;
@@ -815,6 +834,7 @@ exports.Room = {
815
834
  numParticipants: isSet(object.numParticipants) ? Number(object.numParticipants) : 0,
816
835
  numPublishers: isSet(object.numPublishers) ? Number(object.numPublishers) : 0,
817
836
  activeRecording: isSet(object.activeRecording) ? Boolean(object.activeRecording) : false,
837
+ playoutDelay: isSet(object.playoutDelay) ? exports.PlayoutDelay.fromJSON(object.playoutDelay) : undefined,
818
838
  };
819
839
  },
820
840
  toJSON(message) {
@@ -835,6 +855,8 @@ exports.Room = {
835
855
  message.numParticipants !== undefined && (obj.numParticipants = Math.round(message.numParticipants));
836
856
  message.numPublishers !== undefined && (obj.numPublishers = Math.round(message.numPublishers));
837
857
  message.activeRecording !== undefined && (obj.activeRecording = message.activeRecording);
858
+ message.playoutDelay !== undefined &&
859
+ (obj.playoutDelay = message.playoutDelay ? exports.PlayoutDelay.toJSON(message.playoutDelay) : undefined);
838
860
  return obj;
839
861
  },
840
862
  fromPartial(object) {
@@ -851,6 +873,9 @@ exports.Room = {
851
873
  message.numParticipants = (_j = object.numParticipants) !== null && _j !== void 0 ? _j : 0;
852
874
  message.numPublishers = (_k = object.numPublishers) !== null && _k !== void 0 ? _k : 0;
853
875
  message.activeRecording = (_l = object.activeRecording) !== null && _l !== void 0 ? _l : false;
876
+ message.playoutDelay = (object.playoutDelay !== undefined && object.playoutDelay !== null)
877
+ ? exports.PlayoutDelay.fromPartial(object.playoutDelay)
878
+ : undefined;
854
879
  return message;
855
880
  },
856
881
  };
@@ -907,6 +932,59 @@ exports.Codec = {
907
932
  return message;
908
933
  },
909
934
  };
935
+ function createBasePlayoutDelay() {
936
+ return { enabled: false, min: 0 };
937
+ }
938
+ exports.PlayoutDelay = {
939
+ encode(message, writer = minimal_1.default.Writer.create()) {
940
+ if (message.enabled === true) {
941
+ writer.uint32(8).bool(message.enabled);
942
+ }
943
+ if (message.min !== 0) {
944
+ writer.uint32(16).uint32(message.min);
945
+ }
946
+ return writer;
947
+ },
948
+ decode(input, length) {
949
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
950
+ let end = length === undefined ? reader.len : reader.pos + length;
951
+ const message = createBasePlayoutDelay();
952
+ while (reader.pos < end) {
953
+ const tag = reader.uint32();
954
+ switch (tag >>> 3) {
955
+ case 1:
956
+ message.enabled = reader.bool();
957
+ break;
958
+ case 2:
959
+ message.min = reader.uint32();
960
+ break;
961
+ default:
962
+ reader.skipType(tag & 7);
963
+ break;
964
+ }
965
+ }
966
+ return message;
967
+ },
968
+ fromJSON(object) {
969
+ return {
970
+ enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
971
+ min: isSet(object.min) ? Number(object.min) : 0,
972
+ };
973
+ },
974
+ toJSON(message) {
975
+ const obj = {};
976
+ message.enabled !== undefined && (obj.enabled = message.enabled);
977
+ message.min !== undefined && (obj.min = Math.round(message.min));
978
+ return obj;
979
+ },
980
+ fromPartial(object) {
981
+ var _a, _b;
982
+ const message = createBasePlayoutDelay();
983
+ message.enabled = (_a = object.enabled) !== null && _a !== void 0 ? _a : false;
984
+ message.min = (_b = object.min) !== null && _b !== void 0 ? _b : 0;
985
+ return message;
986
+ },
987
+ };
910
988
  function createBaseParticipantPermission() {
911
989
  return {
912
990
  canSubscribe: false,
@@ -1311,6 +1389,7 @@ function createBaseTrackInfo() {
1311
1389
  stereo: false,
1312
1390
  disableRed: false,
1313
1391
  encryption: 0,
1392
+ stream: "",
1314
1393
  };
1315
1394
  }
1316
1395
  exports.TrackInfo = {
@@ -1363,6 +1442,9 @@ exports.TrackInfo = {
1363
1442
  if (message.encryption !== 0) {
1364
1443
  writer.uint32(128).int32(message.encryption);
1365
1444
  }
1445
+ if (message.stream !== "") {
1446
+ writer.uint32(138).string(message.stream);
1447
+ }
1366
1448
  return writer;
1367
1449
  },
1368
1450
  decode(input, length) {
@@ -1420,6 +1502,9 @@ exports.TrackInfo = {
1420
1502
  case 16:
1421
1503
  message.encryption = reader.int32();
1422
1504
  break;
1505
+ case 17:
1506
+ message.stream = reader.string();
1507
+ break;
1423
1508
  default:
1424
1509
  reader.skipType(tag & 7);
1425
1510
  break;
@@ -1445,6 +1530,7 @@ exports.TrackInfo = {
1445
1530
  stereo: isSet(object.stereo) ? Boolean(object.stereo) : false,
1446
1531
  disableRed: isSet(object.disableRed) ? Boolean(object.disableRed) : false,
1447
1532
  encryption: isSet(object.encryption) ? encryption_TypeFromJSON(object.encryption) : 0,
1533
+ stream: isSet(object.stream) ? String(object.stream) : "",
1448
1534
  };
1449
1535
  },
1450
1536
  toJSON(message) {
@@ -1475,10 +1561,11 @@ exports.TrackInfo = {
1475
1561
  message.stereo !== undefined && (obj.stereo = message.stereo);
1476
1562
  message.disableRed !== undefined && (obj.disableRed = message.disableRed);
1477
1563
  message.encryption !== undefined && (obj.encryption = encryption_TypeToJSON(message.encryption));
1564
+ message.stream !== undefined && (obj.stream = message.stream);
1478
1565
  return obj;
1479
1566
  },
1480
1567
  fromPartial(object) {
1481
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
1568
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1482
1569
  const message = createBaseTrackInfo();
1483
1570
  message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
1484
1571
  message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
@@ -1496,6 +1583,7 @@ exports.TrackInfo = {
1496
1583
  message.stereo = (_p = object.stereo) !== null && _p !== void 0 ? _p : false;
1497
1584
  message.disableRed = (_q = object.disableRed) !== null && _q !== void 0 ? _q : false;
1498
1585
  message.encryption = (_r = object.encryption) !== null && _r !== void 0 ? _r : 0;
1586
+ message.stream = (_s = object.stream) !== null && _s !== void 0 ? _s : "";
1499
1587
  return message;
1500
1588
  },
1501
1589
  };