@wazo/sdk 0.38.6 → 0.38.7
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/dist/wazo-sdk.js +1 -1
- package/esm/__tests__/web-rtc-client.test.js +22 -1
- package/esm/checker/Checker.js +22 -1
- package/esm/checker/checks/index.js +22 -1
- package/esm/checker/checks/webrtc-transport.js +22 -1
- package/esm/checker/checks/webrtc.js +22 -1
- package/esm/index.js +22 -1
- package/esm/lib/WazoSessionDescriptionHandler.js +22 -1
- package/esm/simple/Auth.js +22 -1
- package/esm/simple/Configuration.js +22 -1
- package/esm/simple/Phone.js +22 -1
- package/esm/simple/index.js +22 -1
- package/esm/simple/room/LocalParticipant.js +22 -1
- package/esm/simple/room/Participant.js +22 -1
- package/esm/simple/room/RemoteParticipant.js +22 -1
- package/esm/simple/room/Room.js +22 -1
- package/esm/simple/room/SipRoom.js +22 -1
- package/esm/simple/room/Stream.js +22 -1
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +22 -1
- package/esm/simple/utils.js +22 -1
- package/esm/utils/__tests__/sdp.test.js +50 -0
- package/esm/utils/sdp.js +19 -1
- package/esm/web-rtc-client.js +22 -1
- package/lib/__tests__/web-rtc-client.test.js +22 -1
- package/lib/checker/Checker.js +22 -1
- package/lib/checker/checks/index.js +22 -1
- package/lib/checker/checks/webrtc-transport.js +22 -1
- package/lib/checker/checks/webrtc.js +22 -1
- package/lib/index.js +22 -1
- package/lib/lib/WazoSessionDescriptionHandler.js +22 -1
- package/lib/simple/Auth.js +22 -1
- package/lib/simple/Configuration.js +22 -1
- package/lib/simple/Phone.js +22 -1
- package/lib/simple/index.js +22 -1
- package/lib/simple/room/LocalParticipant.js +22 -1
- package/lib/simple/room/Participant.js +22 -1
- package/lib/simple/room/RemoteParticipant.js +22 -1
- package/lib/simple/room/Room.js +22 -1
- package/lib/simple/room/SipRoom.js +22 -1
- package/lib/simple/room/Stream.js +22 -1
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +22 -1
- package/lib/simple/utils.js +22 -1
- package/lib/utils/__tests__/sdp.test.js +50 -0
- package/lib/utils/sdp.js +19 -0
- package/lib/web-rtc-client.js +22 -1
- package/package.json +1 -1
- package/src/lib/WazoSessionDescriptionHandler.js +5 -2
- package/src/utils/__tests__/sdp.test.js +33 -1
- package/src/utils/sdp.js +18 -0
|
@@ -778,6 +778,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
778
778
|
return fixed;
|
|
779
779
|
};
|
|
780
780
|
|
|
781
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
782
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
783
|
+
|
|
784
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
785
|
+
if (!mediaWithCandidate) {
|
|
786
|
+
return sdp;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
const { candidates } = mediaWithCandidate;
|
|
790
|
+
|
|
791
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
792
|
+
...media,
|
|
793
|
+
candidates: media.candidates || candidates,
|
|
794
|
+
}));
|
|
795
|
+
|
|
796
|
+
return sdpParser.write(parsedSdp);
|
|
797
|
+
};
|
|
798
|
+
|
|
781
799
|
/* global RTCSessionDescriptionInit, navigator */
|
|
782
800
|
|
|
783
801
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -907,7 +925,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
907
925
|
|
|
908
926
|
// Check if we got ICEs
|
|
909
927
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
910
|
-
return
|
|
928
|
+
return {
|
|
929
|
+
type: description.type,
|
|
930
|
+
sdp: addIcesInAllBundles(sdp),
|
|
931
|
+
};
|
|
911
932
|
}
|
|
912
933
|
|
|
913
934
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
package/esm/checker/Checker.js
CHANGED
|
@@ -5514,6 +5514,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
5514
5514
|
return fixed;
|
|
5515
5515
|
};
|
|
5516
5516
|
|
|
5517
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
5518
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
5519
|
+
|
|
5520
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
5521
|
+
if (!mediaWithCandidate) {
|
|
5522
|
+
return sdp;
|
|
5523
|
+
}
|
|
5524
|
+
|
|
5525
|
+
const { candidates } = mediaWithCandidate;
|
|
5526
|
+
|
|
5527
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
5528
|
+
...media,
|
|
5529
|
+
candidates: media.candidates || candidates,
|
|
5530
|
+
}));
|
|
5531
|
+
|
|
5532
|
+
return sdpParser.write(parsedSdp);
|
|
5533
|
+
};
|
|
5534
|
+
|
|
5517
5535
|
/* global RTCSessionDescriptionInit, navigator */
|
|
5518
5536
|
|
|
5519
5537
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -5643,7 +5661,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
5643
5661
|
|
|
5644
5662
|
// Check if we got ICEs
|
|
5645
5663
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
5646
|
-
return
|
|
5664
|
+
return {
|
|
5665
|
+
type: description.type,
|
|
5666
|
+
sdp: addIcesInAllBundles(sdp),
|
|
5667
|
+
};
|
|
5647
5668
|
}
|
|
5648
5669
|
|
|
5649
5670
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -5514,6 +5514,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
5514
5514
|
return fixed;
|
|
5515
5515
|
};
|
|
5516
5516
|
|
|
5517
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
5518
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
5519
|
+
|
|
5520
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
5521
|
+
if (!mediaWithCandidate) {
|
|
5522
|
+
return sdp;
|
|
5523
|
+
}
|
|
5524
|
+
|
|
5525
|
+
const { candidates } = mediaWithCandidate;
|
|
5526
|
+
|
|
5527
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
5528
|
+
...media,
|
|
5529
|
+
candidates: media.candidates || candidates,
|
|
5530
|
+
}));
|
|
5531
|
+
|
|
5532
|
+
return sdpParser.write(parsedSdp);
|
|
5533
|
+
};
|
|
5534
|
+
|
|
5517
5535
|
/* global RTCSessionDescriptionInit, navigator */
|
|
5518
5536
|
|
|
5519
5537
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -5643,7 +5661,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
5643
5661
|
|
|
5644
5662
|
// Check if we got ICEs
|
|
5645
5663
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
5646
|
-
return
|
|
5664
|
+
return {
|
|
5665
|
+
type: description.type,
|
|
5666
|
+
sdp: addIcesInAllBundles(sdp),
|
|
5667
|
+
};
|
|
5647
5668
|
}
|
|
5648
5669
|
|
|
5649
5670
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -778,6 +778,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
778
778
|
return fixed;
|
|
779
779
|
};
|
|
780
780
|
|
|
781
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
782
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
783
|
+
|
|
784
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
785
|
+
if (!mediaWithCandidate) {
|
|
786
|
+
return sdp;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
const { candidates } = mediaWithCandidate;
|
|
790
|
+
|
|
791
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
792
|
+
...media,
|
|
793
|
+
candidates: media.candidates || candidates,
|
|
794
|
+
}));
|
|
795
|
+
|
|
796
|
+
return sdpParser.write(parsedSdp);
|
|
797
|
+
};
|
|
798
|
+
|
|
781
799
|
/* global RTCSessionDescriptionInit, navigator */
|
|
782
800
|
|
|
783
801
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -907,7 +925,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
907
925
|
|
|
908
926
|
// Check if we got ICEs
|
|
909
927
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
910
|
-
return
|
|
928
|
+
return {
|
|
929
|
+
type: description.type,
|
|
930
|
+
sdp: addIcesInAllBundles(sdp),
|
|
931
|
+
};
|
|
911
932
|
}
|
|
912
933
|
|
|
913
934
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -778,6 +778,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
778
778
|
return fixed;
|
|
779
779
|
};
|
|
780
780
|
|
|
781
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
782
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
783
|
+
|
|
784
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
785
|
+
if (!mediaWithCandidate) {
|
|
786
|
+
return sdp;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
const { candidates } = mediaWithCandidate;
|
|
790
|
+
|
|
791
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
792
|
+
...media,
|
|
793
|
+
candidates: media.candidates || candidates,
|
|
794
|
+
}));
|
|
795
|
+
|
|
796
|
+
return sdpParser.write(parsedSdp);
|
|
797
|
+
};
|
|
798
|
+
|
|
781
799
|
/* global RTCSessionDescriptionInit, navigator */
|
|
782
800
|
|
|
783
801
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -907,7 +925,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
907
925
|
|
|
908
926
|
// Check if we got ICEs
|
|
909
927
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
910
|
-
return
|
|
928
|
+
return {
|
|
929
|
+
type: description.type,
|
|
930
|
+
sdp: addIcesInAllBundles(sdp),
|
|
931
|
+
};
|
|
911
932
|
}
|
|
912
933
|
|
|
913
934
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
package/esm/index.js
CHANGED
|
@@ -5725,6 +5725,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
5725
5725
|
return fixed;
|
|
5726
5726
|
};
|
|
5727
5727
|
|
|
5728
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
5729
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
5730
|
+
|
|
5731
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
5732
|
+
if (!mediaWithCandidate) {
|
|
5733
|
+
return sdp;
|
|
5734
|
+
}
|
|
5735
|
+
|
|
5736
|
+
const { candidates } = mediaWithCandidate;
|
|
5737
|
+
|
|
5738
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
5739
|
+
...media,
|
|
5740
|
+
candidates: media.candidates || candidates,
|
|
5741
|
+
}));
|
|
5742
|
+
|
|
5743
|
+
return sdpParser.write(parsedSdp);
|
|
5744
|
+
};
|
|
5745
|
+
|
|
5728
5746
|
/* global RTCSessionDescriptionInit, navigator */
|
|
5729
5747
|
|
|
5730
5748
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -5854,7 +5872,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
5854
5872
|
|
|
5855
5873
|
// Check if we got ICEs
|
|
5856
5874
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
5857
|
-
return
|
|
5875
|
+
return {
|
|
5876
|
+
type: description.type,
|
|
5877
|
+
sdp: addIcesInAllBundles(sdp),
|
|
5878
|
+
};
|
|
5858
5879
|
}
|
|
5859
5880
|
|
|
5860
5881
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -442,6 +442,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
442
442
|
return fixed;
|
|
443
443
|
};
|
|
444
444
|
|
|
445
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
446
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
447
|
+
|
|
448
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
449
|
+
if (!mediaWithCandidate) {
|
|
450
|
+
return sdp;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const { candidates } = mediaWithCandidate;
|
|
454
|
+
|
|
455
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
456
|
+
...media,
|
|
457
|
+
candidates: media.candidates || candidates,
|
|
458
|
+
}));
|
|
459
|
+
|
|
460
|
+
return sdpParser.write(parsedSdp);
|
|
461
|
+
};
|
|
462
|
+
|
|
445
463
|
/* global RTCSessionDescriptionInit, navigator */
|
|
446
464
|
|
|
447
465
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -571,7 +589,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
571
589
|
|
|
572
590
|
// Check if we got ICEs
|
|
573
591
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
574
|
-
return
|
|
592
|
+
return {
|
|
593
|
+
type: description.type,
|
|
594
|
+
sdp: addIcesInAllBundles(sdp),
|
|
595
|
+
};
|
|
575
596
|
}
|
|
576
597
|
|
|
577
598
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
package/esm/simple/Auth.js
CHANGED
|
@@ -5903,6 +5903,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
5903
5903
|
return fixed;
|
|
5904
5904
|
};
|
|
5905
5905
|
|
|
5906
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
5907
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
5908
|
+
|
|
5909
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
5910
|
+
if (!mediaWithCandidate) {
|
|
5911
|
+
return sdp;
|
|
5912
|
+
}
|
|
5913
|
+
|
|
5914
|
+
const { candidates } = mediaWithCandidate;
|
|
5915
|
+
|
|
5916
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
5917
|
+
...media,
|
|
5918
|
+
candidates: media.candidates || candidates,
|
|
5919
|
+
}));
|
|
5920
|
+
|
|
5921
|
+
return sdpParser.write(parsedSdp);
|
|
5922
|
+
};
|
|
5923
|
+
|
|
5906
5924
|
/* global RTCSessionDescriptionInit, navigator */
|
|
5907
5925
|
|
|
5908
5926
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6032,7 +6050,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6032
6050
|
|
|
6033
6051
|
// Check if we got ICEs
|
|
6034
6052
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6035
|
-
return
|
|
6053
|
+
return {
|
|
6054
|
+
type: description.type,
|
|
6055
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6056
|
+
};
|
|
6036
6057
|
}
|
|
6037
6058
|
|
|
6038
6059
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -5903,6 +5903,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
5903
5903
|
return fixed;
|
|
5904
5904
|
};
|
|
5905
5905
|
|
|
5906
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
5907
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
5908
|
+
|
|
5909
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
5910
|
+
if (!mediaWithCandidate) {
|
|
5911
|
+
return sdp;
|
|
5912
|
+
}
|
|
5913
|
+
|
|
5914
|
+
const { candidates } = mediaWithCandidate;
|
|
5915
|
+
|
|
5916
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
5917
|
+
...media,
|
|
5918
|
+
candidates: media.candidates || candidates,
|
|
5919
|
+
}));
|
|
5920
|
+
|
|
5921
|
+
return sdpParser.write(parsedSdp);
|
|
5922
|
+
};
|
|
5923
|
+
|
|
5906
5924
|
/* global RTCSessionDescriptionInit, navigator */
|
|
5907
5925
|
|
|
5908
5926
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6032,7 +6050,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6032
6050
|
|
|
6033
6051
|
// Check if we got ICEs
|
|
6034
6052
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6035
|
-
return
|
|
6053
|
+
return {
|
|
6054
|
+
type: description.type,
|
|
6055
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6056
|
+
};
|
|
6036
6057
|
}
|
|
6037
6058
|
|
|
6038
6059
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
package/esm/simple/Phone.js
CHANGED
|
@@ -5903,6 +5903,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
5903
5903
|
return fixed;
|
|
5904
5904
|
};
|
|
5905
5905
|
|
|
5906
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
5907
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
5908
|
+
|
|
5909
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
5910
|
+
if (!mediaWithCandidate) {
|
|
5911
|
+
return sdp;
|
|
5912
|
+
}
|
|
5913
|
+
|
|
5914
|
+
const { candidates } = mediaWithCandidate;
|
|
5915
|
+
|
|
5916
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
5917
|
+
...media,
|
|
5918
|
+
candidates: media.candidates || candidates,
|
|
5919
|
+
}));
|
|
5920
|
+
|
|
5921
|
+
return sdpParser.write(parsedSdp);
|
|
5922
|
+
};
|
|
5923
|
+
|
|
5906
5924
|
/* global RTCSessionDescriptionInit, navigator */
|
|
5907
5925
|
|
|
5908
5926
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6032,7 +6050,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6032
6050
|
|
|
6033
6051
|
// Check if we got ICEs
|
|
6034
6052
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6035
|
-
return
|
|
6053
|
+
return {
|
|
6054
|
+
type: description.type,
|
|
6055
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6056
|
+
};
|
|
6036
6057
|
}
|
|
6037
6058
|
|
|
6038
6059
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
package/esm/simple/index.js
CHANGED
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
package/esm/simple/room/Room.js
CHANGED
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|
|
@@ -6204,6 +6204,24 @@ const fixSdp = (sdp , candidates , forcePort = true)
|
|
|
6204
6204
|
return fixed;
|
|
6205
6205
|
};
|
|
6206
6206
|
|
|
6207
|
+
const addIcesInAllBundles = (sdp ) => {
|
|
6208
|
+
const parsedSdp = sdpParser.parse(sdp);
|
|
6209
|
+
|
|
6210
|
+
const mediaWithCandidate = parsedSdp.media.find(media => !!media.candidates);
|
|
6211
|
+
if (!mediaWithCandidate) {
|
|
6212
|
+
return sdp;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
const { candidates } = mediaWithCandidate;
|
|
6216
|
+
|
|
6217
|
+
parsedSdp.media = parsedSdp.media.map(media => ({
|
|
6218
|
+
...media,
|
|
6219
|
+
candidates: media.candidates || candidates,
|
|
6220
|
+
}));
|
|
6221
|
+
|
|
6222
|
+
return sdpParser.write(parsedSdp);
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6207
6225
|
/* global RTCSessionDescriptionInit, navigator */
|
|
6208
6226
|
|
|
6209
6227
|
const wazoLogger = IssueReporter$1 ? IssueReporter$1.loggerFor('webrtc-sdh') : console;
|
|
@@ -6333,7 +6351,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
6333
6351
|
|
|
6334
6352
|
// Check if we got ICEs
|
|
6335
6353
|
if (sdp.indexOf('a=candidate') !== -1) {
|
|
6336
|
-
return
|
|
6354
|
+
return {
|
|
6355
|
+
type: description.type,
|
|
6356
|
+
sdp: addIcesInAllBundles(sdp),
|
|
6357
|
+
};
|
|
6337
6358
|
}
|
|
6338
6359
|
|
|
6339
6360
|
wazoLogger.info('No ICE candidates found in SDP, fixing it with gathered ices', this.gatheredCandidates);
|