livekit-client 2.3.1 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) 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 +6 -1
  4. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  5. package/dist/livekit-client.esm.mjs +72 -136
  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/connectionHelper/ConnectionCheck.d.ts.map +1 -1
  10. package/dist/src/connectionHelper/checks/Checker.d.ts.map +1 -1
  11. package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
  12. package/dist/src/e2ee/KeyProvider.d.ts.map +1 -1
  13. package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
  14. package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
  15. package/dist/src/logger.d.ts.map +1 -1
  16. package/dist/src/room/PCTransport.d.ts +1 -2
  17. package/dist/src/room/PCTransport.d.ts.map +1 -1
  18. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  19. package/dist/src/room/Room.d.ts.map +1 -1
  20. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  21. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  22. package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
  23. package/dist/src/room/track/Track.d.ts.map +1 -1
  24. package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
  25. package/dist/ts4.2/src/room/PCTransport.d.ts +1 -2
  26. package/package.json +12 -12
  27. package/src/e2ee/worker/FrameCryptor.ts +3 -1
  28. package/src/e2ee/worker/e2ee.worker.ts +5 -1
  29. package/src/room/Room.ts +7 -3
  30. package/src/room/participant/LocalParticipant.ts +10 -0
  31. package/src/room/track/Track.ts +1 -1
@@ -1401,11 +1401,13 @@ class FrameCryptor extends BaseFrameCryptor {
1401
1401
  }, this.logContext));
1402
1402
  this.detectedCodec = detectedCodec;
1403
1403
  }
1404
- if (detectedCodec === 'av1' || detectedCodec === 'vp9') {
1404
+ if (detectedCodec === 'av1') {
1405
1405
  throw new Error("".concat(detectedCodec, " is not yet supported for end to end encryption"));
1406
1406
  }
1407
1407
  if (detectedCodec === 'vp8') {
1408
1408
  frameInfo.unencryptedBytes = UNENCRYPTED_BYTES[frame.type];
1409
+ } else if (detectedCodec === 'vp9') {
1410
+ frameInfo.unencryptedBytes = 0;
1409
1411
  return frameInfo;
1410
1412
  }
1411
1413
  const data = new Uint8Array(frame.data);
@@ -1693,6 +1695,7 @@ let isEncryptionEnabled = false;
1693
1695
  let useSharedKey = false;
1694
1696
  let sifTrailer;
1695
1697
  let keyProviderOptions = KEY_PROVIDER_DEFAULTS;
1698
+ let rtpMap = new Map();
1696
1699
  workerLogger.setDefaultLevel('info');
1697
1700
  onmessage = ev => {
1698
1701
  const {
@@ -1746,6 +1749,7 @@ onmessage = ev => {
1746
1749
  break;
1747
1750
  case 'setRTPMap':
1748
1751
  // this is only used for the local participant
1752
+ rtpMap = data.map;
1749
1753
  participantCryptors.forEach(cr => {
1750
1754
  if (cr.getParticipantIdentity() === data.participantIdentity) {
1751
1755
  cr.setRtpMap(data.map);
@@ -1801,6 +1805,7 @@ function getTrackCryptor(participantIdentity, trackId) {
1801
1805
  keyProviderOptions,
1802
1806
  sifTrailer
1803
1807
  });
1808
+ cryptor.setRtpMap(rtpMap);
1804
1809
  setupCryptorErrorEvents(cryptor);
1805
1810
  participantCryptors.push(cryptor);
1806
1811
  } else if (participantIdentity !== cryptor.getParticipantIdentity()) {