mediasoup-client 3.13.0 → 3.14.0

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 (62) hide show
  1. package/lib/DataConsumer.d.ts.map +1 -1
  2. package/lib/DataConsumer.js +5 -8
  3. package/lib/DataProducer.d.ts.map +1 -1
  4. package/lib/DataProducer.js +5 -7
  5. package/lib/Device.d.ts +2 -2
  6. package/lib/Device.d.ts.map +1 -1
  7. package/lib/Device.js +53 -70
  8. package/lib/RtpParameters.d.ts +8 -8
  9. package/lib/RtpParameters.d.ts.map +1 -1
  10. package/lib/Transport.d.ts +4 -4
  11. package/lib/Transport.d.ts.map +1 -1
  12. package/lib/Transport.js +6 -7
  13. package/lib/enhancedEvents.d.ts.map +1 -1
  14. package/lib/enhancedEvents.js +1 -0
  15. package/lib/handlers/Chrome111.d.ts +7 -12
  16. package/lib/handlers/Chrome111.d.ts.map +1 -1
  17. package/lib/handlers/Chrome111.js +130 -89
  18. package/lib/handlers/Chrome74.d.ts +7 -12
  19. package/lib/handlers/Chrome74.d.ts.map +1 -1
  20. package/lib/handlers/Chrome74.js +130 -85
  21. package/lib/handlers/FakeHandler.d.ts +6 -9
  22. package/lib/handlers/FakeHandler.d.ts.map +1 -1
  23. package/lib/handlers/FakeHandler.js +201 -60
  24. package/lib/handlers/Firefox120.d.ts +7 -12
  25. package/lib/handlers/Firefox120.d.ts.map +1 -1
  26. package/lib/handlers/Firefox120.js +154 -111
  27. package/lib/handlers/HandlerInterface.d.ts +11 -9
  28. package/lib/handlers/HandlerInterface.d.ts.map +1 -1
  29. package/lib/handlers/ReactNative106.d.ts +7 -12
  30. package/lib/handlers/ReactNative106.d.ts.map +1 -1
  31. package/lib/handlers/ReactNative106.js +136 -92
  32. package/lib/handlers/Safari12.d.ts +7 -12
  33. package/lib/handlers/Safari12.d.ts.map +1 -1
  34. package/lib/handlers/Safari12.js +132 -86
  35. package/lib/handlers/sdp/MediaSection.d.ts +5 -5
  36. package/lib/handlers/sdp/MediaSection.d.ts.map +1 -1
  37. package/lib/handlers/sdp/MediaSection.js +43 -45
  38. package/lib/handlers/sdp/RemoteSdp.d.ts +5 -6
  39. package/lib/handlers/sdp/RemoteSdp.d.ts.map +1 -1
  40. package/lib/handlers/sdp/RemoteSdp.js +5 -8
  41. package/lib/handlers/sdp/commonUtils.d.ts +5 -4
  42. package/lib/handlers/sdp/commonUtils.d.ts.map +1 -1
  43. package/lib/handlers/sdp/commonUtils.js +2 -2
  44. package/lib/handlers/sdp/plainRtpUtils.d.ts +4 -3
  45. package/lib/handlers/sdp/plainRtpUtils.d.ts.map +1 -1
  46. package/lib/handlers/sdp/plainRtpUtils.js +2 -2
  47. package/lib/handlers/sdp/unifiedPlanUtils.d.ts +3 -2
  48. package/lib/handlers/sdp/unifiedPlanUtils.d.ts.map +1 -1
  49. package/lib/handlers/sdp/unifiedPlanUtils.js +10 -8
  50. package/lib/index.d.ts +1 -1
  51. package/lib/index.js +1 -1
  52. package/lib/ortc.d.ts +7 -6
  53. package/lib/ortc.d.ts.map +1 -1
  54. package/lib/ortc.js +13 -14
  55. package/lib/privateTypes.d.ts +27 -0
  56. package/lib/privateTypes.d.ts.map +1 -0
  57. package/lib/privateTypes.js +2 -0
  58. package/lib/test/test.js +18 -1
  59. package/lib/utils.d.ts +1 -1
  60. package/lib/utils.d.ts.map +1 -1
  61. package/lib/utils.js +5 -4
  62. package/package.json +1 -2
