livekit-client 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/livekit-client.e2ee.worker.js +1 -1
  2. package/dist/livekit-client.e2ee.worker.js.map +1 -1
  3. package/dist/livekit-client.e2ee.worker.mjs +4 -4
  4. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  5. package/dist/livekit-client.esm.mjs +29 -21
  6. package/dist/livekit-client.esm.mjs.map +1 -1
  7. package/dist/livekit-client.umd.js +1 -1
  8. package/dist/livekit-client.umd.js.map +1 -1
  9. package/dist/src/room/Room.d.ts.map +1 -1
  10. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  11. package/dist/src/room/track/LocalAudioTrack.d.ts +8 -7
  12. package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
  13. package/dist/src/room/track/LocalTrack.d.ts +10 -9
  14. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  15. package/dist/src/room/track/LocalTrackPublication.d.ts +2 -2
  16. package/dist/src/room/track/LocalVideoTrack.d.ts +3 -3
  17. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  18. package/dist/src/room/track/RemoteAudioTrack.d.ts +2 -1
  19. package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
  20. package/dist/src/room/track/RemoteTrack.d.ts +2 -2
  21. package/dist/src/room/track/RemoteTrack.d.ts.map +1 -1
  22. package/dist/src/room/track/RemoteVideoTrack.d.ts +2 -1
  23. package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
  24. package/dist/src/room/track/Track.d.ts +3 -3
  25. package/dist/src/room/track/Track.d.ts.map +1 -1
  26. package/dist/src/room/track/processor/types.d.ts +4 -0
  27. package/dist/src/room/track/processor/types.d.ts.map +1 -1
  28. package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +8 -7
  29. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +10 -9
  30. package/dist/ts4.2/src/room/track/LocalTrackPublication.d.ts +2 -2
  31. package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +3 -3
  32. package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +2 -1
  33. package/dist/ts4.2/src/room/track/RemoteTrack.d.ts +2 -2
  34. package/dist/ts4.2/src/room/track/RemoteVideoTrack.d.ts +2 -1
  35. package/dist/ts4.2/src/room/track/Track.d.ts +3 -3
  36. package/dist/ts4.2/src/room/track/processor/types.d.ts +4 -0
  37. package/package.json +1 -1
  38. package/src/api/SignalClient.ts +1 -1
  39. package/src/e2ee/worker/e2ee.worker.ts +8 -4
  40. package/src/room/Room.ts +3 -0
  41. package/src/room/participant/LocalParticipant.ts +0 -1
  42. package/src/room/track/LocalAudioTrack.ts +8 -11
  43. package/src/room/track/LocalTrack.ts +36 -23
  44. package/src/room/track/LocalVideoTrack.ts +3 -3
  45. package/src/room/track/RemoteAudioTrack.ts +1 -1
  46. package/src/room/track/RemoteTrack.ts +4 -2
  47. package/src/room/track/RemoteVideoTrack.ts +1 -1
  48. package/src/room/track/Track.ts +5 -3
  49. package/src/room/track/processor/types.ts +4 -0
@@ -1643,7 +1643,7 @@ onmessage = ev => {
1643
1643
  }
1644
1644
  break;
1645
1645
  case 'removeTransform':
1646
- unsetCryptorParticipant(data.trackId);
1646
+ unsetCryptorParticipant(data.trackId, data.participantIdentity);
1647
1647
  break;
1648
1648
  case 'updateCodec':
1649
1649
  getTrackCryptor(data.participantIdentity, data.trackId).setVideoCodec(data.codec);
@@ -1680,7 +1680,7 @@ function handleRatchetRequest(data) {
1680
1680
  });
1681
1681
  }
1682
1682
  function getTrackCryptor(participantIdentity, trackId) {
1683
- let cryptor = participantCryptors.find(c => c.getTrackId() === trackId);
1683
+ let cryptor = participantCryptors.find(c => c.getParticipantIdentity() === participantIdentity && c.getTrackId() === trackId);
1684
1684
  if (!cryptor) {
1685
1685
  workerLogger.info('creating new cryptor for', {
1686
1686
  participantIdentity
@@ -1723,9 +1723,9 @@ function getSharedKeyHandler() {
1723
1723
  }
1724
1724
  return sharedKeyHandler;
1725
1725
  }
1726
- function unsetCryptorParticipant(trackId) {
1726
+ function unsetCryptorParticipant(trackId, participantIdentity) {
1727
1727
  var _a;
1728
- (_a = participantCryptors.find(c => c.getTrackId() === trackId)) === null || _a === void 0 ? void 0 : _a.unsetParticipant();
1728
+ (_a = participantCryptors.find(c => c.getParticipantIdentity() === participantIdentity && c.getTrackId() === trackId)) === null || _a === void 0 ? void 0 : _a.unsetParticipant();
1729
1729
  }
1730
1730
  function setEncryptionEnabled(enable, participantIdentity) {
1731
1731
  encryptionEnabledMap.set(participantIdentity, enable);