@webex/web-client-media-engine 3.23.4 → 3.24.1
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 +27 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +27 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -7798,6 +7798,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7798
7798
|
var trace = function (name, payload, timestamp) {
|
|
7799
7799
|
logger({ timestamp: timestamp ? Math.round(timestamp) : Date.now(), name: name, payload: payload });
|
|
7800
7800
|
};
|
|
7801
|
+
trace('rtcConfiguration', makeEvent(JSON.stringify(pc.getConfiguration())));
|
|
7801
7802
|
var origPeerConnection = window.RTCPeerConnection;
|
|
7802
7803
|
pc.addEventListener('icecandidate', function (e) {
|
|
7803
7804
|
if (e.candidate) {
|
|
@@ -7831,7 +7832,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7831
7832
|
pc.addEventListener('datachannel', function (event) {
|
|
7832
7833
|
trace('ondatachannel', makeEvent("".concat(event.channel.id, ": ").concat(event.channel.label)));
|
|
7833
7834
|
});
|
|
7834
|
-
['
|
|
7835
|
+
['close'].forEach(function (method) {
|
|
7835
7836
|
var nativeMethod = origPeerConnection.prototype[method];
|
|
7836
7837
|
if (nativeMethod) {
|
|
7837
7838
|
origPeerConnection.prototype[method] = function () {
|
|
@@ -7840,6 +7841,26 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7840
7841
|
};
|
|
7841
7842
|
}
|
|
7842
7843
|
});
|
|
7844
|
+
['createDataChannel'].forEach(function (method) {
|
|
7845
|
+
var nativeMethod = origPeerConnection.prototype[method];
|
|
7846
|
+
if (nativeMethod) {
|
|
7847
|
+
origPeerConnection.prototype[method] = function () {
|
|
7848
|
+
trace("on".concat(method), makeEvent(method));
|
|
7849
|
+
var dataChannel = nativeMethod.apply(this, arguments);
|
|
7850
|
+
dataChannel.addEventListener('open', function () {
|
|
7851
|
+
trace("ondataChannelOpen", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label)));
|
|
7852
|
+
});
|
|
7853
|
+
dataChannel.addEventListener('close', function () {
|
|
7854
|
+
trace("ondataChannelClose", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label)));
|
|
7855
|
+
});
|
|
7856
|
+
dataChannel.addEventListener('error', function (event) {
|
|
7857
|
+
var error = event.error;
|
|
7858
|
+
trace("ondataChannelError", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label, ": ").concat(error.errorDetail)));
|
|
7859
|
+
});
|
|
7860
|
+
return dataChannel;
|
|
7861
|
+
};
|
|
7862
|
+
}
|
|
7863
|
+
});
|
|
7843
7864
|
['addStream', 'removeStream'].forEach(function (method) {
|
|
7844
7865
|
var nativeMethod = origPeerConnection.prototype[method];
|
|
7845
7866
|
if (nativeMethod) {
|
|
@@ -7914,7 +7935,9 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7914
7935
|
origPeerConnection.prototype[method] = function () {
|
|
7915
7936
|
var _this = this;
|
|
7916
7937
|
var args = arguments;
|
|
7917
|
-
trace("on".concat(method), makeEvent(method === 'addIceCandidate'
|
|
7938
|
+
trace("on".concat(method), makeEvent(method === 'addIceCandidate'
|
|
7939
|
+
? arguments[0]
|
|
7940
|
+
: (arguments[0] ? arguments[0].sdp : 'undefined')));
|
|
7918
7941
|
return nativeMethod.apply(this, [arguments[0]]).then(function () {
|
|
7919
7942
|
var _a;
|
|
7920
7943
|
trace("on".concat(method, "OnSuccess"), makeEvent('success'));
|
|
@@ -14759,6 +14782,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
14759
14782
|
disableContentSimulcast: true,
|
|
14760
14783
|
disableAudioTwcc: true,
|
|
14761
14784
|
doFullIce: BrowserInfo.isFirefox(),
|
|
14785
|
+
metricsCallback: () => { },
|
|
14762
14786
|
};
|
|
14763
14787
|
class MultistreamConnection extends EventEmitter$2 {
|
|
14764
14788
|
constructor(userOptions = {}) {
|
|
@@ -14767,13 +14791,13 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14767
14791
|
this.recvTransceivers = new Map();
|
|
14768
14792
|
this.jmpSessions = new Map();
|
|
14769
14793
|
this.pendingJmpTasks = [];
|
|
14770
|
-
this.metricsCallback = () => { };
|
|
14771
14794
|
this.overuseUpdateCallback = () => { };
|
|
14772
14795
|
this.midPredictor = new MidPredictor();
|
|
14773
14796
|
this.offerAnswerQueue = new AsyncQueue();
|
|
14774
14797
|
this.currentCreateOfferId = 0;
|
|
14775
14798
|
this.options = Object.assign(Object.assign({}, defaultMultistreamConnectionOptions), userOptions);
|
|
14776
14799
|
logger.info(`Creating multistream connection with options ${JSON.stringify(this.options)}`);
|
|
14800
|
+
this.metricsCallback = this.options.metricsCallback;
|
|
14777
14801
|
this.initializePeerConnection();
|
|
14778
14802
|
this.overuseStateManager = new OveruseStateManager((overuseState) => this.overuseUpdateCallback(overuseState));
|
|
14779
14803
|
this.overuseStateManager.start();
|
|
@@ -15594,9 +15618,6 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15594
15618
|
var _a;
|
|
15595
15619
|
return (_a = this.forceStatsReport) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
15596
15620
|
}
|
|
15597
|
-
setMetricsCallback(callback) {
|
|
15598
|
-
this.metricsCallback = callback;
|
|
15599
|
-
}
|
|
15600
15621
|
setOveruseUpdateCallback(callback) {
|
|
15601
15622
|
this.overuseUpdateCallback = callback;
|
|
15602
15623
|
}
|