mediasoup-client 3.6.68 → 3.6.70
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.
- package/lib/Consumer.d.ts +3 -3
- package/lib/Consumer.d.ts.map +1 -1
- package/lib/Consumer.js +9 -9
- package/lib/DataConsumer.d.ts +1 -1
- package/lib/DataConsumer.d.ts.map +1 -1
- package/lib/DataConsumer.js +2 -2
- package/lib/DataProducer.d.ts +1 -1
- package/lib/DataProducer.d.ts.map +1 -1
- package/lib/DataProducer.js +2 -2
- package/lib/Device.d.ts +1 -1
- package/lib/Device.d.ts.map +1 -1
- package/lib/Device.js +5 -5
- package/lib/Producer.d.ts +3 -3
- package/lib/Producer.d.ts.map +1 -1
- package/lib/Producer.js +11 -11
- package/lib/Transport.d.ts +9 -9
- package/lib/Transport.d.ts.map +1 -1
- package/lib/Transport.js +44 -40
- package/lib/handlers/Chrome55.d.ts +3 -3
- package/lib/handlers/Chrome55.d.ts.map +1 -1
- package/lib/handlers/Chrome55.js +13 -13
- package/lib/handlers/Chrome67.d.ts +3 -3
- package/lib/handlers/Chrome67.d.ts.map +1 -1
- package/lib/handlers/Chrome67.js +18 -18
- package/lib/handlers/Chrome70.d.ts +3 -3
- package/lib/handlers/Chrome70.d.ts.map +1 -1
- package/lib/handlers/Chrome70.js +18 -18
- package/lib/handlers/Chrome74.d.ts +3 -3
- package/lib/handlers/Chrome74.d.ts.map +1 -1
- package/lib/handlers/Chrome74.js +22 -22
- package/lib/handlers/Edge11.d.ts +4 -4
- package/lib/handlers/Edge11.d.ts.map +1 -1
- package/lib/handlers/Edge11.js +11 -11
- package/lib/handlers/FakeHandler.d.ts +1 -1
- package/lib/handlers/FakeHandler.d.ts.map +1 -1
- package/lib/handlers/FakeHandler.js +5 -5
- package/lib/handlers/Firefox60.d.ts +3 -3
- package/lib/handlers/Firefox60.d.ts.map +1 -1
- package/lib/handlers/Firefox60.js +21 -21
- package/lib/handlers/ReactNative.d.ts +3 -3
- package/lib/handlers/ReactNative.d.ts.map +1 -1
- package/lib/handlers/ReactNative.js +13 -13
- package/lib/handlers/ReactNativeUnifiedPlan.d.ts +3 -3
- package/lib/handlers/ReactNativeUnifiedPlan.d.ts.map +1 -1
- package/lib/handlers/ReactNativeUnifiedPlan.js +22 -22
- package/lib/handlers/Safari11.d.ts +3 -3
- package/lib/handlers/Safari11.d.ts.map +1 -1
- package/lib/handlers/Safari11.js +18 -18
- package/lib/handlers/Safari12.d.ts +3 -3
- package/lib/handlers/Safari12.d.ts.map +1 -1
- package/lib/handlers/Safari12.js +22 -22
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/npm-scripts.js +1 -1
- package/package.json +9 -9
package/lib/handlers/Safari11.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
46
|
-
private
|
|
47
|
-
private
|
|
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,E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AAC,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"}
|
package/lib/handlers/Safari12.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
package/lib/index.js
CHANGED
package/npm-scripts.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup-client",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.70",
|
|
4
4
|
"description": "mediasoup client side JavaScript library",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -62,29 +62,29 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@types/debug": "^4.1.7",
|
|
65
|
-
"awaitqueue": "^
|
|
65
|
+
"awaitqueue": "^3.0.1",
|
|
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.
|
|
72
|
+
"supports-color": "^9.3.1",
|
|
73
73
|
"uuid": "^3.4.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/events": "^3.0.0",
|
|
77
|
-
"@types/jest": "^29.2.
|
|
77
|
+
"@types/jest": "^29.2.5",
|
|
78
78
|
"@types/sdp-transform": "^2.4.5",
|
|
79
79
|
"@types/uuid": "^3.4.9",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
81
|
-
"@typescript-eslint/parser": "^5.
|
|
82
|
-
"eslint": "^8.
|
|
83
|
-
"eslint-plugin-jest": "^27.
|
|
80
|
+
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
81
|
+
"@typescript-eslint/parser": "^5.48.0",
|
|
82
|
+
"eslint": "^8.31.0",
|
|
83
|
+
"eslint-plugin-jest": "^27.2.0",
|
|
84
84
|
"jest": "^29.3.1",
|
|
85
85
|
"open-cli": "^7.1.0",
|
|
86
86
|
"ts-jest": "^29.0.3",
|
|
87
|
-
"tsc-watch": "^
|
|
87
|
+
"tsc-watch": "^6.0.0",
|
|
88
88
|
"typescript": "^4.9.4"
|
|
89
89
|
}
|
|
90
90
|
}
|