@@ -5,13 +5,13 @@ const sdpTransform = require("sdp-transform");
5
5
  const Logger_1 = require("../Logger");
6
6
  const utils = require("../utils");
7
7
  const ortc = require("../ortc");
8
- const sdpCommonUtils = require("./sdp/commonUtils");
9
- const sdpUnifiedPlanUtils = require("./sdp/unifiedPlanUtils");
10
- const ortcUtils = require("./ortc/utils");
11
8
  const errors_1 = require("../errors");
9
+ const scalabilityModes_1 = require("../scalabilityModes");
12
10
  const HandlerInterface_1 = require("./HandlerInterface");
13
11
  const RemoteSdp_1 = require("./sdp/RemoteSdp");
14
- const scalabilityModes_1 = require("../scalabilityModes");
12
+ const sdpCommonUtils = require("./sdp/commonUtils");
13
+ const sdpUnifiedPlanUtils = require("./sdp/unifiedPlanUtils");
14
+ const ortcUtils = require("./ortc/utils");
15
15
  const logger = new Logger_1.Logger('ReactNative106');
16
16
  const NAME = 'ReactNative106';
17
17
  const SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };
@@ -46,75 +46,52 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
46
46
  * Creates a factory function.
47
47
  */
48
48
  static createFactory() {
49
- return () => new ReactNative106();
50
- }
51
- constructor() {
52
- super();
53
- }
54
- get name() {
55
- return NAME;
56
- }
57
- close() {
58
- logger.debug('close()');
59
- if (this._closed) {
60
- return;
61
- }
62
- this._closed = true;
63
- // Free/dispose native MediaStream but DO NOT free/dispose native
64
- // MediaStreamTracks (that is parent's business).
65
- // @ts-expect-error --- Proprietary API in react-native-webrtc.
66
- this._sendStream.release(/* releaseTracks */ false);
67
- // Close RTCPeerConnection.
68
- if (this._pc) {
69
- try {
70
- this._pc.close();
71
- }
72
- catch (error) { }
73
- }
74
- this.emit('@close');
75
- }
76
- async getNativeRtpCapabilities() {
77
- logger.debug('getNativeRtpCapabilities()');
78
- const pc = new RTCPeerConnection({
79
- iceServers: [],
80
- iceTransportPolicy: 'all',
81
- bundlePolicy: 'max-bundle',
82
- rtcpMuxPolicy: 'require',
83
- sdpSemantics: 'unified-plan',
84
- });
85
- try {
86
- pc.addTransceiver('audio');
87
- pc.addTransceiver('video');
88
- const offer = await pc.createOffer();
89
- try {
90
- pc.close();
91
- }
92
- catch (error) { }
93
- const sdpObject = sdpTransform.parse(offer.sdp);
94
- const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({
95
- sdpObject,
96
- });
97
- // libwebrtc supports NACK for OPUS but doesn't announce it.
98
- ortcUtils.addNackSupportForOpus(nativeRtpCapabilities);
99
- return nativeRtpCapabilities;
100
- }
101
- catch (error) {
102
- try {
103
- pc.close();
104
- }
105
- catch (error2) { }
106
- throw error;
107
- }
108
- }
109
- async getNativeSctpCapabilities() {
110
- logger.debug('getNativeSctpCapabilities()');
111
49
  return {
112
- numStreams: SCTP_NUM_STREAMS,
50
+ name: NAME,
51
+ factory: (options) => new ReactNative106(options),
52
+ getNativeRtpCapabilities: async () => {
53
+ logger.debug('getNativeRtpCapabilities()');
54
+ const pc = new RTCPeerConnection({
55
+ iceServers: [],
56
+ iceTransportPolicy: 'all',
57
+ bundlePolicy: 'max-bundle',
58
+ rtcpMuxPolicy: 'require',
59
+ });
60
+ try {
61
+ pc.addTransceiver('audio');
62
+ pc.addTransceiver('video');
63
+ const offer = await pc.createOffer();
64
+ try {
65
+ pc.close();
66
+ }
67
+ catch (error) { }
68
+ const sdpObject = sdpTransform.parse(offer.sdp);
69
+ const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({
70
+ sdpObject,
71
+ });
72
+ // libwebrtc supports NACK for OPUS but doesn't announce it.
73
+ ortcUtils.addNackSupportForOpus(nativeRtpCapabilities);
74
+ return nativeRtpCapabilities;
75
+ }
76
+ catch (error) {
77
+ try {
78
+ pc.close();
79
+ }
80
+ catch (error2) { }
81
+ throw error;
82
+ }
83
+ },
84
+ getNativeSctpCapabilities: async () => {
85
+ logger.debug('getNativeSctpCapabilities()');
86
+ return {
87
+ numStreams: SCTP_NUM_STREAMS,
88
+ };
89
+ },
113
90
  };
114
91
  }
