mediasoup-client 3.6.40 → 3.6.44
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 +2 -0
- package/lib/Consumer.d.ts.map +1 -1
- package/lib/Consumer.js +4 -0
- package/lib/Transport.d.ts +3 -3
- package/lib/Transport.d.ts.map +1 -1
- package/lib/Transport.js +8 -0
- package/lib/handlers/Chrome55.d.ts +3 -0
- package/lib/handlers/Chrome55.d.ts.map +1 -1
- package/lib/handlers/Chrome55.js +41 -7
- package/lib/handlers/Chrome67.d.ts +3 -0
- package/lib/handlers/Chrome67.d.ts.map +1 -1
- package/lib/handlers/Chrome67.js +41 -7
- package/lib/handlers/Chrome70.d.ts +3 -0
- package/lib/handlers/Chrome70.d.ts.map +1 -1
- package/lib/handlers/Chrome70.js +43 -7
- package/lib/handlers/Chrome74.d.ts +3 -0
- package/lib/handlers/Chrome74.d.ts.map +1 -1
- package/lib/handlers/Chrome74.js +61 -7
- package/lib/handlers/Edge11.d.ts +2 -0
- package/lib/handlers/Edge11.d.ts.map +1 -1
- package/lib/handlers/Edge11.js +10 -0
- package/lib/handlers/FakeHandler.d.ts +2 -0
- package/lib/handlers/FakeHandler.d.ts.map +1 -1
- package/lib/handlers/FakeHandler.js +10 -0
- package/lib/handlers/Firefox60.d.ts +2 -0
- package/lib/handlers/Firefox60.d.ts.map +1 -1
- package/lib/handlers/Firefox60.js +31 -1
- package/lib/handlers/HandlerInterface.d.ts +2 -0
- package/lib/handlers/HandlerInterface.d.ts.map +1 -1
- package/lib/handlers/ReactNative.d.ts +3 -0
- package/lib/handlers/ReactNative.d.ts.map +1 -1
- package/lib/handlers/ReactNative.js +45 -7
- package/lib/handlers/Safari11.d.ts +3 -0
- package/lib/handlers/Safari11.d.ts.map +1 -1
- package/lib/handlers/Safari11.js +41 -7
- package/lib/handlers/Safari12.d.ts +3 -0
- package/lib/handlers/Safari12.d.ts.map +1 -1
- package/lib/handlers/Safari12.js +61 -7
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -5
- package/src/Consumer.ts +6 -0
- package/src/Transport.ts +19 -3
- package/src/handlers/Chrome55.ts +50 -4
- package/src/handlers/Chrome67.ts +50 -4
- package/src/handlers/Chrome70.ts +54 -4
- package/src/handlers/Chrome74.ts +100 -4
- package/src/handlers/Edge11.ts +14 -0
- package/src/handlers/FakeHandler.ts +14 -0
- package/src/handlers/Firefox60.ts +65 -1
- package/src/handlers/HandlerInterface.ts +4 -0
- package/src/handlers/ReactNative.ts +55 -4
- package/src/handlers/Safari11.ts +50 -4
- package/src/handlers/Safari12.ts +100 -4
package/lib/handlers/Chrome74.js
CHANGED
|
@@ -118,6 +118,11 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
118
118
|
audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),
|
|
119
119
|
video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)
|
|
120
120
|
};
|
|
121
|
+
if (dtlsParameters.role && dtlsParameters.role !== 'auto') {
|
|
122
|
+
this._forcedLocalDtlsRole = dtlsParameters.role === 'server'
|
|
123
|
+
? 'client'
|
|
124
|
+
: 'server';
|
|
125
|
+
}
|
|
121
126
|
this._pc = new RTCPeerConnection(Object.assign({ iceServers: iceServers || [], iceTransportPolicy: iceTransportPolicy || 'all', bundlePolicy: 'max-bundle', rtcpMuxPolicy: 'require', sdpSemantics: 'unified-plan' }, additionalSettings), proprietaryConstraints);
|
|
122
127
|
// Handle RTCPeerConnection connection status.
|
|
123
128
|
this._pc.addEventListener('iceconnectionstatechange', () => {
|
|
@@ -174,6 +179,7 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
174
179
|
return this._pc.getStats();
|
|
175
180
|
}
|
|
176
181
|
async send({ track, encodings, codecOptions, codec }) {
|
|
182
|
+
var _a;
|
|
177
183
|
this._assertSendDirection();
|
|
178
184
|
logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);
|
|
179
185
|
if (encodings && encodings.length > 1) {
|
|
@@ -198,8 +204,12 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
198
204
|
let offer = await this._pc.createOffer();
|
|
199
205
|
let localSdpObject = sdpTransform.parse(offer.sdp);
|
|
200
206
|
let offerMediaObject;
|
|
201
|
-
if (!this._transportReady)
|
|
202
|
-
await this._setupTransport({
|
|
207
|
+
if (!this._transportReady) {
|
|
208
|
+
await this._setupTransport({
|
|
209
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'server',
|
|
210
|
+
localSdpObject
|
|
211
|
+
});
|
|
212
|
+
}
|
|
203
213
|
// Special case for VP9 with SVC.
|
|
204
214
|
let hackVp9Svc = false;
|
|
205
215
|
const layers = scalabilityModes_1.parse((encodings || [{}])[0].scalabilityMode);
|
|
@@ -290,6 +300,7 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
290
300
|
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
291
301
|
logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
292
302
|
await this._pc.setRemoteDescription(answer);
|
|
303
|
+
this._mapMidTransceiver.delete(localId);
|
|
293
304
|
}
|
|
294
305
|
async replaceTrack(localId, track) {
|
|
295
306
|
this._assertSendDirection();
|
|
@@ -339,6 +350,7 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
339
350
|
return transceiver.sender.getStats();
|
|
340
351
|
}
|
|
341
352
|
async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {
|
|
353
|
+
var _a;
|
|
342
354
|
this._assertSendDirection();
|
|
343
355
|
const options = {
|
|
344
356
|
negotiated: true,
|
|
@@ -360,8 +372,12 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
360
372
|
const localSdpObject = sdpTransform.parse(offer.sdp);
|
|
361
373
|
const offerMediaObject = localSdpObject.media
|
|
362
374
|
.find((m) => m.type === 'application');
|
|
363
|
-
if (!this._transportReady)
|
|
364
|
-
await this._setupTransport({
|
|
375
|
+
if (!this._transportReady) {
|
|
376
|
+
await this._setupTransport({
|
|
377
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'server',
|
|
378
|
+
localSdpObject
|
|
379
|
+
});
|
|
380
|
+
}
|
|
365
381
|
logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
366
382
|
await this._pc.setLocalDescription(offer);
|
|
367
383
|
this._remoteSdp.sendSctpAssociation({ offerMediaObject });
|
|
@@ -379,6 +395,7 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
379
395
|
return { dataChannel, sctpStreamParameters };
|
|
380
396
|
}
|
|
381
397
|
async receive({ trackId, kind, rtpParameters }) {
|
|
398
|
+
var _a;
|
|
382
399
|
this._assertRecvDirection();
|
|
383
400
|
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
384
401
|
const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);
|
|
@@ -403,8 +420,12 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
403
420
|
answerMediaObject
|
|
404
421
|
});
|
|
405
422
|
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
406
|
-
if (!this._transportReady)
|
|
407
|
-
await this._setupTransport({
|
|
423
|
+
if (!this._transportReady) {
|
|
424
|
+
await this._setupTransport({
|
|
425
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
426
|
+
localSdpObject
|
|
427
|
+
});
|
|
428
|
+
}
|
|
408
429
|
logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
409
430
|
await this._pc.setLocalDescription(answer);
|
|
410
431
|
const transceiver = this._pc.getTransceivers()
|
|
@@ -432,6 +453,35 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
432
453
|
const answer = await this._pc.createAnswer();
|
|
433
454
|
logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
434
455
|
await this._pc.setLocalDescription(answer);
|
|
456
|
+
this._mapMidTransceiver.delete(localId);
|
|
457
|
+
}
|
|
458
|
+
async pauseReceiving(localId) {
|
|
459
|
+
this._assertRecvDirection();
|
|
460
|
+
logger.debug('pauseReceiving() [localId:%s]', localId);
|
|
461
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
462
|
+
if (!transceiver)
|
|
463
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
464
|
+
transceiver.direction = 'inactive';
|
|
465
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
466
|
+
logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
467
|
+
await this._pc.setRemoteDescription(offer);
|
|
468
|
+
const answer = await this._pc.createAnswer();
|
|
469
|
+
logger.debug('pauseReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
470
|
+
await this._pc.setLocalDescription(answer);
|
|
471
|
+
}
|
|
472
|
+
async resumeReceiving(localId) {
|
|
473
|
+
this._assertRecvDirection();
|
|
474
|
+
logger.debug('resumeReceiving() [localId:%s]', localId);
|
|
475
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
476
|
+
if (!transceiver)
|
|
477
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
478
|
+
transceiver.direction = 'recvonly';
|
|
479
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
480
|
+
logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
481
|
+
await this._pc.setRemoteDescription(offer);
|
|
482
|
+
const answer = await this._pc.createAnswer();
|
|
483
|
+
logger.debug('resumeReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
484
|
+
await this._pc.setLocalDescription(answer);
|
|
435
485
|
}
|
|
436
486
|
async getReceiverStats(localId) {
|
|
437
487
|
this._assertRecvDirection();
|
|
@@ -441,6 +491,7 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
441
491
|
return transceiver.receiver.getStats();
|
|
442
492
|
}
|
|
443
493
|
async receiveDataChannel({ sctpStreamParameters, label, protocol }) {
|
|
494
|
+
var _a;
|
|
444
495
|
this._assertRecvDirection();
|
|
445
496
|
const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
|
|
446
497
|
const options = {
|
|
@@ -463,7 +514,10 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
463
514
|
const answer = await this._pc.createAnswer();
|
|
464
515
|
if (!this._transportReady) {
|
|
465
516
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
466
|
-
await this._setupTransport({
|
|
517
|
+
await this._setupTransport({
|
|
518
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
519
|
+
localSdpObject
|
|
520
|
+
});
|
|
467
521
|
}
|
|
468
522
|
logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
469
523
|
await this._pc.setLocalDescription(answer);
|
package/lib/handlers/Edge11.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export declare class Edge11 extends HandlerInterface {
|
|
|
41
41
|
sendDataChannel(options: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
|
|
42
42
|
receive({ trackId, kind, rtpParameters }: HandlerReceiveOptions): Promise<HandlerReceiveResult>;
|
|
43
43
|
stopReceiving(localId: string): Promise<void>;
|
|
44
|
+
pauseReceiving(localId: string): Promise<void>;
|
|
45
|
+
resumeReceiving(localId: string): Promise<void>;
|
|
44
46
|
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
45
47
|
receiveDataChannel(options: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
46
48
|
private _setIceGatherer;
|
|
@@ -1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AoB,CAAC;IAuC1B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB7C,cAAc,CAEnB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1B,eAAe,CAEpB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAU1D,kBAAkB,CAEvB,OAAO,EAAE,gCAAgC,GACvC,OAAO,CAAC,+BAA+B,CAAC;IAK3C,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,gBAAgB;IA6DxB,OAAO,CAAC,iBAAiB;YA6BX,eAAe;CA+C7B"}
|
package/lib/handlers/Edge11.js
CHANGED
|
@@ -269,6 +269,16 @@ class Edge11 extends HandlerInterface_1.HandlerInterface {
|
|
|
269
269
|
logger.warn('stopReceiving() | rtpReceiver.stop() failed:%o', error);
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
+
async pauseReceiving(
|
|
273
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
274
|
+
localId) {
|
|
275
|
+
// Unimplemented.
|
|
276
|
+
}
|
|
277
|
+
async resumeReceiving(
|
|
278
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
279
|
+
localId) {
|
|
280
|
+
// Unimplemented.
|
|
281
|
+
}
|
|
272
282
|
async getReceiverStats(localId) {
|
|
273
283
|
const rtpReceiver = this._rtpReceivers.get(localId);
|
|
274
284
|
if (!rtpReceiver)
|
|
@@ -38,6 +38,8 @@ export declare class FakeHandler extends HandlerInterface {
|
|
|
38
38
|
sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
|
|
39
39
|
receive({ trackId, kind, rtpParameters }: HandlerReceiveOptions): Promise<HandlerReceiveResult>;
|
|
40
40
|
stopReceiving(localId: string): Promise<void>;
|
|
41
|
+
pauseReceiving(localId: string): Promise<void>;
|
|
42
|
+
resumeReceiving(localId: string): Promise<void>;
|
|
41
43
|
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
42
44
|
receiveDataChannel({ sctpStreamParameters, label, protocol }: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
43
45
|
private _setupTransport;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FakeHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/FakeHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,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;AAC5B,OAAO,EACN,aAAa,EACb,cAAc,EAEd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAwDrD,oBAAY,cAAc,GAAG;IAC5B,6BAA6B,EAAE,MAAM,eAAe,CAAC;IACrD,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;IACvD,2BAA2B,EAAE,MAAM,cAAc,CAAC;CAClD,CAAA;AAED,qBAAa,WAAY,SAAQ,gBAAgB;IAGhD,OAAO,CAAC,cAAc,CAAM;IAE5B,OAAO,CAAC,oBAAoB,CAAC,CAAmC;IAEhE,OAAO,CAAC,MAAM,CAA2C;IAEzD,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,YAAY,CAAK;IAEzB,OAAO,CAAC,OAAO,CAAmD;IAElE,OAAO,CAAC,iBAAiB,CAAK;IAE9B;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,cAAc,EAAE,cAAc,SAEvC,WAAW;gBAGX,cAAc,EAAE,GAAG;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ACrD,OAAO,CAAC,oBAAoB,CAAC;IAe1B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO7C,cAAc,CAEnB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1B,eAAe,CAEpB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM1B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAK1D,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAqB7B,eAAe;CA6B7B"}
|
|
@@ -204,6 +204,16 @@ class FakeHandler extends HandlerInterface_1.HandlerInterface {
|
|
|
204
204
|
logger.debug('stopReceiving() [localId:%s]', localId);
|
|
205
205
|
this._tracks.delete(Number(localId));
|
|
206
206
|
}
|
|
207
|
+
async pauseReceiving(
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
209
|
+
localId) {
|
|
210
|
+
// Unimplemented.
|
|
211
|
+
}
|
|
212
|
+
async resumeReceiving(
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
214
|
+
localId) {
|
|
215
|
+
// Unimplemented.
|
|
216
|
+
}
|
|
207
217
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
208
218
|
async getReceiverStats(localId) {
|
|
209
219
|
return new Map(); //
|
|
@@ -35,6 +35,8 @@ export declare class Firefox60 extends HandlerInterface {
|
|
|
35
35
|
sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
|
|
36
36
|
receive({ trackId, kind, rtpParameters }: HandlerReceiveOptions): Promise<HandlerReceiveResult>;
|
|
37
37
|
stopReceiving(localId: string): Promise<void>;
|
|
38
|
+
pauseReceiving(localId: string): Promise<void>;
|
|
39
|
+
resumeReceiving(localId: string): Promise<void>;
|
|
38
40
|
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
39
41
|
receiveDataChannel({ sctpStreamParameters, label, protocol }: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
40
42
|
private _setupTransport;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Firefox60.d.ts","sourceRoot":"","sources":["../../src/handlers/Firefox60.ts"],"names":[],"mappings":"AAOA,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,SAAU,SAAQ,gBAAgB;IAG9C,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,OAAO,CAAC,UAAU,CAAC,CAAY;IAE/B,OAAO,CAAC,2BAA2B,CAAC,CAAmC;IAGvE,OAAO,CAAC,iCAAiC,CAAC,CAAmC;IAE7E,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;IAYP,wBAAwB,IAAI,OAAO,CAAC,eAAe,CAAC;I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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;IAgElC,OAAO,CACZ,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,qBAAqB,GACrD,OAAO,CAAC,oBAAoB,CAAC;IAiE1B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC7C,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B9C,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B/C,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;YA4D7B,eAAe;IA+B7B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,oBAAoB;CAQ5B"}
|
|
@@ -313,6 +313,7 @@ class Firefox60 extends HandlerInterface_1.HandlerInterface {
|
|
|
313
313
|
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
314
314
|
logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
315
315
|
await this._pc.setRemoteDescription(answer);
|
|
316
|
+
this._mapMidTransceiver.delete(localId);
|
|
316
317
|
}
|
|
317
318
|
async replaceTrack(localId, track) {
|
|
318
319
|
this._assertSendDirection();
|
|
@@ -387,7 +388,7 @@ class Firefox60 extends HandlerInterface_1.HandlerInterface {
|
|
|
387
388
|
const offerMediaObject = localSdpObject.media
|
|
388
389
|
.find((m) => m.type === 'application');
|
|
389
390
|
if (!this._transportReady)
|
|
390
|
-
await this._setupTransport({ localDtlsRole: '
|
|
391
|
+
await this._setupTransport({ localDtlsRole: 'client', localSdpObject });
|
|
391
392
|
logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
392
393
|
await this._pc.setLocalDescription(offer);
|
|
393
394
|
this._remoteSdp.sendSctpAssociation({ offerMediaObject });
|
|
@@ -458,6 +459,35 @@ class Firefox60 extends HandlerInterface_1.HandlerInterface {
|
|
|
458
459
|
const answer = await this._pc.createAnswer();
|
|
459
460
|
logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
460
461
|
await this._pc.setLocalDescription(answer);
|
|
462
|
+
this._mapMidTransceiver.delete(localId);
|
|
463
|
+
}
|
|
464
|
+
async pauseReceiving(localId) {
|
|
465
|
+
this._assertRecvDirection();
|
|
466
|
+
logger.debug('pauseReceiving() [localId:%s]', localId);
|
|
467
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
468
|
+
if (!transceiver)
|
|
469
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
470
|
+
transceiver.direction = 'inactive';
|
|
471
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
472
|
+
logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
473
|
+
await this._pc.setRemoteDescription(offer);
|
|
474
|
+
const answer = await this._pc.createAnswer();
|
|
475
|
+
logger.debug('pauseReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
476
|
+
await this._pc.setLocalDescription(answer);
|
|
477
|
+
}
|
|
478
|
+
async resumeReceiving(localId) {
|
|
479
|
+
this._assertRecvDirection();
|
|
480
|
+
logger.debug('resumeReceiving() [localId:%s]', localId);
|
|
481
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
482
|
+
if (!transceiver)
|
|
483
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
484
|
+
transceiver.direction = 'recvonly';
|
|
485
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
486
|
+
logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
487
|
+
await this._pc.setRemoteDescription(offer);
|
|
488
|
+
const answer = await this._pc.createAnswer();
|
|
489
|
+
logger.debug('resumeReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
490
|
+
await this._pc.setLocalDescription(answer);
|
|
461
491
|
}
|
|
462
492
|
async getReceiverStats(localId) {
|
|
463
493
|
this._assertRecvDirection();
|
|
@@ -77,6 +77,8 @@ export declare abstract class HandlerInterface extends EnhancedEventEmitter {
|
|
|
77
77
|
abstract sendDataChannel(options: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
|
|
78
78
|
abstract receive(options: HandlerReceiveOptions): Promise<HandlerReceiveResult>;
|
|
79
79
|
abstract stopReceiving(localId: string): Promise<void>;
|
|
80
|
+
abstract pauseReceiving(localId: string): Promise<void>;
|
|
81
|
+
abstract resumeReceiving(localId: string): Promise<void>;
|
|
80
82
|
abstract getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
81
83
|
abstract receiveDataChannel(options: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
82
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandlerInterface.d.ts","sourceRoot":"","sources":["../../src/handlers/HandlerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACN,aAAa,EACb,YAAY,EACZ,cAAc,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,gBAAgB,EAChB,cAA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Q,CAAC,OAAO,CACf,OAAO,EAAE,qBAAqB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IAEhC,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtD,QAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEvD,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAExD,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAEnE,QAAQ,CAAC,kBAAkB,CAC1B,OAAO,EAAE,gCAAgC,GACvC,OAAO,CAAC,+BAA+B,CAAC;CAC3C"}
|
|
@@ -7,6 +7,7 @@ export declare class ReactNative extends HandlerInterface {
|
|
|
7
7
|
private _remoteSdp?;
|
|
8
8
|
private _sendingRtpParametersByKind?;
|
|
9
9
|
private _sendingRemoteRtpParametersByKind?;
|
|
10
|
+
private _forcedLocalDtlsRole?;
|
|
10
11
|
private _pc;
|
|
11
12
|
private readonly _sendStream;
|
|
12
13
|
private readonly _mapSendLocalIdTrack;
|
|
@@ -37,6 +38,8 @@ export declare class ReactNative extends HandlerInterface {
|
|
|
37
38
|
sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
|
|
38
39
|
receive({ trackId, kind, rtpParameters }: HandlerReceiveOptions): Promise<HandlerReceiveResult>;
|
|
39
40
|
stopReceiving(localId: string): Promise<void>;
|
|
41
|
+
pauseReceiving(localId: string): Promise<void>;
|
|
42
|
+
resumeReceiving(localId: string): Promise<void>;
|
|
40
43
|
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
41
44
|
receiveDataChannel({ sctpStreamParameters, label, protocol }: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
42
45
|
private _setupTransport;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNative.d.ts","sourceRoot":"","sources":["../../src/handlers/ReactNative.ts"],"names":[],"mappings":"AAOA,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,WAAY,SAAQ,gBAAgB;IAGhD,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,OAAO,CAAC,UAAU,CAAC,CAAY;IAE/B,OAAO,CAAC,2BAA2B,CAAC,CAAmC;IAGvE,OAAO,CAAC,iCAAiC,CAAC,CAAmC;
|
|
1
|
+
{"version":3,"file":"ReactNative.d.ts","sourceRoot":"","sources":["../../src/handlers/ReactNative.ts"],"names":[],"mappings":"AAOA,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,WAAY,SAAQ,gBAAgB;IAGhD,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,OAAO,CAAC,UAAU,CAAC,CAAY;IAE/B,OAAO,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,GAAG,IAAI,GAC7C,OAAO,CAAC,IAAI,CAAC;IAMV,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxE,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrE,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAKxD,eAAe,CACpB,EACC,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,QAAQ,EACR,EAAE,6BAA6B,GAC9B,OAAO,CAAC,4BAA4B,CAAC;IAuElC,OAAO,CACZ,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,qBAAqB,GACrD,OAAO,CAAC,oBAAoB,CAAC;IA+E1B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+B7C,cAAc,CAEnB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1B,eAAe,CAEpB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM1B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAK1D,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAiE7B,eAAe;IA+B7B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,oBAAoB;CAQ5B"}
|
|
@@ -61,6 +61,10 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
61
61
|
}
|
|
62
62
|
close() {
|
|
63
63
|
logger.debug('close()');
|
|
64
|
+
// Free/dispose native MediaStream but DO NOT free/dispose native
|
|
65
|
+
// MediaStreamTracks (that is parent's business).
|
|
66
|
+
// @ts-ignore (proprietary API in react-native-webrtc).
|
|
67
|
+
this._sendStream.release(/* releaseTracks */ false);
|
|
64
68
|
// Close RTCPeerConnection.
|
|
65
69
|
if (this._pc) {
|
|
66
70
|
try {
|
|
@@ -125,6 +129,11 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
125
129
|
audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),
|
|
126
130
|
video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)
|
|
127
131
|
};
|
|
132
|
+
if (dtlsParameters.role && dtlsParameters.role !== 'auto') {
|
|
133
|
+
this._forcedLocalDtlsRole = dtlsParameters.role === 'server'
|
|
134
|
+
? 'client'
|
|
135
|
+
: 'server';
|
|
136
|
+
}
|
|
128
137
|
this._pc = new RTCPeerConnection(Object.assign({ iceServers: iceServers || [], iceTransportPolicy: iceTransportPolicy || 'all', bundlePolicy: 'max-bundle', rtcpMuxPolicy: 'require', sdpSemantics: 'plan-b' }, additionalSettings), proprietaryConstraints);
|
|
129
138
|
// Handle RTCPeerConnection connection status.
|
|
130
139
|
this._pc.addEventListener('iceconnectionstatechange', () => {
|
|
@@ -181,6 +190,7 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
181
190
|
return this._pc.getStats();
|
|
182
191
|
}
|
|
183
192
|
async send({ track, encodings, codecOptions, codec }) {
|
|
193
|
+
var _a;
|
|
184
194
|
this._assertSendDirection();
|
|
185
195
|
logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);
|
|
186
196
|
if (codec) {
|
|
@@ -197,8 +207,12 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
197
207
|
const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});
|
|
198
208
|
sendingRemoteRtpParameters.codecs =
|
|
199
209
|
ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);
|
|
200
|
-
if (!this._transportReady)
|
|
201
|
-
await this._setupTransport({
|
|
210
|
+
if (!this._transportReady) {
|
|
211
|
+
await this._setupTransport({
|
|
212
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'server',
|
|
213
|
+
localSdpObject
|
|
214
|
+
});
|
|
215
|
+
}
|
|
202
216
|
if (track.kind === 'video' && encodings && encodings.length > 1) {
|
|
203
217
|
logger.debug('send() | enabling simulcast');
|
|
204
218
|
localSdpObject = sdpTransform.parse(offer.sdp);
|
|
@@ -303,6 +317,7 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
303
317
|
throw new errors_1.UnsupportedError('not implemented');
|
|
304
318
|
}
|
|
305
319
|
async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {
|
|
320
|
+
var _a;
|
|
306
321
|
this._assertSendDirection();
|
|
307
322
|
const options = {
|
|
308
323
|
negotiated: true,
|
|
@@ -325,8 +340,12 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
325
340
|
const localSdpObject = sdpTransform.parse(offer.sdp);
|
|
326
341
|
const offerMediaObject = localSdpObject.media
|
|
327
342
|
.find((m) => m.type === 'application');
|
|
328
|
-
if (!this._transportReady)
|
|
329
|
-
await this._setupTransport({
|
|
343
|
+
if (!this._transportReady) {
|
|
344
|
+
await this._setupTransport({
|
|
345
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'server',
|
|
346
|
+
localSdpObject
|
|
347
|
+
});
|
|
348
|
+
}
|
|
330
349
|
logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
331
350
|
await this._pc.setLocalDescription(offer);
|
|
332
351
|
this._remoteSdp.sendSctpAssociation({ offerMediaObject });
|
|
@@ -344,6 +363,7 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
344
363
|
return { dataChannel, sctpStreamParameters };
|
|
345
364
|
}
|
|
346
365
|
async receive({ trackId, kind, rtpParameters }) {
|
|
366
|
+
var _a;
|
|
347
367
|
this._assertRecvDirection();
|
|
348
368
|
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
349
369
|
const localId = trackId;
|
|
@@ -376,8 +396,12 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
376
396
|
answerMediaObject
|
|
377
397
|
});
|
|
378
398
|
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
379
|
-
if (!this._transportReady)
|
|
380
|
-
await this._setupTransport({
|
|
399
|
+
if (!this._transportReady) {
|
|
400
|
+
await this._setupTransport({
|
|
401
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
402
|
+
localSdpObject
|
|
403
|
+
});
|
|
404
|
+
}
|
|
381
405
|
logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
382
406
|
await this._pc.setLocalDescription(answer);
|
|
383
407
|
const stream = this._pc.getRemoteStreams()
|
|
@@ -403,11 +427,22 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
403
427
|
logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
404
428
|
await this._pc.setLocalDescription(answer);
|
|
405
429
|
}
|
|
430
|
+
async pauseReceiving(
|
|
431
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
432
|
+
localId) {
|
|
433
|
+
// Unimplemented.
|
|
434
|
+
}
|
|
435
|
+
async resumeReceiving(
|
|
436
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
437
|
+
localId) {
|
|
438
|
+
// Unimplemented.
|
|
439
|
+
}
|
|
406
440
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
407
441
|
async getReceiverStats(localId) {
|
|
408
442
|
throw new errors_1.UnsupportedError('not implemented');
|
|
409
443
|
}
|
|
410
444
|
async receiveDataChannel({ sctpStreamParameters, label, protocol }) {
|
|
445
|
+
var _a;
|
|
411
446
|
this._assertRecvDirection();
|
|
412
447
|
const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
|
|
413
448
|
const options = {
|
|
@@ -431,7 +466,10 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
431
466
|
const answer = await this._pc.createAnswer();
|
|
432
467
|
if (!this._transportReady) {
|
|
433
468
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
434
|
-
await this._setupTransport({
|
|
469
|
+
await this._setupTransport({
|
|
470
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
471
|
+
localSdpObject
|
|
472
|
+
});
|
|
435
473
|
}
|
|
436
474
|
logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
437
475
|
await this._pc.setLocalDescription(answer);
|
|
@@ -7,6 +7,7 @@ export declare class Safari11 extends HandlerInterface {
|
|
|
7
7
|
private _remoteSdp?;
|
|
8
8
|
private _sendingRtpParametersByKind?;
|
|
9
9
|
private _sendingRemoteRtpParametersByKind?;
|
|
10
|
+
private _forcedLocalDtlsRole?;
|
|
10
11
|
private _pc;
|
|
11
12
|
private readonly _sendStream;
|
|
12
13
|
private readonly _mapSendLocalIdRtpSender;
|
|
@@ -38,6 +39,8 @@ export declare class Safari11 extends HandlerInterface {
|
|
|
38
39
|
receive({ trackId, kind, rtpParameters }: HandlerReceiveOptions): Promise<HandlerReceiveResult>;
|
|
39
40
|
stopReceiving(localId: string): Promise<void>;
|
|
40
41
|
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
42
|
+
pauseReceiving(localId: string): Promise<void>;
|
|
43
|
+
resumeReceiving(localId: string): Promise<void>;
|
|
41
44
|
receiveDataChannel({ sctpStreamParameters, label, protocol }: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
42
45
|
private _setupTransport;
|
|
43
46
|
private _assertSendDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Safari11.d.ts","sourceRoot":"","sources":["../../src/handlers/Safari11.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;
|
|
1
|
+
{"version":3,"file":"Safari11.d.ts","sourceRoot":"","sources":["../../src/handlers/Safari11.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,o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AY,EAAE,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,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,qBAAqB,GACrD,OAAO,CAAC,oBAAoB,CAAC;IAwE1B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+B7C,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAY1D,cAAc,CAEnB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1B,eAAe,CAEpB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1B,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAgE7B,eAAe;IA+B7B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,oBAAoB;CAQ5B"}
|
package/lib/handlers/Safari11.js
CHANGED
|
@@ -124,6 +124,11 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
124
124
|
audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),
|
|
125
125
|
video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)
|
|
126
126
|
};
|
|
127
|
+
if (dtlsParameters.role && dtlsParameters.role !== 'auto') {
|
|
128
|
+
this._forcedLocalDtlsRole = dtlsParameters.role === 'server'
|
|
129
|
+
? 'client'
|
|
130
|
+
: 'server';
|
|
131
|
+
}
|
|
127
132
|
this._pc = new RTCPeerConnection(Object.assign({ iceServers: iceServers || [], iceTransportPolicy: iceTransportPolicy || 'all', bundlePolicy: 'max-bundle', rtcpMuxPolicy: 'require' }, additionalSettings), proprietaryConstraints);
|
|
128
133
|
// Handle RTCPeerConnection connection status.
|
|
129
134
|
this._pc.addEventListener('iceconnectionstatechange', () => {
|
|
@@ -180,6 +185,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
180
185
|
return this._pc.getStats();
|
|
181
186
|
}
|
|
182
187
|
async send({ track, encodings, codecOptions, codec }) {
|
|
188
|
+
var _a;
|
|
183
189
|
this._assertSendDirection();
|
|
184
190
|
logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);
|
|
185
191
|
if (codec) {
|
|
@@ -196,8 +202,12 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
196
202
|
const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});
|
|
197
203
|
sendingRemoteRtpParameters.codecs =
|
|
198
204
|
ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);
|
|
199
|
-
if (!this._transportReady)
|
|
200
|
-
await this._setupTransport({
|
|
205
|
+
if (!this._transportReady) {
|
|
206
|
+
await this._setupTransport({
|
|
207
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'server',
|
|
208
|
+
localSdpObject
|
|
209
|
+
});
|
|
210
|
+
}
|
|
201
211
|
if (track.kind === 'video' && encodings && encodings.length > 1) {
|
|
202
212
|
logger.debug('send() | enabling simulcast');
|
|
203
213
|
localSdpObject = sdpTransform.parse(offer.sdp);
|
|
@@ -339,6 +349,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
339
349
|
return rtpSender.getStats();
|
|
340
350
|
}
|
|
341
351
|
async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {
|
|
352
|
+
var _a;
|
|
342
353
|
this._assertSendDirection();
|
|
343
354
|
const options = {
|
|
344
355
|
negotiated: true,
|
|
@@ -360,8 +371,12 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
360
371
|
const localSdpObject = sdpTransform.parse(offer.sdp);
|
|
361
372
|
const offerMediaObject = localSdpObject.media
|
|
362
373
|
.find((m) => m.type === 'application');
|
|
363
|
-
if (!this._transportReady)
|
|
364
|
-
await this._setupTransport({
|
|
374
|
+
if (!this._transportReady) {
|
|
375
|
+
await this._setupTransport({
|
|
376
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'server',
|
|
377
|
+
localSdpObject
|
|
378
|
+
});
|
|
379
|
+
}
|
|
365
380
|
logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
366
381
|
await this._pc.setLocalDescription(offer);
|
|
367
382
|
this._remoteSdp.sendSctpAssociation({ offerMediaObject });
|
|
@@ -379,6 +394,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
379
394
|
return { dataChannel, sctpStreamParameters };
|
|
380
395
|
}
|
|
381
396
|
async receive({ trackId, kind, rtpParameters }) {
|
|
397
|
+
var _a;
|
|
382
398
|
this._assertRecvDirection();
|
|
383
399
|
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
384
400
|
const localId = trackId;
|
|
@@ -404,8 +420,12 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
404
420
|
answerMediaObject
|
|
405
421
|
});
|
|
406
422
|
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
407
|
-
if (!this._transportReady)
|
|
408
|
-
await this._setupTransport({
|
|
423
|
+
if (!this._transportReady) {
|
|
424
|
+
await this._setupTransport({
|
|
425
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
426
|
+
localSdpObject
|
|
427
|
+
});
|
|
428
|
+
}
|
|
409
429
|
logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
410
430
|
await this._pc.setLocalDescription(answer);
|
|
411
431
|
const rtpReceiver = this._pc.getReceivers()
|
|
@@ -441,7 +461,18 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
441
461
|
throw new Error('associated RTCRtpReceiver not found');
|
|
442
462
|
return rtpReceiver.getStats();
|
|
443
463
|
}
|
|
464
|
+
async pauseReceiving(
|
|
465
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
466
|
+
localId) {
|
|
467
|
+
// Unimplemented.
|
|
468
|
+
}
|
|
469
|
+
async resumeReceiving(
|
|
470
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
471
|
+
localId) {
|
|
472
|
+
// Unimplemented.
|
|
473
|
+
}
|
|
444
474
|
async receiveDataChannel({ sctpStreamParameters, label, protocol }) {
|
|
475
|
+
var _a;
|
|
445
476
|
this._assertRecvDirection();
|
|
446
477
|
const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
|
|
447
478
|
const options = {
|
|
@@ -464,7 +495,10 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
464
495
|
const answer = await this._pc.createAnswer();
|
|
465
496
|
if (!this._transportReady) {
|
|
466
497
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
467
|
-
await this._setupTransport({
|
|
498
|
+
await this._setupTransport({
|
|
499
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
500
|
+
localSdpObject
|
|
501
|
+
});
|
|
468
502
|
}
|
|
469
503
|
logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
470
504
|
await this._pc.setLocalDescription(answer);
|