@webex/web-client-media-engine 3.0.2 → 3.2.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 +30 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +30 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +13 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9848,12 +9848,18 @@ class TypedEvent {
|
|
|
9848
9848
|
}
|
|
9849
9849
|
}
|
|
9850
9850
|
|
|
9851
|
+
var OfferAnswerType;
|
|
9852
|
+
(function (OfferAnswerType) {
|
|
9853
|
+
OfferAnswerType[OfferAnswerType["LocalOnly"] = 0] = "LocalOnly";
|
|
9854
|
+
OfferAnswerType[OfferAnswerType["Remote"] = 1] = "Remote";
|
|
9855
|
+
})(OfferAnswerType || (OfferAnswerType = {}));
|
|
9851
9856
|
class SendOnlyTransceiver extends Transceiver {
|
|
9852
9857
|
constructor(rtcRtpTransceiver, mid, csi, signaler, mediaType) {
|
|
9853
9858
|
super(rtcRtpTransceiver, mid);
|
|
9854
9859
|
this.rtxEnabled = false;
|
|
9855
9860
|
this.streamMuteStateChange = new TypedEvent();
|
|
9856
9861
|
this.streamPublishStateChange = new TypedEvent();
|
|
9862
|
+
this.negotiationNeeded = new TypedEvent();
|
|
9857
9863
|
this.requested = false;
|
|
9858
9864
|
this.requestedIdEncodingParamsMap = new Map();
|
|
9859
9865
|
this.csi = csi;
|
|
@@ -9937,7 +9943,9 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9937
9943
|
setActive(enabled) {
|
|
9938
9944
|
this.direction = enabled ? 'sendrecv' : 'inactive';
|
|
9939
9945
|
this._rtcRtpTransceiver.direction = this.direction;
|
|
9940
|
-
|
|
9946
|
+
if (this._rtcRtpTransceiver.direction !== this._rtcRtpTransceiver.currentDirection) {
|
|
9947
|
+
this.negotiationNeeded.emit(OfferAnswerType.Remote);
|
|
9948
|
+
}
|
|
9941
9949
|
}
|
|
9942
9950
|
getStats() {
|
|
9943
9951
|
return this.sender.getStats();
|
|
@@ -9992,9 +10000,11 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9992
10000
|
}
|
|
9993
10001
|
setCodecParameters(parameters) {
|
|
9994
10002
|
this.streamSignaler.setCodecParameters(parameters);
|
|
10003
|
+
this.negotiationNeeded.emit(OfferAnswerType.LocalOnly);
|
|
9995
10004
|
}
|
|
9996
10005
|
deleteCodecParameters(parameters) {
|
|
9997
10006
|
this.streamSignaler.deleteCodecParameters(parameters);
|
|
10007
|
+
this.negotiationNeeded.emit(OfferAnswerType.LocalOnly);
|
|
9998
10008
|
}
|
|
9999
10009
|
}
|
|
10000
10010
|
|
|
@@ -10021,6 +10031,16 @@ class SendSlot {
|
|
|
10021
10031
|
set active(active) {
|
|
10022
10032
|
this.sendTransceiver.setActive(active);
|
|
10023
10033
|
}
|
|
10034
|
+
setCodecParameters(parameters) {
|
|
10035
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10036
|
+
this.sendTransceiver.setCodecParameters(parameters);
|
|
10037
|
+
});
|
|
10038
|
+
}
|
|
10039
|
+
deleteCodecParameters(parameters) {
|
|
10040
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10041
|
+
this.sendTransceiver.deleteCodecParameters(parameters);
|
|
10042
|
+
});
|
|
10043
|
+
}
|
|
10024
10044
|
}
|
|
10025
10045
|
|
|
10026
10046
|
function generateSsrc() {
|
|
@@ -13803,6 +13823,7 @@ exports.MultistreamConnectionEventNames = void 0;
|
|
|
13803
13823
|
MultistreamConnectionEventNames["AudioSourceCountUpdate"] = "audio-source-count-update";
|
|
13804
13824
|
MultistreamConnectionEventNames["ActiveSpeakerNotification"] = "active-speaker-notification";
|
|
13805
13825
|
MultistreamConnectionEventNames["ConnectionStateUpdate"] = "connection-state-update";
|
|
13826
|
+
MultistreamConnectionEventNames["NegotiationNeeded"] = "negotiation-needed";
|
|
13806
13827
|
})(exports.MultistreamConnectionEventNames || (exports.MultistreamConnectionEventNames = {}));
|
|
13807
13828
|
const defaultMultistreamConnectionOptions = {
|
|
13808
13829
|
disableSimulcast: getBrowserDetails().name === 'Firefox',
|
|
@@ -13895,6 +13916,14 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
13895
13916
|
this.sendSourceAdvertisement(mediaType);
|
|
13896
13917
|
this.sendMediaRequestStatus(mediaType);
|
|
13897
13918
|
});
|
|
13919
|
+
transceiver.negotiationNeeded.on((offerAnswerType) => {
|
|
13920
|
+
if (offerAnswerType === OfferAnswerType.Remote) {
|
|
13921
|
+
this.emit(exports.MultistreamConnectionEventNames.NegotiationNeeded);
|
|
13922
|
+
}
|
|
13923
|
+
else if (this.pc.getRemoteDescription()) {
|
|
13924
|
+
this.queueLocalOfferAnswer();
|
|
13925
|
+
}
|
|
13926
|
+
});
|
|
13898
13927
|
this.sendTransceivers.set(mediaType, transceiver);
|
|
13899
13928
|
this.createJmpSession(mediaType);
|
|
13900
13929
|
}
|
|
@@ -14330,24 +14359,6 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14330
14359
|
}
|
|
14331
14360
|
return transceiver;
|
|
14332
14361
|
}
|
|
14333
|
-
setCodecParameters(mediaType, parameters) {
|
|
14334
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
14335
|
-
const transceiver = this.sendTransceivers.get(mediaType);
|
|
14336
|
-
transceiver === null || transceiver === void 0 ? void 0 : transceiver.setCodecParameters(parameters);
|
|
14337
|
-
if (this.pc.getRemoteDescription()) {
|
|
14338
|
-
yield this.queueLocalOfferAnswer();
|
|
14339
|
-
}
|
|
14340
|
-
});
|
|
14341
|
-
}
|
|
14342
|
-
deleteCodecParameters(mediaType, parameters) {
|
|
14343
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
14344
|
-
const transceiver = this.sendTransceivers.get(mediaType);
|
|
14345
|
-
transceiver === null || transceiver === void 0 ? void 0 : transceiver.deleteCodecParameters(parameters);
|
|
14346
|
-
if (this.pc.getRemoteDescription()) {
|
|
14347
|
-
yield this.queueLocalOfferAnswer();
|
|
14348
|
-
}
|
|
14349
|
-
});
|
|
14350
|
-
}
|
|
14351
14362
|
requestMedia(mediaType, streamRequests) {
|
|
14352
14363
|
var _a;
|
|
14353
14364
|
const task = () => {
|