livekit-client 2.5.7 → 2.5.8

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.
@@ -3884,6 +3884,12 @@ const DisconnectReason = /*@__PURE__*/proto3.makeEnum("livekit.DisconnectReason"
3884
3884
  }, {
3885
3885
  no: 10,
3886
3886
  name: "ROOM_CLOSED"
3887
+ }, {
3888
+ no: 11,
3889
+ name: "USER_UNAVAILABLE"
3890
+ }, {
3891
+ no: 12,
3892
+ name: "USER_REJECTED"
3887
3893
  }]);
3888
3894
 
3889
3895
  /**
@@ -10745,6 +10751,10 @@ var RoomEvent;
10745
10751
  * fired when the first remote participant has subscribed to the localParticipant's track
10746
10752
  */
10747
10753
  RoomEvent["LocalTrackSubscribed"] = "localTrackSubscribed";
10754
+ /**
10755
+ * fired when the client receives connection metrics from other participants
10756
+ */
10757
+ RoomEvent["MetricsReceived"] = "metricsReceived";
10748
10758
  })(RoomEvent || (RoomEvent = {}));
10749
10759
  var ParticipantEvent;
10750
10760
  (function (ParticipantEvent) {
@@ -11138,7 +11148,7 @@ function getOSVersion(ua) {
11138
11148
  return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
11139
11149
  }
11140
11150
 
11141
- var version$1 = "2.5.7";
11151
+ var version$1 = "2.5.8";
11142
11152
 
11143
11153
  const version = version$1;
11144
11154
  const protocolVersion = 15;
@@ -18675,7 +18685,7 @@ class LocalTrackPublication extends TrackPublication {
18675
18685
  features.add(AudioTrackFeature.TF_STEREO);
18676
18686
  }
18677
18687
  if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.dtx)) {
18678
- features.add(AudioTrackFeature.TF_STEREO);
18688
+ features.add(AudioTrackFeature.TF_NO_DTX);
18679
18689
  }
18680
18690
  if (this.track.enhancedNoiseCancellation) {
18681
18691
  features.add(AudioTrackFeature.TF_ENHANCED_NOISE_CANCELLATION);
@@ -20232,6 +20242,27 @@ class LocalParticipant extends Participant {
20232
20242
  }();
20233
20243
  });
20234
20244
  }
20245
+ /**
20246
+ * Publish SIP DTMF message to the room.
20247
+ *
20248
+ * @param code DTMF code
20249
+ * @param digit DTMF digit
20250
+ */
20251
+ publishDtmf(code, digit) {
20252
+ return __awaiter(this, void 0, void 0, function* () {
20253
+ const packet = new DataPacket({
20254
+ kind: DataPacket_Kind.RELIABLE,
20255
+ value: {
20256
+ case: 'sipDtmf',
20257
+ value: new SipDTMF({
20258
+ code: code,
20259
+ digit: digit
20260
+ })
20261
+ }
20262
+ });
20263
+ yield this.engine.sendDataPacket(packet, DataPacket_Kind.RELIABLE);
20264
+ });
20265
+ }
20235
20266
  sendChatMessage(text) {
20236
20267
  return __awaiter(this, void 0, void 0, function* () {
20237
20268
  const msg = {
@@ -21436,6 +21467,8 @@ class Room extends eventsExports.EventEmitter {
21436
21467
  this.handleSipDtmf(participant, packet.value.value);
21437
21468
  } else if (packet.value.case === 'chatMessage') {
21438
21469
  this.handleChatMessage(participant, packet.value.value);
21470
+ } else if (packet.value.case === 'metrics') {
21471
+ this.handleMetrics(packet.value.value, participant);
21439
21472
  }
21440
21473
  };
21441
21474
  this.handleUserPacket = (participant, userPacket, kind) => {
@@ -21462,6 +21495,9 @@ class Room extends eventsExports.EventEmitter {
21462
21495
  const msg = extractChatMessage(chatMessage);
21463
21496
  this.emit(RoomEvent.ChatMessage, msg, participant);
21464
21497
  };
21498
+ this.handleMetrics = (metrics, participant) => {
21499
+ this.emit(RoomEvent.MetricsReceived, metrics, participant);
21500
+ };
21465
21501
  this.handleAudioPlaybackStarted = () => {
21466
21502
  if (this.canPlaybackAudio) {
21467
21503
  return;