@webex/web-client-media-engine 3.26.1 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +20 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +20 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +6 -7
- package/package.json +5 -4
package/dist/esm/index.js
CHANGED
|
@@ -9743,6 +9743,9 @@ function applyFormatParameters(mediaDescription, paramsMap) {
|
|
|
9743
9743
|
}
|
|
9744
9744
|
});
|
|
9745
9745
|
});
|
|
9746
|
+
}
|
|
9747
|
+
function hasIceCandidates(sdp) {
|
|
9748
|
+
return sdp.media.some((media) => media.iceInfo.candidates.length);
|
|
9746
9749
|
}
|
|
9747
9750
|
|
|
9748
9751
|
function generateSsrc() {
|
|
@@ -9750,10 +9753,9 @@ function generateSsrc() {
|
|
|
9750
9753
|
}
|
|
9751
9754
|
|
|
9752
9755
|
class EgressSdpMunger {
|
|
9753
|
-
constructor(
|
|
9756
|
+
constructor() {
|
|
9754
9757
|
this.streamIds = [];
|
|
9755
9758
|
this.customCodecParameters = new Map();
|
|
9756
|
-
this.egressMungerOptions = options;
|
|
9757
9759
|
}
|
|
9758
9760
|
reset() {
|
|
9759
9761
|
this.streamIds = [];
|
|
@@ -9857,10 +9859,10 @@ class EgressSdpMunger {
|
|
|
9857
9859
|
disableTwcc(mediaDescription);
|
|
9858
9860
|
}
|
|
9859
9861
|
}
|
|
9860
|
-
mungeLocalDescriptionForRemoteServer(mediaDescription, mediaContent, csi) {
|
|
9862
|
+
mungeLocalDescriptionForRemoteServer(mediaDescription, mediaContent, csi, mungeOptions = { injectDummyCandidates: true }) {
|
|
9861
9863
|
injectContentType(mediaDescription, mediaContent);
|
|
9862
9864
|
injectJmpAttributes(mediaDescription, csi, 'SSRC');
|
|
9863
|
-
if (
|
|
9865
|
+
if (mungeOptions.injectDummyCandidates) {
|
|
9864
9866
|
injectDummyCandidates(mediaDescription);
|
|
9865
9867
|
}
|
|
9866
9868
|
if (mediaDescription.type === 'video') {
|
|
@@ -14605,8 +14607,8 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14605
14607
|
(BrowserInfo.isChrome() || BrowserInfo.isEdge()),
|
|
14606
14608
|
});
|
|
14607
14609
|
}
|
|
14608
|
-
mungeLocalDescriptionForRemoteServer(mediaDescription) {
|
|
14609
|
-
this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi);
|
|
14610
|
+
mungeLocalDescriptionForRemoteServer(mediaDescription, mungeOptions = { injectDummyCandidates: true }) {
|
|
14611
|
+
this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi, mungeOptions);
|
|
14610
14612
|
}
|
|
14611
14613
|
mungeRemoteDescription(mediaDescription) {
|
|
14612
14614
|
this.munger.mungeRemoteDescription(mediaDescription);
|
|
@@ -14919,9 +14921,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14919
14921
|
}
|
|
14920
14922
|
const mid = this.midPredictor.getNextMid(mediaType);
|
|
14921
14923
|
const csi = generateCsi(getMediaFamily(mediaType), sceneId);
|
|
14922
|
-
const munger = new EgressSdpMunger(
|
|
14923
|
-
doFullIce: this.options.doFullIce,
|
|
14924
|
-
});
|
|
14924
|
+
const munger = new EgressSdpMunger();
|
|
14925
14925
|
const transceiver = new SendOnlyTransceiver({
|
|
14926
14926
|
rtcRtpTransceiver,
|
|
14927
14927
|
mid,
|
|
@@ -15435,13 +15435,22 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15435
15435
|
}
|
|
15436
15436
|
prepareLocalOfferForRemoteServer(offer) {
|
|
15437
15437
|
const parsedOffer = parse(offer);
|
|
15438
|
+
const shouldInjectDummyCandidates = () => {
|
|
15439
|
+
if (!this.options.doFullIce) {
|
|
15440
|
+
return true;
|
|
15441
|
+
}
|
|
15442
|
+
return !hasIceCandidates(parsedOffer);
|
|
15443
|
+
};
|
|
15444
|
+
const mungeOptions = {
|
|
15445
|
+
injectDummyCandidates: shouldInjectDummyCandidates(),
|
|
15446
|
+
};
|
|
15438
15447
|
parsedOffer.avMedia
|
|
15439
15448
|
.filter((av) => av.direction === 'sendrecv' || av.direction === 'inactive')
|
|
15440
15449
|
.forEach((av) => {
|
|
15441
15450
|
const sendTransceiver = this.getSendTransceiverByMidOrThrow(av.mid);
|
|
15442
|
-
sendTransceiver.mungeLocalDescriptionForRemoteServer(av);
|
|
15451
|
+
sendTransceiver.mungeLocalDescriptionForRemoteServer(av, mungeOptions);
|
|
15443
15452
|
});
|
|
15444
|
-
if (
|
|
15453
|
+
if (mungeOptions.injectDummyCandidates) {
|
|
15445
15454
|
parsedOffer.media
|
|
15446
15455
|
.filter((media) => media instanceof ApplicationMediaDescription)
|
|
15447
15456
|
.forEach((media) => {
|