@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/esm/index.js
CHANGED
|
@@ -9733,11 +9733,11 @@ class EgressSdpMunger {
|
|
|
9733
9733
|
this.streamIds.forEach((streamId) => {
|
|
9734
9734
|
const rtpSsrc = streamId.ssrc;
|
|
9735
9735
|
mediaDescription.addLine(new SsrcLine(rtpSsrc, 'cname', `${rtpSsrc}-cname`));
|
|
9736
|
-
mediaDescription.addLine(new SsrcLine(rtpSsrc, 'msid', '-',
|
|
9736
|
+
mediaDescription.addLine(new SsrcLine(rtpSsrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
9737
9737
|
if (options.rtxEnabled) {
|
|
9738
9738
|
const rtxSsrc = streamId.rtxSsrc;
|
|
9739
9739
|
mediaDescription.addLine(new SsrcLine(rtxSsrc, 'cname', `${rtpSsrc}-cname`));
|
|
9740
|
-
mediaDescription.addLine(new SsrcLine(rtxSsrc, 'msid', '-',
|
|
9740
|
+
mediaDescription.addLine(new SsrcLine(rtxSsrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
9741
9741
|
mediaDescription.addLine(new SsrcGroupLine('FID', [rtpSsrc, rtxSsrc]));
|
|
9742
9742
|
}
|
|
9743
9743
|
});
|
|
@@ -10288,13 +10288,13 @@ class IngressSdpMunger {
|
|
|
10288
10288
|
mungeRemoteDescription(mediaDescription) {
|
|
10289
10289
|
if (!mediaDescription.ssrcs.length) {
|
|
10290
10290
|
mediaDescription.addLine(new SsrcLine(this.ssrc, 'cname', `${this.ssrc}-cname`));
|
|
10291
|
-
mediaDescription.addLine(new SsrcLine(this.ssrc, 'msid', '-',
|
|
10291
|
+
mediaDescription.addLine(new SsrcLine(this.ssrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
10292
10292
|
if (hasCodec('rtx', mediaDescription)) {
|
|
10293
10293
|
if (!this.rtxSsrc) {
|
|
10294
10294
|
this.rtxSsrc = generateSsrc();
|
|
10295
10295
|
}
|
|
10296
10296
|
mediaDescription.addLine(new SsrcLine(this.rtxSsrc, 'cname', `${this.ssrc}-cname`));
|
|
10297
|
-
mediaDescription.addLine(new SsrcLine(this.rtxSsrc, 'msid', '-',
|
|
10297
|
+
mediaDescription.addLine(new SsrcLine(this.rtxSsrc, 'msid', '-', `${mediaDescription.mid}`));
|
|
10298
10298
|
mediaDescription.addLine(new SsrcGroupLine('FID', [this.ssrc, this.rtxSsrc]));
|
|
10299
10299
|
}
|
|
10300
10300
|
}
|
|
@@ -14312,10 +14312,6 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14312
14312
|
updateSendParameters(requestedIdEncodingParamsMap) {
|
|
14313
14313
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
14314
14314
|
return this.updateSendParametersQueue.push(() => __awaiter$1(this, void 0, void 0, function* () {
|
|
14315
|
-
const requested = requestedIdEncodingParamsMap.size > 0;
|
|
14316
|
-
if (this.requested !== requested) {
|
|
14317
|
-
yield this.replaceSenderSource(requested ? this.publishedStream : null);
|
|
14318
|
-
}
|
|
14319
14315
|
const sendParameters = this.sender.getParameters();
|
|
14320
14316
|
sendParameters.encodings.forEach((encoding, index) => {
|
|
14321
14317
|
var _a, _b;
|
|
@@ -14333,7 +14329,12 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14333
14329
|
}
|
|
14334
14330
|
});
|
|
14335
14331
|
yield this.sender.setParameters(sendParameters);
|
|
14332
|
+
const oldRequested = this.requested;
|
|
14333
|
+
const newRequested = requestedIdEncodingParamsMap.size > 0;
|
|
14336
14334
|
this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
|
|
14335
|
+
if (oldRequested !== newRequested) {
|
|
14336
|
+
yield this.replaceSenderSource(newRequested ? this.publishedStream : null);
|
|
14337
|
+
}
|
|
14337
14338
|
}));
|
|
14338
14339
|
});
|
|
14339
14340
|
}
|
|
@@ -14907,26 +14908,40 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14907
14908
|
return { id, state, csi: sendTransceiver.csi };
|
|
14908
14909
|
});
|
|
14909
14910
|
}
|
|
14911
|
+
createReceiveTransceiver(mediaType) {
|
|
14912
|
+
const rtcRtpTransceiver = this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
14913
|
+
direction: 'recvonly',
|
|
14914
|
+
});
|
|
14915
|
+
const transceiverMid = this.midPredictor.getNextMid(mediaType);
|
|
14916
|
+
const munger = new IngressSdpMunger();
|
|
14917
|
+
const recvOnlyTransceiver = new ReceiveOnlyTransceiver(rtcRtpTransceiver, transceiverMid, munger);
|
|
14918
|
+
recvOnlyTransceiver.twccDisabled =
|
|
14919
|
+
getMediaFamily(mediaType) === MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
14920
|
+
this.recvTransceivers.set(mediaType, [
|
|
14921
|
+
...(this.recvTransceivers.get(mediaType) || []),
|
|
14922
|
+
recvOnlyTransceiver,
|
|
14923
|
+
]);
|
|
14924
|
+
return recvOnlyTransceiver;
|
|
14925
|
+
}
|
|
14910
14926
|
createReceiveSlot(mediaType) {
|
|
14911
14927
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
14912
|
-
return
|
|
14928
|
+
return (yield this.createReceiveSlots(mediaType, 1))[0];
|
|
14929
|
+
});
|
|
14930
|
+
}
|
|
14931
|
+
createReceiveSlots(mediaType, count = 1) {
|
|
14932
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
14933
|
+
return new Promise((createReceiveSlotsResolve) => {
|
|
14913
14934
|
this.offerAnswerQueue.push(() => __awaiter$1(this, void 0, void 0, function* () {
|
|
14914
|
-
const
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
const recvOnlyTransceiver = new ReceiveOnlyTransceiver(rtcRtpTransceiver, transceiverMid, munger);
|
|
14920
|
-
recvOnlyTransceiver.twccDisabled =
|
|
14921
|
-
getMediaFamily(mediaType) === MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
14922
|
-
this.recvTransceivers.set(mediaType, [
|
|
14923
|
-
...(this.recvTransceivers.get(mediaType) || []),
|
|
14924
|
-
recvOnlyTransceiver,
|
|
14925
|
-
]);
|
|
14935
|
+
const createdReceiveOnlyTransceivers = [];
|
|
14936
|
+
for (let i = 0; i < count; i++) {
|
|
14937
|
+
const recvOnlyTransceiver = this.createReceiveTransceiver(mediaType);
|
|
14938
|
+
createdReceiveOnlyTransceivers.push(recvOnlyTransceiver);
|
|
14939
|
+
}
|
|
14926
14940
|
if (this.pc.getRemoteDescription()) {
|
|
14927
14941
|
yield this.doLocalOfferAnswer();
|
|
14928
14942
|
}
|
|
14929
|
-
|
|
14943
|
+
const receiveSlots = createdReceiveOnlyTransceivers.map((transceiver) => transceiver.receiveSlot);
|
|
14944
|
+
createReceiveSlotsResolve(receiveSlots);
|
|
14930
14945
|
}));
|
|
14931
14946
|
});
|
|
14932
14947
|
});
|