livekit-client 2.13.6 → 2.13.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.
@@ -1130,7 +1130,6 @@ class FrameCryptor extends BaseFrameCryptor {
1130
1130
  constructor(opts) {
1131
1131
  var _a;
1132
1132
  super();
1133
- this.isTransformActive = false;
1134
1133
  this.sendCounts = new Map();
1135
1134
  this.keys = opts.keys;
1136
1135
  this.participantIdentity = opts.participantIdentity;
@@ -1194,7 +1193,7 @@ class FrameCryptor extends BaseFrameCryptor {
1194
1193
  setRtpMap(map) {
1195
1194
  this.rtpMap = map;
1196
1195
  }
1197
- setupTransform(operation, readable, writable, trackId, isReuse, codec) {
1196
+ setupTransform(operation, readable, writable, trackId, codec) {
1198
1197
  if (codec) {
1199
1198
  workerLogger.info('setting codec on cryptor to', {
1200
1199
  codec
@@ -1206,20 +1205,13 @@ class FrameCryptor extends BaseFrameCryptor {
1206
1205
  passedTrackId: trackId,
1207
1206
  codec
1208
1207
  }, this.logContext));
1209
- if (isReuse && this.isTransformActive) {
1210
- workerLogger.debug('reuse transform', Object.assign({}, this.logContext));
1211
- return;
1212
- }
1213
1208
  const transformFn = operation === 'encode' ? this.encodeFunction : this.decodeFunction;
1214
1209
  const transformStream = new TransformStream({
1215
1210
  transform: transformFn.bind(this)
1216
1211
  });
1217
- this.isTransformActive = true;
1218
1212
  readable.pipeThrough(transformStream).pipeTo(writable).catch(e => {
1219
1213
  workerLogger.warn(e);
1220
1214
  this.emit(CryptorEvent.Error, e instanceof CryptorError ? e : new CryptorError(e.message, undefined, this.participantIdentity));
1221
- }).finally(() => {
1222
- this.isTransformActive = false;
1223
1215
  });
1224
1216
  this.trackId = trackId;
1225
1217
  }
@@ -1873,11 +1865,11 @@ onmessage = ev => {
1873
1865
  break;
1874
1866
  case 'decode':
1875
1867
  let cryptor = getTrackCryptor(data.participantIdentity, data.trackId);
1876
- cryptor.setupTransform(kind, data.readableStream, data.writableStream, data.trackId, data.isReuse, data.codec);
1868
+ cryptor.setupTransform(kind, data.readableStream, data.writableStream, data.trackId, data.codec);
1877
1869
  break;
1878
1870
  case 'encode':
1879
1871
  let pubCryptor = getTrackCryptor(data.participantIdentity, data.trackId);
1880
- pubCryptor.setupTransform(kind, data.readableStream, data.writableStream, data.trackId, data.isReuse, data.codec);
1872
+ pubCryptor.setupTransform(kind, data.readableStream, data.writableStream, data.trackId, data.codec);
1881
1873
  break;
1882
1874
  case 'setKey':
1883
1875
  if (useSharedKey) {