@webex/web-client-media-engine 3.0.1 → 3.1.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 +15 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +5 -2
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -9121,6 +9121,12 @@ function filterCodecs(parsedSdp, allowedCodecs) {
|
|
|
9121
9121
|
.filter((codecName) => !allowedLowerCase.includes(codecName.toLowerCase()))
|
|
9122
9122
|
.forEach((c) => removeCodec(parsedSdp, c));
|
|
9123
9123
|
}
|
|
9124
|
+
function filterCandidates(parsedSdp) {
|
|
9125
|
+
const supportedTransportTypes = ['udp', 'tcp'];
|
|
9126
|
+
parsedSdp.media.forEach((mline) => {
|
|
9127
|
+
mline.iceInfo.candidates = mline.iceInfo.candidates.filter((candidate) => supportedTransportTypes.includes(candidate.transport.toLowerCase()));
|
|
9128
|
+
});
|
|
9129
|
+
}
|
|
9124
9130
|
function setMaxBandwidth(parsedSdp, maxBandwidth) {
|
|
9125
9131
|
parsedSdp.avMedia.forEach((mline) => {
|
|
9126
9132
|
mline.bandwidth = new BandwidthLine('TIAS', maxBandwidth);
|
|
@@ -9844,6 +9850,7 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9844
9850
|
this.rtxEnabled = false;
|
|
9845
9851
|
this.streamMuteStateChange = new TypedEvent();
|
|
9846
9852
|
this.streamPublishStateChange = new TypedEvent();
|
|
9853
|
+
this.negotiationNeeded = new TypedEvent();
|
|
9847
9854
|
this.requested = false;
|
|
9848
9855
|
this.requestedIdEncodingParamsMap = new Map();
|
|
9849
9856
|
this.csi = csi;
|
|
@@ -9927,7 +9934,9 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9927
9934
|
setActive(enabled) {
|
|
9928
9935
|
this.direction = enabled ? 'sendrecv' : 'inactive';
|
|
9929
9936
|
this._rtcRtpTransceiver.direction = this.direction;
|
|
9930
|
-
|
|
9937
|
+
if (this._rtcRtpTransceiver.direction !== this._rtcRtpTransceiver.currentDirection) {
|
|
9938
|
+
this.negotiationNeeded.emit();
|
|
9939
|
+
}
|
|
9931
9940
|
}
|
|
9932
9941
|
getStats() {
|
|
9933
9942
|
return this.sender.getStats();
|
|
@@ -13793,6 +13802,7 @@ var MultistreamConnectionEventNames;
|
|
|
13793
13802
|
MultistreamConnectionEventNames["AudioSourceCountUpdate"] = "audio-source-count-update";
|
|
13794
13803
|
MultistreamConnectionEventNames["ActiveSpeakerNotification"] = "active-speaker-notification";
|
|
13795
13804
|
MultistreamConnectionEventNames["ConnectionStateUpdate"] = "connection-state-update";
|
|
13805
|
+
MultistreamConnectionEventNames["NegotiationNeeded"] = "negotiation-needed";
|
|
13796
13806
|
})(MultistreamConnectionEventNames || (MultistreamConnectionEventNames = {}));
|
|
13797
13807
|
const defaultMultistreamConnectionOptions = {
|
|
13798
13808
|
disableSimulcast: getBrowserDetails().name === 'Firefox',
|
|
@@ -13885,6 +13895,9 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
13885
13895
|
this.sendSourceAdvertisement(mediaType);
|
|
13886
13896
|
this.sendMediaRequestStatus(mediaType);
|
|
13887
13897
|
});
|
|
13898
|
+
transceiver.negotiationNeeded.on(() => {
|
|
13899
|
+
this.emit(MultistreamConnectionEventNames.NegotiationNeeded);
|
|
13900
|
+
});
|
|
13888
13901
|
this.sendTransceivers.set(mediaType, transceiver);
|
|
13889
13902
|
this.createJmpSession(mediaType);
|
|
13890
13903
|
}
|
|
@@ -14284,6 +14297,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14284
14297
|
const parsedOffer = parse((_a = this.pc.getLocalDescription()) === null || _a === void 0 ? void 0 : _a.sdp);
|
|
14285
14298
|
const recvTransceiversByMid = new Map([...this.recvTransceivers.values()].flat().map((t) => [t.mid, t]));
|
|
14286
14299
|
matchMlinesInAnswer(parsedOffer, parsedAnswer, recvTransceiversByMid);
|
|
14300
|
+
filterCandidates(parsedAnswer);
|
|
14287
14301
|
if (getBrowserDetails().name === 'Firefox') {
|
|
14288
14302
|
setupBundle(parsedAnswer, this.options.bundlePolicy, this.midPredictor.getMidMap());
|
|
14289
14303
|
if (this.options.bundlePolicy === 'max-bundle') {
|