@webex/web-client-media-engine 3.26.0 → 3.26.2
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 +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9747,6 +9747,9 @@ function applyFormatParameters(mediaDescription, paramsMap) {
|
|
|
9747
9747
|
}
|
|
9748
9748
|
});
|
|
9749
9749
|
});
|
|
9750
|
+
}
|
|
9751
|
+
function hasIceCandidates(sdp) {
|
|
9752
|
+
return sdp.media.some((media) => media.iceInfo.candidates.length);
|
|
9750
9753
|
}
|
|
9751
9754
|
|
|
9752
9755
|
function generateSsrc() {
|
|
@@ -9754,10 +9757,9 @@ function generateSsrc() {
|
|
|
9754
9757
|
}
|
|
9755
9758
|
|
|
9756
9759
|
class EgressSdpMunger {
|
|
9757
|
-
constructor(
|
|
9760
|
+
constructor() {
|
|
9758
9761
|
this.streamIds = [];
|
|
9759
9762
|
this.customCodecParameters = new Map();
|
|
9760
|
-
this.egressMungerOptions = options;
|
|
9761
9763
|
}
|
|
9762
9764
|
reset() {
|
|
9763
9765
|
this.streamIds = [];
|
|
@@ -9861,10 +9863,10 @@ class EgressSdpMunger {
|
|
|
9861
9863
|
disableTwcc(mediaDescription);
|
|
9862
9864
|
}
|
|
9863
9865
|
}
|
|
9864
|
-
mungeLocalDescriptionForRemoteServer(mediaDescription, mediaContent, csi) {
|
|
9866
|
+
mungeLocalDescriptionForRemoteServer(mediaDescription, mediaContent, csi, mungeOptions = { injectDummyCandidates: true }) {
|
|
9865
9867
|
injectContentType(mediaDescription, mediaContent);
|
|
9866
9868
|
injectJmpAttributes(mediaDescription, csi, 'SSRC');
|
|
9867
|
-
if (
|
|
9869
|
+
if (mungeOptions.injectDummyCandidates) {
|
|
9868
9870
|
injectDummyCandidates(mediaDescription);
|
|
9869
9871
|
}
|
|
9870
9872
|
if (mediaDescription.type === 'video') {
|
|
@@ -14609,8 +14611,8 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14609
14611
|
(BrowserInfo.isChrome() || BrowserInfo.isEdge()),
|
|
14610
14612
|
});
|
|
14611
14613
|
}
|
|
14612
|
-
mungeLocalDescriptionForRemoteServer(mediaDescription) {
|
|
14613
|
-
this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi);
|
|
14614
|
+
mungeLocalDescriptionForRemoteServer(mediaDescription, mungeOptions = { injectDummyCandidates: true }) {
|
|
14615
|
+
this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi, mungeOptions);
|
|
14614
14616
|
}
|
|
14615
14617
|
mungeRemoteDescription(mediaDescription) {
|
|
14616
14618
|
this.munger.mungeRemoteDescription(mediaDescription);
|
|
@@ -14923,9 +14925,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14923
14925
|
}
|
|
14924
14926
|
const mid = this.midPredictor.getNextMid(mediaType);
|
|
14925
14927
|
const csi = generateCsi(getMediaFamily(mediaType), sceneId);
|
|
14926
|
-
const munger = new EgressSdpMunger(
|
|
14927
|
-
doFullIce: this.options.doFullIce,
|
|
14928
|
-
});
|
|
14928
|
+
const munger = new EgressSdpMunger();
|
|
14929
14929
|
const transceiver = new SendOnlyTransceiver({
|
|
14930
14930
|
rtcRtpTransceiver,
|
|
14931
14931
|
mid,
|
|
@@ -15439,13 +15439,22 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15439
15439
|
}
|
|
15440
15440
|
prepareLocalOfferForRemoteServer(offer) {
|
|
15441
15441
|
const parsedOffer = parse(offer);
|
|
15442
|
+
const shouldInjectDummyCandidates = () => {
|
|
15443
|
+
if (!this.options.doFullIce) {
|
|
15444
|
+
return true;
|
|
15445
|
+
}
|
|
15446
|
+
return !hasIceCandidates(parsedOffer);
|
|
15447
|
+
};
|
|
15448
|
+
const mungeOptions = {
|
|
15449
|
+
injectDummyCandidates: shouldInjectDummyCandidates(),
|
|
15450
|
+
};
|
|
15442
15451
|
parsedOffer.avMedia
|
|
15443
15452
|
.filter((av) => av.direction === 'sendrecv' || av.direction === 'inactive')
|
|
15444
15453
|
.forEach((av) => {
|
|
15445
15454
|
const sendTransceiver = this.getSendTransceiverByMidOrThrow(av.mid);
|
|
15446
|
-
sendTransceiver.mungeLocalDescriptionForRemoteServer(av);
|
|
15455
|
+
sendTransceiver.mungeLocalDescriptionForRemoteServer(av, mungeOptions);
|
|
15447
15456
|
});
|
|
15448
|
-
if (
|
|
15457
|
+
if (mungeOptions.injectDummyCandidates) {
|
|
15449
15458
|
parsedOffer.media
|
|
15450
15459
|
.filter((media) => media instanceof ApplicationMediaDescription)
|
|
15451
15460
|
.forEach((media) => {
|