livekit-client 1.1.6 → 1.1.7

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.
@@ -10070,7 +10070,7 @@ function computeBitrate(currentStats, prevStats) {
10070
10070
  return (bytesNow - bytesPrev) * 8 * 1000 / (currentStats.timestamp - prevStats.timestamp);
10071
10071
  }
10072
10072
 
10073
- var version$1 = "1.1.6";
10073
+ var version$1 = "1.1.7";
10074
10074
 
10075
10075
  const version = version$1;
10076
10076
  const protocolVersion = 8;
@@ -14500,6 +14500,32 @@ class LocalParticipant extends Participant {
14500
14500
  this.updateTrackSubscriptionPermissions();
14501
14501
  }
14502
14502
  }
14503
+ /** @internal */
14504
+
14505
+
14506
+ updateInfo(info) {
14507
+ super.updateInfo(info); // reconcile track mute status.
14508
+ // if server's track mute status doesn't match actual, we'll have to update
14509
+ // the server's copy
14510
+
14511
+ info.tracks.forEach(ti => {
14512
+ var _a, _b;
14513
+
14514
+ const pub = this.tracks.get(ti.sid);
14515
+
14516
+ if (pub) {
14517
+ const mutedOnServer = pub.isMuted || ((_b = (_a = pub.track) === null || _a === void 0 ? void 0 : _a.isUpstreamPaused) !== null && _b !== void 0 ? _b : false);
14518
+
14519
+ if (mutedOnServer !== ti.muted) {
14520
+ livekitLogger.debug('updating server mute state after reconcile', {
14521
+ sid: ti.sid,
14522
+ muted: mutedOnServer
14523
+ });
14524
+ this.engine.client.sendMuteTrack(ti.sid, mutedOnServer);
14525
+ }
14526
+ }
14527
+ });
14528
+ }
14503
14529
 
14504
14530
  getPublicationForTrack(track) {
14505
14531
  let publication;
@@ -19930,6 +19956,15 @@ class Room extends events.exports.EventEmitter {
19930
19956
  let req;
19931
19957
 
19932
19958
  switch (scenario) {
19959
+ case 'signal-reconnect':
19960
+ this.engine.client.close();
19961
+
19962
+ if (this.engine.client.onClose) {
19963
+ this.engine.client.onClose('simulate disconnect');
19964
+ }
19965
+
19966
+ break;
19967
+
19933
19968
  case 'speaker':
19934
19969
  req = SimulateScenario.fromPartial({
19935
19970
  speakerUpdate: 3