115
- run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities, }) {
116
- this.assertNotClosed();
117
- logger.debug('run()');
92
+ constructor({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, extendedRtpCapabilities, }) {
93
+ super();
94
+ logger.debug('constructor()');
118
95
  this._direction = direction;
119
96
  this._remoteSdp = new RemoteSdp_1.RemoteSdp({
120
97
  iceParameters,
@@ -139,9 +116,8 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
139
116
  iceTransportPolicy: iceTransportPolicy ?? 'all',
140
117
  bundlePolicy: 'max-bundle',
141
118
  rtcpMuxPolicy: 'require',
142
- sdpSemantics: 'unified-plan',
143
119
  ...additionalSettings,
144
- }, proprietaryConstraints);
120
+ });
145
121
  this._pc.addEventListener('icegatheringstatechange', () => {
146
122
  this.emit('@icegatheringstatechange', this._pc.iceGatheringState);
147
123
  });
@@ -182,6 +158,28 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
182
158
  });
183
159
  }
184
160
  }
161
+ get name() {
162
+ return NAME;
163
+ }
164
+ close() {
165
+ logger.debug('close()');
166
+ if (this._closed) {
167
+ return;
168
+ }
169
+ this._closed = true;
170
+ // Free/dispose native MediaStream but DO NOT free/dispose native
171
+ // MediaStreamTracks (that is parent's business).
172
+ // @ts-expect-error --- Proprietary API in react-native-webrtc.
173
+ this._sendStream.release(/* releaseTracks */ false);
174
+ // Close RTCPeerConnection.
175
+ if (this._pc) {
176
+ try {
177
+ this._pc.close();
178
+ }
179
+ catch (error) { }
180
+ }
181
+ this.emit('@close');
182
+ }
185
183
  async updateIceServers(iceServers) {
186
184
  this.assertNotClosed();
187
185
  logger.debug('updateIceServers()');
@@ -201,12 +199,18 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
201
199
  const offer = await this._pc.createOffer({ iceRestart: true });
202
200
  logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);
203
201
  await this._pc.setLocalDescription(offer);
204
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
202
+ const answer = {
203
+ type: 'answer',
204
+ sdp: this._remoteSdp.getSdp(),
205
+ };
205
206
  logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);
206
207
  await this._pc.setRemoteDescription(answer);
207
208
  }
208
209
  else {
209
- const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
210
+ const offer = {
211
+ type: 'offer',
212
+ sdp: this._remoteSdp.getSdp(),
213
+ };
210
214
  logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);
211
215
  await this._pc.setRemoteDescription(offer);
