mediasoup-client 3.6.68 → 3.6.69

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.
Files changed (55) hide show
  1. package/lib/Consumer.d.ts +3 -3
  2. package/lib/Consumer.d.ts.map +1 -1
  3. package/lib/Consumer.js +9 -9
  4. package/lib/DataConsumer.d.ts +1 -1
  5. package/lib/DataConsumer.d.ts.map +1 -1
  6. package/lib/DataConsumer.js +2 -2
  7. package/lib/DataProducer.d.ts +1 -1
  8. package/lib/DataProducer.d.ts.map +1 -1
  9. package/lib/DataProducer.js +2 -2
  10. package/lib/Device.d.ts +1 -1
  11. package/lib/Device.d.ts.map +1 -1
  12. package/lib/Device.js +5 -5
  13. package/lib/Producer.d.ts +3 -3
  14. package/lib/Producer.d.ts.map +1 -1
  15. package/lib/Producer.js +11 -11
  16. package/lib/Transport.d.ts +9 -9
  17. package/lib/Transport.d.ts.map +1 -1
  18. package/lib/Transport.js +44 -40
  19. package/lib/handlers/Chrome55.d.ts +3 -3
  20. package/lib/handlers/Chrome55.d.ts.map +1 -1
  21. package/lib/handlers/Chrome55.js +13 -13
  22. package/lib/handlers/Chrome67.d.ts +3 -3
  23. package/lib/handlers/Chrome67.d.ts.map +1 -1
  24. package/lib/handlers/Chrome67.js +18 -18
  25. package/lib/handlers/Chrome70.d.ts +3 -3
  26. package/lib/handlers/Chrome70.d.ts.map +1 -1
  27. package/lib/handlers/Chrome70.js +18 -18
  28. package/lib/handlers/Chrome74.d.ts +3 -3
  29. package/lib/handlers/Chrome74.d.ts.map +1 -1
  30. package/lib/handlers/Chrome74.js +22 -22
  31. package/lib/handlers/Edge11.d.ts +4 -4
  32. package/lib/handlers/Edge11.d.ts.map +1 -1
  33. package/lib/handlers/Edge11.js +11 -11
  34. package/lib/handlers/FakeHandler.d.ts +1 -1
  35. package/lib/handlers/FakeHandler.d.ts.map +1 -1
  36. package/lib/handlers/FakeHandler.js +5 -5
  37. package/lib/handlers/Firefox60.d.ts +3 -3
  38. package/lib/handlers/Firefox60.d.ts.map +1 -1
  39. package/lib/handlers/Firefox60.js +21 -21
  40. package/lib/handlers/ReactNative.d.ts +3 -3
  41. package/lib/handlers/ReactNative.d.ts.map +1 -1
  42. package/lib/handlers/ReactNative.js +13 -13
  43. package/lib/handlers/ReactNativeUnifiedPlan.d.ts +3 -3
  44. package/lib/handlers/ReactNativeUnifiedPlan.d.ts.map +1 -1
  45. package/lib/handlers/ReactNativeUnifiedPlan.js +22 -22
  46. package/lib/handlers/Safari11.d.ts +3 -3
  47. package/lib/handlers/Safari11.d.ts.map +1 -1
  48. package/lib/handlers/Safari11.js +18 -18
  49. package/lib/handlers/Safari12.d.ts +3 -3
  50. package/lib/handlers/Safari12.d.ts.map +1 -1
  51. package/lib/handlers/Safari12.js +22 -22
  52. package/lib/index.d.ts +1 -1
  53. package/lib/index.js +1 -1
  54. package/npm-scripts.js +1 -1
  55. package/package.json +8 -8
@@ -204,7 +204,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
204
204
  }
205
205
  async send({ track, encodings, codecOptions, codec }) {
206
206
  var _a;
207
- this._assertSendDirection();
207
+ this.assertSendDirection();
208
208
  logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);
209
209
  if (codec) {
210
210
  logger.warn('send() | codec selection is not available in %s handler', this.name);
@@ -221,7 +221,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
221
221
  sendingRemoteRtpParameters.codecs =
222
222
  ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);
