@webex/web-client-media-engine 3.14.0 → 3.15.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 +37 -22
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +37 -22
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9737,11 +9737,11 @@ class EgressSdpMunger {
|
|
|
9737
9737
|
this.streamIds.forEach((streamId) => {
|
|
9738
9738
|
const rtpSsrc = streamId.ssrc;
|
|
9739
9739
|
mediaDescription.addLine(new SsrcLine(rtpSsrc, 'cname', `${rtpSsrc}-cname`));
|
|
9740
|
-
mediaDescription.addLine(new SsrcLine(rtpSsrc, 'msid', '-',
|
|
9740
|
+
mediaDescription.addLine(new SsrcLine(rtpSsrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
9741
9741
|
if (options.rtxEnabled) {
|
|
9742
9742
|
const rtxSsrc = streamId.rtxSsrc;
|
|
9743
9743
|
mediaDescription.addLine(new SsrcLine(rtxSsrc, 'cname', `${rtpSsrc}-cname`));
|
|
9744
|
-
mediaDescription.addLine(new SsrcLine(rtxSsrc, 'msid', '-',
|
|
9744
|
+
mediaDescription.addLine(new SsrcLine(rtxSsrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
9745
9745
|
mediaDescription.addLine(new SsrcGroupLine('FID', [rtpSsrc, rtxSsrc]));
|
|
9746
9746
|
}
|
|
9747
9747
|
});
|
|
@@ -10292,13 +10292,13 @@ class IngressSdpMunger {
|
|
|
10292
10292
|
mungeRemoteDescription(mediaDescription) {
|
|
10293
10293
|
if (!mediaDescription.ssrcs.length) {
|
|
10294
10294
|
mediaDescription.addLine(new SsrcLine(this.ssrc, 'cname', `${this.ssrc}-cname`));
|
|
10295
|
-
mediaDescription.addLine(new SsrcLine(this.ssrc, 'msid', '-',
|
|
10295
|
+
mediaDescription.addLine(new SsrcLine(this.ssrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
10296
10296
|
if (hasCodec('rtx', mediaDescription)) {
|
|
10297
10297
|
if (!this.rtxSsrc) {
|
|
10298
10298
|
this.rtxSsrc = generateSsrc();
|
|
10299
10299
|
}
|
|
10300
10300
|
mediaDescription.addLine(new SsrcLine(this.rtxSsrc, 'cname', `${this.ssrc}-cname`));
|
|
10301
|
-
mediaDescription.addLine(new SsrcLine(this.rtxSsrc, 'msid', '-',
|
|
10301
|
+
mediaDescription.addLine(new SsrcLine(this.rtxSsrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
10302
10302
|
mediaDescription.addLine(new SsrcGroupLine('FID', [this.ssrc, this.rtxSsrc]));
|
|
10303
10303
|
}
|
|
10304
10304
|
}
|
|
@@ -14316,10 +14316,6 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14316
14316
|
updateSendParameters(requestedIdEncodingParamsMap) {
|
|
14317
14317
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
14318
14318
|
return this.updateSendParametersQueue.push(() => __awaiter$1(this, void 0, void 0, function* () {
|
|
14319
|
-
const requested = requestedIdEncodingParamsMap.size > 0;
|
|
14320
|
-
if (this.requested !== requested) {
|
|
14321
|
-
yield this.replaceSenderSource(requested ? this.publishedStream : null);
|
|
14322
|
-
}
|
|
14323
14319
|
const sendParameters = this.sender.getParameters();
|
|
14324
14320
|
sendParameters.encodings.forEach((encoding, index) => {
|
|
14325
14321
|
var _a, _b;
|
|
@@ -14337,7 +14333,12 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14337
14333
|
}
|
|
14338
14334
|
});
|
|
14339
14335
|
yield this.sender.setParameters(sendParameters);
|
|
14336
|
+
const oldRequested = this.requested;
|
|
14337
|
+
const newRequested = requestedIdEncodingParamsMap.size > 0;
|
|
14340
14338
|
this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
|
|
14339
|
+
if (oldRequested !== newRequested) {
|
|
14340
|
+
yield this.replaceSenderSource(newRequested ? this.publishedStream : null);
|
|
14341
|
+
}
|
|
14341
14342
|
}));
|
|
14342
14343
|
});
|
|
14343
14344
|
}
|
|
@@ -14911,26 +14912,40 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14911
14912
|
return { id, state, csi: sendTransceiver.csi };
|
|
14912
14913
|
});
|
|
14913
14914
|
}
|
|
14915
|
+
createReceiveTransceiver(mediaType) {
|
|
14916
|
+
const rtcRtpTransceiver = this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
14917
|
+
direction: 'recvonly',
|
|
14918
|
+
});
|
|
14919
|
+
const transceiverMid = this.midPredictor.getNextMid(mediaType);
|
|
14920
|
+
const munger = new IngressSdpMunger();
|
|
14921
|
+
const recvOnlyTransceiver = new ReceiveOnlyTransceiver(rtcRtpTransceiver, transceiverMid, munger);
|
|
14922
|
+
recvOnlyTransceiver.twccDisabled =
|
|
14923
|
+
getMediaFamily(mediaType) === exports.MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
14924
|
+
this.recvTransceivers.set(mediaType, [
|
|
14925
|
+
...(this.recvTransceivers.get(mediaType) || []),
|
|
14926
|
+
recvOnlyTransceiver,
|
|
14927
|
+
]);
|
|
14928
|
+
return recvOnlyTransceiver;
|
|
14929
|
+
}
|
|
14914
14930
|
createReceiveSlot(mediaType) {
|
|
14915
14931
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
14916
|
-
return
|
|
14932
|
+
return (yield this.createReceiveSlots(mediaType, 1))[0];
|
|
14933
|
+
});
|
|
14934
|
+
}
|
|
14935
|
+
createReceiveSlots(mediaType, count = 1) {
|
|
14936
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
14937
|
+
return new Promise((createReceiveSlotsResolve) => {
|
|
14917
14938
|
this.offerAnswerQueue.push(() => __awaiter$1(this, void 0, void 0, function* () {
|
|
14918
|
-
const
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
const recvOnlyTransceiver = new ReceiveOnlyTransceiver(rtcRtpTransceiver, transceiverMid, munger);
|
|
14924
|
-
recvOnlyTransceiver.twccDisabled =
|
|
14925
|
-
getMediaFamily(mediaType) === exports.MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
14926
|
-
this.recvTransceivers.set(mediaType, [
|
|
14927
|
-
...(this.recvTransceivers.get(mediaType) || []),
|
|
14928
|
-
recvOnlyTransceiver,
|
|
14929
|
-
]);
|
|
14939
|
+
const createdReceiveOnlyTransceivers = [];
|
|
14940
|
+
for (let i = 0; i < count; i++) {
|
|
14941
|
+
const recvOnlyTransceiver = this.createReceiveTransceiver(mediaType);
|
|
14942
|
+
createdReceiveOnlyTransceivers.push(recvOnlyTransceiver);
|
|
14943
|
+
}
|
|
14930
14944
|
if (this.pc.getRemoteDescription()) {
|
|
14931
14945
|
yield this.doLocalOfferAnswer();
|
|
14932
14946
|
}
|
|
14933
|
-
|
|
14947
|
+
const receiveSlots = createdReceiveOnlyTransceivers.map((transceiver) => transceiver.receiveSlot);
|
|
14948
|
+
createReceiveSlotsResolve(receiveSlots);
|
|
14934
14949
|
}));
|
|
14935
14950
|
});
|
|
14936
14951
|
});
|