212
216
  const answer = await this._pc.createAnswer();
@@ -244,8 +248,6 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
244
248
  }
245
249
  let offer = await this._pc.createOffer();
246
250
  let localSdpObject = sdpTransform.parse(offer.sdp);
247
- // @ts-expect-error --- sdpTransform.SessionDescription type doesn't
248
- // define extmapAllowMixed field.
249
251
  if (localSdpObject.extmapAllowMixed) {
250
252
  this._remoteSdp.setSessionExtmapAllowMixed();
251
253
  }
@@ -271,7 +273,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
271
273
  offerMediaObject,
272
274
  numStreams: layers.spatialLayers,
273
275
  });
274
- offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };
276
+ offer = {
277
+ type: 'offer',
278
+ sdp: sdpTransform.write(localSdpObject),
279
+ };
275
280
  }
276
281
  logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);
277
282
  await this._pc.setLocalDescription(offer);
@@ -339,7 +344,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
339
344
  answerRtpParameters: sendingRemoteRtpParameters,
340
345
  codecOptions,
341
346
  });
342
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
347
+ const answer = {
348
+ type: 'answer',
349
+ sdp: this._remoteSdp.getSdp(),
350
+ };
343
351
  logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);
344
352
  await this._pc.setRemoteDescription(answer);
345
353
  // Follow up of iOS react-native-webrtc 111.0.0 issue told above. Now yes,
@@ -380,7 +388,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
380
388
  const offer = await this._pc.createOffer();
381
389
  logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);
382
390
  await this._pc.setLocalDescription(offer);
383
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
391
+ const answer = {
392
+ type: 'answer',
393
+ sdp: this._remoteSdp.getSdp(),
394
+ };
384
395
  logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
385
396
  await this._pc.setRemoteDescription(answer);
386
397
  this._mapMidTransceiver.delete(localId);
@@ -398,7 +409,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
398
409
  const offer = await this._pc.createOffer();
399
410
  logger.debug('pauseSending() | calling pc.setLocalDescription() [offer:%o]', offer);
400
411
  await this._pc.setLocalDescription(offer);
401
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
412
+ const answer = {
413
+ type: 'answer',
414
+ sdp: this._remoteSdp.getSdp(),
415
+ };
402
416
  logger.debug('pauseSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
403
417
  await this._pc.setRemoteDescription(answer);
404
418
  }
@@ -415,7 +429,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
415
429
  const offer = await this._pc.createOffer();
416
430
  logger.debug('resumeSending() | calling pc.setLocalDescription() [offer:%o]', offer);
417
431
  await this._pc.setLocalDescription(offer);
418
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
432
+ const answer = {
433
+ type: 'answer',
434
+ sdp: this._remoteSdp.getSdp(),
435
+ };
419
436
  logger.debug('resumeSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
420
437
  await this._pc.setRemoteDescription(answer);
421
438
  }
@@ -456,7 +473,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
456
473
  const offer = await this._pc.createOffer();
457
474
  logger.debug('setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]', offer);
458
475
  await this._pc.setLocalDescription(offer);
459
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
476
+ const answer = {
477
+ type: 'answer',
478
+ sdp: this._remoteSdp.getSdp(),
479
+ };
460
480
  logger.debug('setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]', answer);
461
481
  await this._pc.setRemoteDescription(answer);
462
482
  }
@@ -477,7 +497,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
477
497
  const offer = await this._pc.createOffer();
478
498
  logger.debug('setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]', offer);
479
499
  await this._pc.setLocalDescription(offer);
480
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
500
+ const answer = {
501
+ type: 'answer',
502
+ sdp: this._remoteSdp.getSdp(),
503
+ };
481
504
  logger.debug('setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]', answer);
482
505
  await this._pc.setRemoteDescription(answer);
483
506
  }