223
223
  if (!this._transportReady) {
224
- await this._setupTransport({
224
+ await this.setupTransport({
225
225
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
226
226
  localSdpObject
227
227
  });
@@ -285,7 +285,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
285
285
  };
286
286
  }
287
287
  async stopSending(localId) {
288
- this._assertSendDirection();
288
+ this.assertSendDirection();
289
289
  const rtpSender = this._mapSendLocalIdRtpSender.get(localId);
290
290
  if (!rtpSender)
291
291
  throw new Error('associated RTCRtpSender not found');
@@ -321,7 +321,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
321
321
  // Unimplemented.
322
322
  }
323
323
  async replaceTrack(localId, track) {
324
- this._assertSendDirection();
324
+ this.assertSendDirection();
325
325
  if (track) {
326
326
  logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);
327
327
  }
@@ -341,7 +341,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
341
341
  this._sendStream.addTrack(track);
342
342
  }
343
343
  async setMaxSpatialLayer(localId, spatialLayer) {
344
- this._assertSendDirection();
344
+ this.assertSendDirection();
345
345
  logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);
346
346
  const rtpSender = this._mapSendLocalIdRtpSender.get(localId);
347
347
  if (!rtpSender)
@@ -356,7 +356,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
356
356
  await rtpSender.setParameters(parameters);
357
357
  }
358
358
  async setRtpEncodingParameters(localId, params) {
359
- this._assertSendDirection();
359
+ this.assertSendDirection();
360
360
  logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);
361
361
  const rtpSender = this._mapSendLocalIdRtpSender.get(localId);
362
362
  if (!rtpSender)
@@ -368,7 +368,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
368
368
  await rtpSender.setParameters(parameters);
369
369
  }
370
370
  async getSenderStats(localId) {
371
- this._assertSendDirection();
371
+ this.assertSendDirection();
372
372
  const rtpSender = this._mapSendLocalIdRtpSender.get(localId);
373
373
  if (!rtpSender)
374
374
  throw new Error('associated RTCRtpSender not found');
@@ -376,7 +376,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
376
376
  }
