livekit-client 2.5.4 → 2.5.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -10479,6 +10479,7 @@ var RoomEvent;
10479
10479
  * Participant attributes is an app-specific key value state to be pushed to
10480
10480
  * all users.
10481
10481
  * When a participant's attributes changed, this event will be emitted with the changed attributes and the participant
10482
+ * args: (changedAttributes: [[Record<string, string]], participant: [[Participant]])
10482
10483
  */
10483
10484
  RoomEvent["ParticipantAttributesChanged"] = "participantAttributesChanged";
10484
10485
  /**
@@ -10762,6 +10763,7 @@ var ParticipantEvent;
10762
10763
  * Participant attributes is an app-specific key value state to be pushed to
10763
10764
  * all users.
10764
10765
  * When a participant's attributes changed, this event will be emitted with the changed attributes
10766
+ * args: (changedAttributes: [[Record<string, string]])
10765
10767
  */
10766
10768
  ParticipantEvent["AttributesChanged"] = "attributesChanged";
10767
10769
  /**
@@ -10993,7 +10995,7 @@ function getOSVersion(ua) {
10993
10995
  return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
10994
10996
  }
10995
10997
 
10996
- var version$1 = "2.5.4";
10998
+ var version$1 = "2.5.6";
10997
10999
 
10998
11000
  const version = version$1;
10999
11001
  const protocolVersion = 15;
@@ -12755,6 +12757,11 @@ class E2EEManager extends eventsExports.EventEmitter {
12755
12757
  }
12756
12758
  break;
12757
12759
  case 'enable':
12760
+ if (data.enabled) {
12761
+ this.keyProvider.getKeys().forEach(keyInfo => {
12762
+ this.postKey(keyInfo);
12763
+ });
12764
+ }
12758
12765
  if (this.encryptionEnabled !== data.enabled && data.participantIdentity === ((_a = this.room) === null || _a === void 0 ? void 0 : _a.localParticipant.identity)) {
12759
12766
  this.emit(EncryptionEvent.ParticipantEncryptionStatusChanged, data.enabled, this.room.localParticipant);
12760
12767
  this.encryptionEnabled = data.enabled;
@@ -12765,11 +12772,6 @@ class E2EEManager extends eventsExports.EventEmitter {
12765
12772
  }
12766
12773
  this.emit(EncryptionEvent.ParticipantEncryptionStatusChanged, data.enabled, participant);
12767
12774
  }
12768
- if (this.encryptionEnabled) {
12769
- this.keyProvider.getKeys().forEach(keyInfo => {
12770
- this.postKey(keyInfo);
12771
- });
12772
- }
12773
12775
  break;
12774
12776
  case 'ratchetKey':
12775
12777
  this.keyProvider.emit(KeyProviderEvent.KeyRatcheted, data.material, data.keyIndex);
@@ -12863,10 +12865,10 @@ class E2EEManager extends eventsExports.EventEmitter {
12863
12865
  if (!this.room) {
12864
12866
  throw new TypeError("expected room to be present on signal connect");
12865
12867
  }
12866
- this.setParticipantCryptorEnabled(this.room.localParticipant.isE2EEEnabled, this.room.localParticipant.identity);
12867
12868
  keyProvider.getKeys().forEach(keyInfo => {
12868
12869
  this.postKey(keyInfo);
12869
12870
  });
12871
+ this.setParticipantCryptorEnabled(this.room.localParticipant.isE2EEEnabled, this.room.localParticipant.identity);
12870
12872
  });
12871
12873
  room.localParticipant.on(ParticipantEvent.LocalTrackPublished, publication => __awaiter(this, void 0, void 0, function* () {
12872
12874
  this.setupE2EESender(publication.track, publication.track.sender);
@@ -18815,7 +18817,7 @@ class Participant extends eventsExports.EventEmitter {
18815
18817
  * Updates metadata from server
18816
18818
  **/
18817
18819
  _setAttributes(attributes) {
18818
- const diff = diffAttributes(attributes, this.attributes);
18820
+ const diff = diffAttributes(this.attributes, attributes);
18819
18821
  this._attributes = attributes;
18820
18822
  if (Object.keys(diff).length > 0) {
18821
18823
  this.emit(ParticipantEvent.AttributesChanged, diff);