@@ -511,7 +534,7 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
511
534
  if (!this._hasDataChannelMediaSection) {
512
535
  const offer = await this._pc.createOffer();
513
536
  const localSdpObject = sdpTransform.parse(offer.sdp);
514
- const offerMediaObject = localSdpObject.media.find((m) => m.type === 'application');
537
+ const offerMediaObject = localSdpObject.media.find(m => m.type === 'application');
515
538
  if (!this._transportReady) {
516
539
  await this.setupTransport({
517
540
  localDtlsRole: this._forcedLocalDtlsRole ?? 'client',
@@ -521,7 +544,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
521
544
  logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);
522
545
  await this._pc.setLocalDescription(offer);
523
546
  this._remoteSdp.sendSctpAssociation({ offerMediaObject });
524
- const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
547
+ const answer = {
548
+ type: 'answer',
549
+ sdp: this._remoteSdp.getSdp(),
550
+ };
525
551
  logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);
526
552
  await this._pc.setRemoteDescription(answer);
527
553
  this._hasDataChannelMediaSection = true;
@@ -552,7 +578,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
552
578
  trackId,
553
579
  });
554
580
  }
555
- const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
581
+ const offer = {
582
+ type: 'offer',
583
+ sdp: this._remoteSdp.getSdp(),
584
+ };
556
585
  logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);
557
586
  await this._pc.setRemoteDescription(offer);
558
587
  for (const options of optionsList) {
@@ -573,7 +602,7 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
573
602
  for (const options of optionsList) {
574
603
  const { trackId, rtpParameters } = options;
575
604
  const localId = mapLocalId.get(trackId);
576
- const answerMediaObject = localSdpObject.media.find((m) => String(m.mid) === localId);
605
+ const answerMediaObject = localSdpObject.media.find(m => String(m.mid) === localId);
577
606
  // May need to modify codec parameters in the answer based on codec
578
607
  // parameters in the offer.
579
608
  sdpCommonUtils.applyCodecParameters({
@@ -581,7 +610,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
581
610
  answerMediaObject,
582
611
  });
583
612
  }
584
- answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
613
+ answer = {
614
+ type: 'answer',
615
+ sdp: sdpTransform.write(localSdpObject),
616
+ };
585
617
  if (!this._transportReady) {
586
618
  await this.setupTransport({
587
619
  localDtlsRole: this._forcedLocalDtlsRole ?? 'client',
@@ -624,7 +656,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
624
656
  }
625
657
  this._remoteSdp.closeMediaSection(transceiver.mid);
626
658
  }
627
- const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
659
+ const offer = {
660
+ type: 'offer',
661
+ sdp: this._remoteSdp.getSdp(),
662
+ };
628
663
  logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
629
664
  await this._pc.setRemoteDescription(offer);
630
665
  const answer = await this._pc.createAnswer();
@@ -646,7 +681,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
646
681
  transceiver.direction = 'inactive';
647
682
  this._remoteSdp.pauseMediaSection(localId);
648
683
  }
649
- const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
684
+ const offer = {
685
+ type: 'offer',
686
+ sdp: this._remoteSdp.getSdp(),
687
+ };
650
688
  logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
651
689
  await this._pc.setRemoteDescription(offer);
652
690
  const answer = await this._pc.createAnswer();
@@ -665,7 +703,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
665
703
  transceiver.direction = 'recvonly';
666
704
  this._remoteSdp.resumeReceivingMediaSection(localId);
667
705
  }
668
- const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
706
+ const offer = {
707
+ type: 'offer',
708
+ sdp: this._remoteSdp.getSdp(),
709
+ };
669
710
  logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
670
711
  await this._pc.setRemoteDescription(offer);
671
712
  const answer = await this._pc.createAnswer();