377
377
  async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {
378
378
  var _a;
379
- this._assertSendDirection();
379
+ this.assertSendDirection();
380
380
  const options = {
381
381
  negotiated: true,
382
382
  id: this._nextSendSctpStreamId,
@@ -398,7 +398,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
398
398
  const offerMediaObject = localSdpObject.media
399
399
  .find((m) => m.type === 'application');
400
400
  if (!this._transportReady) {
401
- await this._setupTransport({
401
+ await this.setupTransport({
402
402
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
403
403
  localSdpObject
404
404
  });
@@ -421,7 +421,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
421
421
  }
422
422
  async receive(optionsList) {
423
423
  var _a;
424
- this._assertRecvDirection();
424
+ this.assertRecvDirection();
425
425
  const results = [];
426
426
  for (const options of optionsList) {
427
427
  const { trackId, kind, rtpParameters, streamId } = options;
@@ -454,7 +454,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
454
454
  }
455
455
  answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
456
456
  if (!this._transportReady) {
457
- await this._setupTransport({
457
+ await this.setupTransport({
458
458
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
459
459
  localSdpObject
460
460
  });
@@ -480,7 +480,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
480
480
  return results;
481
481
  }
482
482
  async stopReceiving(localIds) {
483
- this._assertRecvDirection();
483
+ this.assertRecvDirection();
484
484
  for (const localId of localIds) {
485
485
  logger.debug('stopReceiving() [localId:%s]', localId);
486
486
  const { mid, rtpParameters } = this._mapRecvLocalIdInfo.get(localId) || {};
@@ -496,7 +496,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
496
496
  await this._pc.setLocalDescription(answer);
497
497
  }
498
498
  async getReceiverStats(localId) {
499
- this._assertRecvDirection();
499
+ this.assertRecvDirection();
500
500
  const { rtpReceiver } = this._mapRecvLocalIdInfo.get(localId) || {};
501
501
  if (!rtpReceiver)
502
502
  throw new Error('associated RTCRtpReceiver not found');
@@ -514,7 +514,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
514
514
  }
515
515
  async receiveDataChannel({ sctpStreamParameters, label, protocol }) {
516
516
  var _a;
517
- this._assertRecvDirection();
517
+ this.assertRecvDirection();
518
518
  const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
519
519
  const options = {
520
520
  negotiated: true,
@@ -536,7 +536,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
536
536
  const answer = await this._pc.createAnswer();
537
537
  if (!this._transportReady) {
538
538
  const localSdpObject = sdpTransform.parse(answer.sdp);
539
- await this._setupTransport({
539
+ await this.setupTransport({
540
540
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
541
541
  localSdpObject
542
542
  });
@@ -547,7 +547,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
547
547
  }
548
548
  return { dataChannel };
549
549
  }
550
- async _setupTransport({ localDtlsRole, localSdpObject }) {
550
+ async setupTransport({ localDtlsRole, localSdpObject }) {
551
551
  if (!localSdpObject)
552
552
  localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);
553
553
  // Get our local DTLS parameters.
@@ -562,12 +562,12 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
562
562
  });
563
563
  this._transportReady = true;
564
564
  }
565
- _assertSendDirection() {
565
+ assertSendDirection() {
566
566
  if (this._direction !== 'send') {
567
567
  throw new Error('method can just be called for handlers with "send" direction');
568
568
  }
569
569
  }
570
- _assertRecvDirection() {
570
+ assertRecvDirection() {
571
571
  if (this._direction !== 'recv') {
572
572
  throw new Error('method can just be called for handlers with "recv" direction');
573
573
  }
@@ -42,8 +42,8 @@ export declare class Safari12 extends HandlerInterface {
42
42
  resumeReceiving(localIds: string[]): Promise<void>;
43
43
  getReceiverStats(localId: string): Promise<RTCStatsReport>;
44
44
  receiveDataChannel({ sctpStreamParameters, label, protocol }: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
45
- private _setupTransport;
46
- private _assertSendDirection;
47
- private _assertRecvDirection;
45
+ private setupTransport;
46
+ private assertSendDirection;
47
+ private assertRecvDirection;
48
48
  }
49
49
  //# sourceMappingURL=Safari12.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Safari12.d.ts","sourceRoot":"","sources":["../../src/handlers/Safari12.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAY,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAM3E,qBAAa,QAAS,SAAQ,gBAAgB;IAG7C,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,OAAO,CAAC,UAAU,CAAC,CAAY;IAE/B,OAAO,CAAC,2BAA2B,CAAC,CAAmC;IAGvE,OAAO,CAAC,iCAAiC,CAAC,CAAmC;IAG7E,OAAO,CAAC,oBAAoB,CAAC,CAAW;IAExC,OAAO,CAAC,GAAG,CAAM;IAEjB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CACxB;IAEX,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD,OAAO,CAAC,2BAA2B,CAAS;IAE5C,OAAO,CAAC,qBAAqB,CAAK;IAElC,OAAO,CAAC,eAAe,CAAS;IAEhC;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,cAAc;;IAUtC,IAAI,IAAI,IAAI,MAAM,CAGjB;IAED,KAAK,IAAI,IAAI;IAcP,wBAAwB,IAAI,OAAO,CAAC,eAAe,CAAC;IAqCpD,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAS5D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MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxE,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBrE,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAYxD,eAAe,CACpB,EACC,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,QAAQ,EACR,EAAE,6BAA6B,GAC9B,OAAO,CAAC,4BAA4B,CAAC;IAsElC,OAAO,CACZ,WAAW,EAAE,qBAAqB,EAAE,GACjC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IA8F7B,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsChD,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCjD,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkClD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAY1D,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAgE7B,cAAc;IAuC5B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;CAQ3B"}
@@ -196,7 +196,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
196
196
  }
197
197
  async send({ track, encodings, codecOptions, codec }) {
198
198
  var _a;
199
- this._assertSendDirection();
199
+ this.assertSendDirection();
200
200
  logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);
201
201
  const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});
202
202
  // This may throw.
@@ -212,7 +212,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
212
212
  let localSdpObject = sdpTransform.parse(offer.sdp);
213
213
  let offerMediaObject;
214
214
  if (!this._transportReady) {
215
- await this._setupTransport({
215
+ await this.setupTransport({
216
216
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
217
217
  localSdpObject
218
218
  });
@@ -276,7 +276,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
276
276
  };
277
277
  }
278
278
  async stopSending(localId) {
279
- this._assertSendDirection();
279
+ this.assertSendDirection();
280
280
  logger.debug('stopSending() [localId:%s]', localId);
281
281
  const transceiver = this._mapMidTransceiver.get(localId);
282
282
  if (!transceiver)
@@ -300,7 +300,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
300
300
  }
301
301
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
302
302
  async pauseSending(localId) {
303
- this._assertSendDirection();
303
+ this.assertSendDirection();
304
304
  logger.debug('pauseSending() [localId:%s]', localId);
305
305
  const transceiver = this._mapMidTransceiver.get(localId);
306
306
  if (!transceiver)
@@ -316,7 +316,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
316
316
  }
317
317
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
318
318
  async resumeSending(localId) {
319
- this._assertSendDirection();
319
+ this.assertSendDirection();
320
320
  logger.debug('resumeSending() [localId:%s]', localId);
321
321
  const transceiver = this._mapMidTransceiver.get(localId);
322
322
  if (!transceiver)
@@ -331,7 +331,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
331
331
  await this._pc.setRemoteDescription(answer);
332
332
  }
333
333
  async replaceTrack(localId, track) {
334
- this._assertSendDirection();
334
+ this.assertSendDirection();
335
335
  if (track) {
336
336
  logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);
337
337
  }
@@ -344,7 +344,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
344
344
  await transceiver.sender.replaceTrack(track);
345
345
  }
346
346
  async setMaxSpatialLayer(localId, spatialLayer) {
347
- this._assertSendDirection();
347
+ this.assertSendDirection();
348
348
  logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);
349
349
  const transceiver = this._mapMidTransceiver.get(localId);
350
350
  if (!transceiver)
@@ -359,7 +359,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
359
359
  await transceiver.sender.setParameters(parameters);
360
360
  }
361
361
  async setRtpEncodingParameters(localId, params) {
362
- this._assertSendDirection();
362
+ this.assertSendDirection();
363
363
  logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);
364
364
  const transceiver = this._mapMidTransceiver.get(localId);
365
365
  if (!transceiver)
@@ -371,7 +371,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
371
371
  await transceiver.sender.setParameters(parameters);
372
372
  }
373
373
  async getSenderStats(localId) {
374
- this._assertSendDirection();
374
+ this.assertSendDirection();
375
375
  const transceiver = this._mapMidTransceiver.get(localId);
376
376
  if (!transceiver)
377
377
  throw new Error('associated RTCRtpTransceiver not found');
@@ -379,7 +379,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
379
379
  }
380
380
  async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {
381
381
  var _a;
382
- this._assertSendDirection();
382
+ this.assertSendDirection();
383
383
  const options = {
384
384
  negotiated: true,
385
385
  id: this._nextSendSctpStreamId,
@@ -401,7 +401,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
401
401
  const offerMediaObject = localSdpObject.media
402
402
  .find((m) => m.type === 'application');
403
403
  if (!this._transportReady) {
404
- await this._setupTransport({
404
+ await this.setupTransport({
405
405
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
406
406
  localSdpObject
407
407
  });
@@ -424,7 +424,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
424
424
  }
425
425
  async receive(optionsList) {
426
426
  var _a;
427
- this._assertRecvDirection();
427
+ this.assertRecvDirection();
428
428
  const results = [];
429
429
  const mapLocalId = new Map();
430
430
  for (const options of optionsList) {
@@ -459,7 +459,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
459
459
  }
460
460
  answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
461
461
  if (!this._transportReady) {
462
- await this._setupTransport({
462
+ await this.setupTransport({
463
463
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
464
464
  localSdpObject
465
465
  });
@@ -484,7 +484,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
484
484
  return results;
485
485
  }
486
486
  async stopReceiving(localIds) {
487
- this._assertRecvDirection();
487
+ this.assertRecvDirection();
488
488
  for (const localId of localIds) {
489
489
  logger.debug('stopReceiving() [localId:%s]', localId);
490
490
  const transceiver = this._mapMidTransceiver.get(localId);
@@ -503,7 +503,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
503
503
  }
504
504
  }
505
505
  async pauseReceiving(localIds) {
506
- this._assertRecvDirection();
506
+ this.assertRecvDirection();
507
507
  for (const localId of localIds) {
508
508
  logger.debug('pauseReceiving() [localId:%s]', localId);
509
509
  const transceiver = this._mapMidTransceiver.get(localId);
@@ -520,7 +520,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
520
520
  await this._pc.setLocalDescription(answer);
521
521
  }
522
522
  async resumeReceiving(localIds) {
523
- this._assertRecvDirection();
523
+ this.assertRecvDirection();
524
524
  for (const localId of localIds) {
525
525
  logger.debug('resumeReceiving() [localId:%s]', localId);
526
526
  const transceiver = this._mapMidTransceiver.get(localId);
@@ -537,7 +537,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
537
537
  await this._pc.setLocalDescription(answer);
538
538
  }
539
539
  async getReceiverStats(localId) {
540
- this._assertRecvDirection();
540
+ this.assertRecvDirection();
541
541
  const transceiver = this._mapMidTransceiver.get(localId);
542
542
  if (!transceiver)
543
543
  throw new Error('associated RTCRtpTransceiver not found');
@@ -545,7 +545,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
545
545
  }
546
546
  async receiveDataChannel({ sctpStreamParameters, label, protocol }) {
547
547
  var _a;
548
- this._assertRecvDirection();
548
+ this.assertRecvDirection();
549
549
  const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
550
550
  const options = {
551
551
  negotiated: true,
@@ -567,7 +567,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
567
567
  const answer = await this._pc.createAnswer();
568
568
  if (!this._transportReady) {
569
569
  const localSdpObject = sdpTransform.parse(answer.sdp);
570
- await this._setupTransport({
570
+ await this.setupTransport({
571
571
  localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
572
572
  localSdpObject
573
573
  });
@@ -578,7 +578,7 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
578
578
  }
579
579
  return { dataChannel };
580
580
  }
581
- async _setupTransport({ localDtlsRole, localSdpObject }) {
581
+ async setupTransport({ localDtlsRole, localSdpObject }) {
582
582
  if (!localSdpObject)
583
583
  localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);
584
584
  // Get our local DTLS parameters.
@@ -593,12 +593,12 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
593
593
  });
594
594
  this._transportReady = true;
595
595
  }
596
- _assertSendDirection() {
596
+ assertSendDirection() {
597
597
  if (this._direction !== 'send') {
598
598
  throw new Error('method can just be called for handlers with "send" direction');
599
599
  }
600
600
  }
601
- _assertRecvDirection() {
601
+ assertRecvDirection() {
602
602
  if (this._direction !== 'recv') {
603
603
  throw new Error('method can just be called for handlers with "recv" direction');
604
604
  }
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { types };
8
8
  /**
9
9
  * Expose mediasoup-client version.
10
10
  */
11
- export declare const version = "3.6.68";
11
+ export declare const version = "3.6.69";
12
12
  /**
13
13
  * Expose Device class and detectDevice() helper.
14
14
  */
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ exports.types = types;
37
37
  /**
38
38
  * Expose mediasoup-client version.
39
39
  */
40
- exports.version = '3.6.68';
40
+ exports.version = '3.6.69';
41
41
  /**
42
42
  * Expose parseScalabilityMode() function.
43
43
  */
package/npm-scripts.js CHANGED
@@ -46,7 +46,7 @@ switch (task)
46
46
  {
47
47
  deleteLib();
48
48
 
49
- const TscWatchClient = require('tsc-watch/client');
49
+ const { TscWatchClient } = require('tsc-watch/client');
50
50
  const watch = new TscWatchClient();
51
51
 
52
52
  watch.on('success', replaceVersion);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasoup-client",
3
- "version": "3.6.68",
3
+ "version": "3.6.69",
4
4
  "description": "mediasoup client side JavaScript library",
5
5
  "contributors": [
6
6
  "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
@@ -62,14 +62,14 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@types/debug": "^4.1.7",
65
- "awaitqueue": "^2.4.0",
65
+ "awaitqueue": "^3.0.0",
66
66
  "bowser": "^2.11.0",
67
67
  "debug": "^4.3.4",
68
68
  "events": "^3.3.0",
69
69
  "fake-mediastreamtrack": "^1.1.6",
70
70
  "h264-profile-level-id": "^1.0.1",
71
71
  "sdp-transform": "^2.14.1",
72
- "supports-color": "^9.3.0",
72
+ "supports-color": "^9.3.1",
73
73
  "uuid": "^3.4.0"
74
74
  },
75
75
  "devDependencies": {
@@ -77,14 +77,14 @@
77
77
  "@types/jest": "^29.2.4",
78
78
  "@types/sdp-transform": "^2.4.5",
79
79
  "@types/uuid": "^3.4.9",
80
- "@typescript-eslint/eslint-plugin": "^5.46.0",
81
- "@typescript-eslint/parser": "^5.46.0",
82
- "eslint": "^8.29.0",
83
- "eslint-plugin-jest": "^27.1.6",
80
+ "@typescript-eslint/eslint-plugin": "^5.47.1",
81
+ "@typescript-eslint/parser": "^5.47.1",
82
+ "eslint": "^8.30.0",
83
+ "eslint-plugin-jest": "^27.1.7",
84
84
  "jest": "^29.3.1",
85
85
  "open-cli": "^7.1.0",
86
86
  "ts-jest": "^29.0.3",
87
- "tsc-watch": "^5.0.3",
87
+ "tsc-watch": "^6.0.0",
88
88
  "typescript": "^4.9.4"
89
89
  }
90
90
  }