mediasoup-client 3.6.46 → 3.6.50
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/.vimrc +21 -0
- package/NO_GIT/Notes.txt +18 -0
- package/lib/Transport.d.ts +3 -0
- package/lib/Transport.d.ts.map +1 -1
- package/lib/Transport.js +110 -39
- package/lib/handlers/Chrome55.d.ts +1 -1
- package/lib/handlers/Chrome55.d.ts.map +1 -1
- package/lib/handlers/Chrome55.js +42 -28
- package/lib/handlers/Chrome67.d.ts +1 -1
- package/lib/handlers/Chrome67.d.ts.map +1 -1
- package/lib/handlers/Chrome67.js +45 -30
- package/lib/handlers/Chrome70.d.ts +1 -1
- package/lib/handlers/Chrome70.d.ts.map +1 -1
- package/lib/handlers/Chrome70.js +44 -29
- package/lib/handlers/Chrome74.d.ts +1 -1
- package/lib/handlers/Chrome74.d.ts.map +1 -1
- package/lib/handlers/Chrome74.js +47 -29
- package/lib/handlers/Edge11.d.ts +1 -1
- package/lib/handlers/Edge11.d.ts.map +1 -1
- package/lib/handlers/Edge11.js +28 -20
- package/lib/handlers/FakeHandler.d.ts +1 -1
- package/lib/handlers/FakeHandler.d.ts.map +1 -1
- package/lib/handlers/FakeHandler.js +13 -10
- package/lib/handlers/Firefox60.d.ts +1 -1
- package/lib/handlers/Firefox60.d.ts.map +1 -1
- package/lib/handlers/Firefox60.js +47 -30
- package/lib/handlers/HandlerInterface.d.ts +1 -1
- package/lib/handlers/HandlerInterface.d.ts.map +1 -1
- package/lib/handlers/ReactNative.d.ts +1 -1
- package/lib/handlers/ReactNative.d.ts.map +1 -1
- package/lib/handlers/ReactNative.js +50 -34
- package/lib/handlers/Safari11.d.ts +1 -1
- package/lib/handlers/Safari11.d.ts.map +1 -1
- package/lib/handlers/Safari11.js +43 -30
- package/lib/handlers/Safari12.d.ts +1 -1
- package/lib/handlers/Safari12.d.ts.map +1 -1
- package/lib/handlers/Safari12.js +44 -29
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/ortc.js +4 -6
- package/package.json +10 -10
- package/src/Transport.ts +162 -58
- package/src/handlers/Chrome55.ts +52 -31
- package/src/handlers/Chrome67.ts +54 -33
- package/src/handlers/Chrome70.ts +55 -32
- package/src/handlers/Chrome74.ts +59 -32
- package/src/handlers/Edge11.ts +39 -25
- package/src/handlers/FakeHandler.ts +18 -10
- package/src/handlers/Firefox60.ts +57 -33
- package/src/handlers/HandlerInterface.ts +2 -2
- package/src/handlers/ReactNative.ts +62 -38
- package/src/handlers/Safari11.ts +54 -33
- package/src/handlers/Safari12.ts +55 -32
- package/src/ortc.ts +6 -8
|
@@ -643,23 +643,34 @@ export class Firefox60 extends HandlerInterface
|
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
async receive(
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
647
|
+
optionsList: HandlerReceiveOptions[]
|
|
648
|
+
) : Promise<HandlerReceiveResult[]>
|
|
648
649
|
{
|
|
649
650
|
this._assertRecvDirection();
|
|
650
651
|
|
|
651
|
-
|
|
652
|
+
const results: HandlerReceiveResult[] = [];
|
|
653
|
+
const mapLocalId: Map<string, string> = new Map();
|
|
652
654
|
|
|
653
|
-
const
|
|
655
|
+
for (const options of optionsList)
|
|
656
|
+
{
|
|
657
|
+
const { trackId, kind, rtpParameters } = options;
|
|
654
658
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
659
|
+
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
660
|
+
|
|
661
|
+
const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);
|
|
662
|
+
|
|
663
|
+
mapLocalId.set(trackId, localId);
|
|
664
|
+
|
|
665
|
+
this._remoteSdp!.receive(
|
|
666
|
+
{
|
|
667
|
+
mid : localId,
|
|
668
|
+
kind,
|
|
669
|
+
offerRtpParameters : rtpParameters,
|
|
670
|
+
streamId : rtpParameters.rtcp!.cname!,
|
|
671
|
+
trackId
|
|
672
|
+
});
|
|
673
|
+
}
|
|
663
674
|
|
|
664
675
|
const offer = { type: 'offer', sdp: this._remoteSdp!.getSdp() };
|
|
665
676
|
|
|
@@ -671,18 +682,24 @@ export class Firefox60 extends HandlerInterface
|
|
|
671
682
|
|
|
672
683
|
let answer = await this._pc.createAnswer();
|
|
673
684
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
674
|
-
const answerMediaObject = localSdpObject.media
|
|
675
|
-
.find((m: any) => String(m.mid) === localId);
|
|
676
685
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
686
|
+
for (const options of optionsList)
|
|
687
|
+
{
|
|
688
|
+
const { trackId, rtpParameters } = options;
|
|
689
|
+
const localId = mapLocalId.get(trackId);
|
|
690
|
+
const answerMediaObject = localSdpObject.media
|
|
691
|
+
.find((m: any) => String(m.mid) === localId);
|
|
692
|
+
|
|
693
|
+
// May need to modify codec parameters in the answer based on codec
|
|
694
|
+
// parameters in the offer.
|
|
695
|
+
sdpCommonUtils.applyCodecParameters(
|
|
696
|
+
{
|
|
697
|
+
offerRtpParameters : rtpParameters,
|
|
698
|
+
answerMediaObject
|
|
699
|
+
});
|
|
684
700
|
|
|
685
|
-
|
|
701
|
+
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
702
|
+
}
|
|
686
703
|
|
|
687
704
|
if (!this._transportReady)
|
|
688
705
|
await this._setupTransport({ localDtlsRole: 'client', localSdpObject });
|
|
@@ -693,20 +710,27 @@ export class Firefox60 extends HandlerInterface
|
|
|
693
710
|
|
|
694
711
|
await this._pc.setLocalDescription(answer);
|
|
695
712
|
|
|
696
|
-
const
|
|
697
|
-
|
|
713
|
+
for (const options of optionsList)
|
|
714
|
+
{
|
|
715
|
+
const { trackId } = options;
|
|
716
|
+
const localId = mapLocalId.get(trackId)!;
|
|
717
|
+
const transceiver = this._pc.getTransceivers()
|
|
718
|
+
.find((t: RTCRtpTransceiver) => t.mid === localId);
|
|
698
719
|
|
|
699
|
-
|
|
700
|
-
|
|
720
|
+
if (!transceiver)
|
|
721
|
+
throw new Error('new RTCRtpTransceiver not found');
|
|
701
722
|
|
|
702
|
-
|
|
703
|
-
|
|
723
|
+
// Store in the map.
|
|
724
|
+
this._mapMidTransceiver.set(localId, transceiver);
|
|
704
725
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
726
|
+
results.push({
|
|
727
|
+
localId,
|
|
728
|
+
track : transceiver.receiver.track,
|
|
729
|
+
rtpReceiver : transceiver.receiver
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
return results;
|
|
710
734
|
}
|
|
711
735
|
|
|
712
736
|
async stopReceiving(localId: string): Promise<void>
|
|
@@ -136,8 +136,8 @@ export abstract class HandlerInterface extends EnhancedEventEmitter
|
|
|
136
136
|
): Promise<HandlerSendDataChannelResult>;
|
|
137
137
|
|
|
138
138
|
abstract receive(
|
|
139
|
-
|
|
140
|
-
): Promise<HandlerReceiveResult
|
|
139
|
+
optionsList: HandlerReceiveOptions[]
|
|
140
|
+
) : Promise<HandlerReceiveResult[]>
|
|
141
141
|
|
|
142
142
|
abstract stopReceiving(localId: string): Promise<void>;
|
|
143
143
|
|
|
@@ -588,34 +588,43 @@ export class ReactNative extends HandlerInterface
|
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
async receive(
|
|
591
|
-
|
|
592
|
-
): Promise<HandlerReceiveResult>
|
|
591
|
+
optionsList: HandlerReceiveOptions[]
|
|
592
|
+
) : Promise<HandlerReceiveResult[]>
|
|
593
593
|
{
|
|
594
594
|
this._assertRecvDirection();
|
|
595
595
|
|
|
596
|
-
|
|
596
|
+
const results: HandlerReceiveResult[] = [];
|
|
597
|
+
const mapStreamId: Map<string, string> = new Map();
|
|
597
598
|
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
for (const options of optionsList)
|
|
600
|
+
{
|
|
601
|
+
const { trackId, kind, rtpParameters } = options;
|
|
601
602
|
|
|
602
|
-
|
|
603
|
-
// remote tracks. This is because react-native-webrtc does not react on new
|
|
604
|
-
// tracks generated within already existing streams, so force the streamId
|
|
605
|
-
// to be different.
|
|
606
|
-
logger.debug(
|
|
607
|
-
'receive() | forcing a random remote streamId to avoid well known bug in react-native-webrtc');
|
|
603
|
+
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
608
604
|
|
|
609
|
-
|
|
605
|
+
const mid = kind;
|
|
606
|
+
let streamId = rtpParameters.rtcp!.cname!;
|
|
610
607
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
streamId
|
|
617
|
-
|
|
618
|
-
}
|
|
608
|
+
// NOTE: In React-Native we cannot reuse the same remote MediaStream for new
|
|
609
|
+
// remote tracks. This is because react-native-webrtc does not react on new
|
|
610
|
+
// tracks generated within already existing streams, so force the streamId
|
|
611
|
+
// to be different.
|
|
612
|
+
logger.debug(
|
|
613
|
+
'receive() | forcing a random remote streamId to avoid well known bug in react-native-webrtc');
|
|
614
|
+
|
|
615
|
+
streamId += `-hack-${utils.generateRandomNumber()}`;
|
|
616
|
+
|
|
617
|
+
mapStreamId.set(trackId, streamId);
|
|
618
|
+
|
|
619
|
+
this._remoteSdp!.receive(
|
|
620
|
+
{
|
|
621
|
+
mid,
|
|
622
|
+
kind,
|
|
623
|
+
offerRtpParameters : rtpParameters,
|
|
624
|
+
streamId,
|
|
625
|
+
trackId
|
|
626
|
+
});
|
|
627
|
+
}
|
|
619
628
|
|
|
620
629
|
const offer = { type: 'offer', sdp: this._remoteSdp!.getSdp() };
|
|
621
630
|
|
|
@@ -627,16 +636,22 @@ export class ReactNative extends HandlerInterface
|
|
|
627
636
|
|
|
628
637
|
let answer = await this._pc.createAnswer();
|
|
629
638
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
630
|
-
const answerMediaObject = localSdpObject.media
|
|
631
|
-
.find((m: any) => String(m.mid) === mid);
|
|
632
639
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
+
for (const options of optionsList)
|
|
641
|
+
{
|
|
642
|
+
const { kind, rtpParameters } = options;
|
|
643
|
+
const mid = kind;
|
|
644
|
+
const answerMediaObject = localSdpObject.media
|
|
645
|
+
.find((m: any) => String(m.mid) === mid);
|
|
646
|
+
|
|
647
|
+
// May need to modify codec parameters in the answer based on codec
|
|
648
|
+
// parameters in the offer.
|
|
649
|
+
sdpCommonUtils.applyCodecParameters(
|
|
650
|
+
{
|
|
651
|
+
offerRtpParameters : rtpParameters,
|
|
652
|
+
answerMediaObject
|
|
653
|
+
});
|
|
654
|
+
}
|
|
640
655
|
|
|
641
656
|
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
642
657
|
|
|
@@ -655,17 +670,26 @@ export class ReactNative extends HandlerInterface
|
|
|
655
670
|
|
|
656
671
|
await this._pc.setLocalDescription(answer);
|
|
657
672
|
|
|
658
|
-
const
|
|
659
|
-
|
|
660
|
-
|
|
673
|
+
for (const options of optionsList)
|
|
674
|
+
{
|
|
675
|
+
const { kind, trackId, rtpParameters } = options;
|
|
676
|
+
const localId = trackId;
|
|
677
|
+
const mid = kind;
|
|
678
|
+
const streamId = mapStreamId.get(trackId);
|
|
679
|
+
const stream = this._pc.getRemoteStreams()
|
|
680
|
+
.find((s: MediaStream) => s.id === streamId);
|
|
681
|
+
const track = stream.getTrackById(localId);
|
|
661
682
|
|
|
662
|
-
|
|
663
|
-
|
|
683
|
+
if (!track)
|
|
684
|
+
throw new Error('remote track not found');
|
|
664
685
|
|
|
665
|
-
|
|
666
|
-
|
|
686
|
+
// Insert into the map.
|
|
687
|
+
this._mapRecvLocalIdInfo.set(localId, { mid, rtpParameters });
|
|
688
|
+
|
|
689
|
+
results.push({ localId, track });
|
|
690
|
+
}
|
|
667
691
|
|
|
668
|
-
return
|
|
692
|
+
return results;
|
|
669
693
|
}
|
|
670
694
|
|
|
671
695
|
async stopReceiving(localId: string): Promise<void>
|
package/src/handlers/Safari11.ts
CHANGED
|
@@ -651,24 +651,30 @@ export class Safari11 extends HandlerInterface
|
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
async receive(
|
|
654
|
-
|
|
655
|
-
): Promise<HandlerReceiveResult>
|
|
654
|
+
optionsList: HandlerReceiveOptions[]
|
|
655
|
+
) : Promise<HandlerReceiveResult[]>
|
|
656
656
|
{
|
|
657
657
|
this._assertRecvDirection();
|
|
658
658
|
|
|
659
|
-
|
|
659
|
+
const results: HandlerReceiveResult[] = [];
|
|
660
660
|
|
|
661
|
-
const
|
|
662
|
-
|
|
661
|
+
for (const options of optionsList)
|
|
662
|
+
{
|
|
663
|
+
const { trackId, kind, rtpParameters } = options;
|
|
663
664
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
665
|
+
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
666
|
+
|
|
667
|
+
const mid = kind;
|
|
668
|
+
|
|
669
|
+
this._remoteSdp!.receive(
|
|
670
|
+
{
|
|
671
|
+
mid,
|
|
672
|
+
kind,
|
|
673
|
+
offerRtpParameters : rtpParameters,
|
|
674
|
+
streamId : rtpParameters.rtcp!.cname!,
|
|
675
|
+
trackId
|
|
676
|
+
});
|
|
677
|
+
}
|
|
672
678
|
|
|
673
679
|
const offer = { type: 'offer', sdp: this._remoteSdp!.getSdp() };
|
|
674
680
|
|
|
@@ -680,16 +686,22 @@ export class Safari11 extends HandlerInterface
|
|
|
680
686
|
|
|
681
687
|
let answer = await this._pc.createAnswer();
|
|
682
688
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
683
|
-
const answerMediaObject = localSdpObject.media
|
|
684
|
-
.find((m: any) => String(m.mid) === mid);
|
|
685
689
|
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
for (const options of optionsList)
|
|
691
|
+
{
|
|
692
|
+
const { kind, rtpParameters } = options;
|
|
693
|
+
const mid = kind;
|
|
694
|
+
const answerMediaObject = localSdpObject.media
|
|
695
|
+
.find((m: any) => String(m.mid) === mid);
|
|
696
|
+
|
|
697
|
+
// May need to modify codec parameters in the answer based on codec
|
|
698
|
+
// parameters in the offer.
|
|
699
|
+
sdpCommonUtils.applyCodecParameters(
|
|
700
|
+
{
|
|
701
|
+
offerRtpParameters : rtpParameters,
|
|
702
|
+
answerMediaObject
|
|
703
|
+
});
|
|
704
|
+
}
|
|
693
705
|
|
|
694
706
|
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
695
707
|
|
|
@@ -708,20 +720,29 @@ export class Safari11 extends HandlerInterface
|
|
|
708
720
|
|
|
709
721
|
await this._pc.setLocalDescription(answer);
|
|
710
722
|
|
|
711
|
-
const
|
|
712
|
-
|
|
723
|
+
for (const options of optionsList)
|
|
724
|
+
{
|
|
725
|
+
const { kind, trackId, rtpParameters } = options;
|
|
726
|
+
const mid = kind;
|
|
727
|
+
const localId = trackId;
|
|
713
728
|
|
|
714
|
-
|
|
715
|
-
|
|
729
|
+
const rtpReceiver = this._pc.getReceivers()
|
|
730
|
+
.find((r: RTCRtpReceiver) => r.track && r.track.id === localId);
|
|
716
731
|
|
|
717
|
-
|
|
718
|
-
|
|
732
|
+
if (!rtpReceiver)
|
|
733
|
+
throw new Error('new RTCRtpReceiver not');
|
|
719
734
|
|
|
720
|
-
|
|
721
|
-
localId,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
735
|
+
// Insert into the map.
|
|
736
|
+
this._mapRecvLocalIdInfo.set(localId, { mid, rtpParameters, rtpReceiver });
|
|
737
|
+
|
|
738
|
+
results.push({
|
|
739
|
+
localId,
|
|
740
|
+
track : rtpReceiver.track,
|
|
741
|
+
rtpReceiver
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return results;
|
|
725
746
|
}
|
|
726
747
|
|
|
727
748
|
async stopReceiving(localId: string): Promise<void>
|
package/src/handlers/Safari12.ts
CHANGED
|
@@ -603,23 +603,33 @@ export class Safari12 extends HandlerInterface
|
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
async receive(
|
|
606
|
-
|
|
607
|
-
): Promise<HandlerReceiveResult>
|
|
606
|
+
optionsList: HandlerReceiveOptions[]
|
|
607
|
+
) : Promise<HandlerReceiveResult[]>
|
|
608
608
|
{
|
|
609
609
|
this._assertRecvDirection();
|
|
610
610
|
|
|
611
|
-
|
|
611
|
+
const results: HandlerReceiveResult[] = [];
|
|
612
|
+
const mapLocalId: Map<string, string> = new Map();
|
|
612
613
|
|
|
613
|
-
const
|
|
614
|
+
for (const options of optionsList)
|
|
615
|
+
{
|
|
616
|
+
const { trackId, kind, rtpParameters } = options;
|
|
614
617
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
618
|
+
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
619
|
+
|
|
620
|
+
const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);
|
|
621
|
+
|
|
622
|
+
mapLocalId.set(trackId, localId);
|
|
623
|
+
|
|
624
|
+
this._remoteSdp!.receive(
|
|
625
|
+
{
|
|
626
|
+
mid : localId,
|
|
627
|
+
kind,
|
|
628
|
+
offerRtpParameters : rtpParameters,
|
|
629
|
+
streamId : rtpParameters.rtcp!.cname!,
|
|
630
|
+
trackId
|
|
631
|
+
});
|
|
632
|
+
}
|
|
623
633
|
|
|
624
634
|
const offer = { type: 'offer', sdp: this._remoteSdp!.getSdp() };
|
|
625
635
|
|
|
@@ -631,16 +641,22 @@ export class Safari12 extends HandlerInterface
|
|
|
631
641
|
|
|
632
642
|
let answer = await this._pc.createAnswer();
|
|
633
643
|
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
634
|
-
const answerMediaObject = localSdpObject.media
|
|
635
|
-
.find((m: any) => String(m.mid) === localId);
|
|
636
644
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
645
|
+
for (const options of optionsList)
|
|
646
|
+
{
|
|
647
|
+
const { trackId, rtpParameters } = options;
|
|
648
|
+
const localId = mapLocalId.get(trackId);
|
|
649
|
+
const answerMediaObject = localSdpObject.media
|
|
650
|
+
.find((m: any) => String(m.mid) === localId);
|
|
651
|
+
|
|
652
|
+
// May need to modify codec parameters in the answer based on codec
|
|
653
|
+
// parameters in the offer.
|
|
654
|
+
sdpCommonUtils.applyCodecParameters(
|
|
655
|
+
{
|
|
656
|
+
offerRtpParameters : rtpParameters,
|
|
657
|
+
answerMediaObject
|
|
658
|
+
});
|
|
659
|
+
}
|
|
644
660
|
|
|
645
661
|
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
646
662
|
|
|
@@ -659,20 +675,27 @@ export class Safari12 extends HandlerInterface
|
|
|
659
675
|
|
|
660
676
|
await this._pc.setLocalDescription(answer);
|
|
661
677
|
|
|
662
|
-
const
|
|
663
|
-
|
|
678
|
+
for (const options of optionsList)
|
|
679
|
+
{
|
|
680
|
+
const { trackId } = options;
|
|
681
|
+
const localId = mapLocalId.get(trackId)!;
|
|
682
|
+
const transceiver = this._pc.getTransceivers()
|
|
683
|
+
.find((t: RTCRtpTransceiver) => t.mid === localId);
|
|
664
684
|
|
|
665
|
-
|
|
666
|
-
|
|
685
|
+
if (!transceiver)
|
|
686
|
+
throw new Error('new RTCRtpTransceiver not found');
|
|
667
687
|
|
|
668
|
-
|
|
669
|
-
|
|
688
|
+
// Store in the map.
|
|
689
|
+
this._mapMidTransceiver.set(localId, transceiver);
|
|
670
690
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
691
|
+
results.push({
|
|
692
|
+
localId,
|
|
693
|
+
track : transceiver.receiver.track,
|
|
694
|
+
rtpReceiver : transceiver.receiver
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
return results;
|
|
676
699
|
}
|
|
677
700
|
|
|
678
701
|
async stopReceiving(localId: string): Promise<void>
|
package/src/ortc.ts
CHANGED
|
@@ -1073,15 +1073,14 @@ function matchCodecs(
|
|
|
1073
1073
|
{
|
|
1074
1074
|
case 'video/h264':
|
|
1075
1075
|
{
|
|
1076
|
-
const aPacketizationMode = aCodec.parameters['packetization-mode'] || 0;
|
|
1077
|
-
const bPacketizationMode = bCodec.parameters['packetization-mode'] || 0;
|
|
1078
|
-
|
|
1079
|
-
if (aPacketizationMode !== bPacketizationMode)
|
|
1080
|
-
return false;
|
|
1081
|
-
|
|
1082
|
-
// If strict matching check profile-level-id.
|
|
1083
1076
|
if (strict)
|
|
1084
1077
|
{
|
|
1078
|
+
const aPacketizationMode = aCodec.parameters['packetization-mode'] || 0;
|
|
1079
|
+
const bPacketizationMode = bCodec.parameters['packetization-mode'] || 0;
|
|
1080
|
+
|
|
1081
|
+
if (aPacketizationMode !== bPacketizationMode)
|
|
1082
|
+
return false;
|
|
1083
|
+
|
|
1085
1084
|
if (!h264.isSameProfile(aCodec.parameters, bCodec.parameters))
|
|
1086
1085
|
return false;
|
|
1087
1086
|
|
|
@@ -1117,7 +1116,6 @@ function matchCodecs(
|
|
|
1117
1116
|
|
|
1118
1117
|
case 'video/vp9':
|
|
1119
1118
|
{
|
|
1120
|
-
// If strict matching check profile-id.
|
|
1121
1119
|
if (strict)
|
|
1122
1120
|
{
|
|
1123
1121
|
const aProfileId = aCodec.parameters['profile-id'] || 0;
|