@@ -699,7 +740,10 @@ class ReactNative106 extends HandlerInterface_1.HandlerInterface {
699
740
  // m=application section.
700
741
  if (!this._hasDataChannelMediaSection) {
701
742
  this._remoteSdp.receiveSctpAssociation();
702
- const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
743
+ const offer = {
744
+ type: 'offer',
745
+ sdp: this._remoteSdp.getSdp(),
746
+ };
703
747
  logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);
704
748
  await this._pc.setRemoteDescription(offer);
705
749
  const answer = await this._pc.createAnswer();
@@ -1,13 +1,11 @@
1
- import { type HandlerFactory, HandlerInterface, type HandlerRunOptions, type HandlerSendOptions, type HandlerSendResult, type HandlerReceiveOptions, type HandlerReceiveResult, type HandlerSendDataChannelOptions, type HandlerSendDataChannelResult, type HandlerReceiveDataChannelOptions, type HandlerReceiveDataChannelResult } from './HandlerInterface';
2
1
  import type { IceParameters } from '../Transport';
3
- import type { RtpCapabilities } from '../RtpParameters';
4
- import type { SctpCapabilities } from '../SctpParameters';
2
+ import { type HandlerFactory, HandlerInterface, type HandlerOptions, type HandlerSendOptions, type HandlerSendResult, type HandlerReceiveOptions, type HandlerReceiveResult, type HandlerSendDataChannelOptions, type HandlerSendDataChannelResult, type HandlerReceiveDataChannelOptions, type HandlerReceiveDataChannelResult } from './HandlerInterface';
5
3
  export declare class Safari12 extends HandlerInterface {
6
4
  private _closed;
7
- private _direction?;
8
- private _remoteSdp?;
9
- private _sendingRtpParametersByKind?;
10
- private _sendingRemoteRtpParametersByKind?;
5
+ private _direction;
6
+ private _remoteSdp;
7
+ private _sendingRtpParametersByKind;
8
+ private _sendingRemoteRtpParametersByKind;
11
9
  private _forcedLocalDtlsRole?;
12
10
  private _pc;
13
11
  private readonly _mapMidTransceiver;
@@ -19,12 +17,9 @@ export declare class Safari12 extends HandlerInterface {
19
17
  * Creates a factory function.
20
18
  */
21
19
  static createFactory(): HandlerFactory;
22
- constructor();
20
+ constructor({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, extendedRtpCapabilities, }: HandlerOptions);
23
21
  get name(): string;
24
22
  close(): void;
25
- getNativeRtpCapabilities(): Promise<RtpCapabilities>;
26
- getNativeSctpCapabilities(): Promise<SctpCapabilities>;
27
- run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities, }: HandlerRunOptions): void;
28
23
  updateIceServers(iceServers: RTCIceServer[]): Promise<void>;
29
24
  restartIce(iceParameters: IceParameters): Promise<void>;
30
25
  getTransportStats(): Promise<RTCStatsReport>;
@@ -34,7 +29,7 @@ export declare class Safari12 extends HandlerInterface {
34
29
  resumeSending(localId: string): Promise<void>;
35
30
  replaceTrack(localId: string, track: MediaStreamTrack | null): Promise<void>;
36
31
  setMaxSpatialLayer(localId: string, spatialLayer: number): Promise<void>;
37
- setRtpEncodingParameters(localId: string, params: any): Promise<void>;
32
+ setRtpEncodingParameters(localId: string, params: Partial<RTCRtpEncodingParameters>): Promise<void>;
38
33
  getSenderStats(localId: string): Promise<RTCStatsReport>;
39
34
  sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol, }: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
40
35
  receive(optionsList: HandlerReceiveOptions[]): Promise<HandlerReceiveResult[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"Safari12.d.ts","sourceRoot":"","sources":["../../src/handlers/Safari12.ts"],"names":[],"mappings":"AAQA,OAAO,EACN,KAAK,cAAc,EACnB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAOhF,qBAAa,QAAS,SAAQ,gBAAgB;IAE7C,OAAO,CAAC,OAAO,CAAS;IAExB,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;;IAQtC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,KAAK,IAAI,IAAI;IAmBP,wBAA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