@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/esm/index.js
CHANGED
|
@@ -7794,6 +7794,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7794
7794
|
var trace = function (name, payload, timestamp) {
|
|
7795
7795
|
logger({ timestamp: timestamp ? Math.round(timestamp) : Date.now(), name: name, payload: payload });
|
|
7796
7796
|
};
|
|
7797
|
+
trace('rtcConfiguration', makeEvent(JSON.stringify(pc.getConfiguration())));
|
|
7797
7798
|
var origPeerConnection = window.RTCPeerConnection;
|
|
7798
7799
|
pc.addEventListener('icecandidate', function (e) {
|
|
7799
7800
|
if (e.candidate) {
|
|
@@ -7827,7 +7828,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7827
7828
|
pc.addEventListener('datachannel', function (event) {
|
|
7828
7829
|
trace('ondatachannel', makeEvent("".concat(event.channel.id, ": ").concat(event.channel.label)));
|
|
7829
7830
|
});
|
|
7830
|
-
['
|
|
7831
|
+
['close'].forEach(function (method) {
|
|
7831
7832
|
var nativeMethod = origPeerConnection.prototype[method];
|
|
7832
7833
|
if (nativeMethod) {
|
|
7833
7834
|
origPeerConnection.prototype[method] = function () {
|
|
@@ -7836,6 +7837,26 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7836
7837
|
};
|
|
7837
7838
|
}
|
|
7838
7839
|
});
|
|
7840
|
+
['createDataChannel'].forEach(function (method) {
|
|
7841
|
+
var nativeMethod = origPeerConnection.prototype[method];
|
|
7842
|
+
if (nativeMethod) {
|
|
7843
|
+
origPeerConnection.prototype[method] = function () {
|
|
7844
|
+
trace("on".concat(method), makeEvent(method));
|
|
7845
|
+
var dataChannel = nativeMethod.apply(this, arguments);
|
|
7846
|
+
dataChannel.addEventListener('open', function () {
|
|
7847
|
+
trace("ondataChannelOpen", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label)));
|
|
7848
|
+
});
|
|
7849
|
+
dataChannel.addEventListener('close', function () {
|
|
7850
|
+
trace("ondataChannelClose", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label)));
|
|
7851
|
+
});
|
|
7852
|
+
dataChannel.addEventListener('error', function (event) {
|
|
7853
|
+
var error = event.error;
|
|
7854
|
+
trace("ondataChannelError", makeEvent("".concat(dataChannel.id, ":").concat(dataChannel.label, ": ").concat(error.errorDetail)));
|
|
7855
|
+
});
|
|
7856
|
+
return dataChannel;
|
|
7857
|
+
};
|
|
7858
|
+
}
|
|
7859
|
+
});
|
|
7839
7860
|
['addStream', 'removeStream'].forEach(function (method) {
|
|
7840
7861
|
var nativeMethod = origPeerConnection.prototype[method];
|
|
7841
7862
|
if (nativeMethod) {
|
|
@@ -7910,7 +7931,9 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
|
|
|
7910
7931
|
origPeerConnection.prototype[method] = function () {
|
|
7911
7932
|
var _this = this;
|
|
7912
7933
|
var args = arguments;
|
|
7913
|
-
trace("on".concat(method), makeEvent(method === 'addIceCandidate'
|
|
7934
|
+
trace("on".concat(method), makeEvent(method === 'addIceCandidate'
|
|
7935
|
+
? arguments[0]
|
|
7936
|
+
: (arguments[0] ? arguments[0].sdp : 'undefined')));
|
|
7914
7937
|
return nativeMethod.apply(this, [arguments[0]]).then(function () {
|
|
7915
7938
|
var _a;
|
|
7916
7939
|
trace("on".concat(method, "OnSuccess"), makeEvent('success'));
|
|
@@ -14755,6 +14778,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
14755
14778
|
disableContentSimulcast: true,
|
|
14756
14779
|
disableAudioTwcc: true,
|
|
14757
14780
|
doFullIce: BrowserInfo.isFirefox(),
|
|
14781
|
+
metricsCallback: () => { },
|
|
14758
14782
|
};
|
|
14759
14783
|
class MultistreamConnection extends EventEmitter$2 {
|
|
14760
14784
|
constructor(userOptions = {}) {
|
|
@@ -14763,13 +14787,13 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14763
14787
|
this.recvTransceivers = new Map();
|
|
14764
14788
|
this.jmpSessions = new Map();
|
|
14765
14789
|
this.pendingJmpTasks = [];
|
|
14766
|
-
this.metricsCallback = () => { };
|
|
14767
14790
|
this.overuseUpdateCallback = () => { };
|
|
14768
14791
|
this.midPredictor = new MidPredictor();
|
|
14769
14792
|
this.offerAnswerQueue = new AsyncQueue();
|
|
14770
14793
|
this.currentCreateOfferId = 0;
|
|
14771
14794
|
this.options = Object.assign(Object.assign({}, defaultMultistreamConnectionOptions), userOptions);
|
|
14772
14795
|
logger.info(`Creating multistream connection with options ${JSON.stringify(this.options)}`);
|
|
14796
|
+
this.metricsCallback = this.options.metricsCallback;
|
|
14773
14797
|
this.initializePeerConnection();
|
|
14774
14798
|
this.overuseStateManager = new OveruseStateManager((overuseState) => this.overuseUpdateCallback(overuseState));
|
|
14775
14799
|
this.overuseStateManager.start();
|
|
@@ -15590,9 +15614,6 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15590
15614
|
var _a;
|
|
15591
15615
|
return (_a = this.forceStatsReport) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
15592
15616
|
}
|
|
15593
|
-
setMetricsCallback(callback) {
|
|
15594
|
-
this.metricsCallback = callback;
|
|
15595
|
-
}
|
|
15596
15617
|
setOveruseUpdateCallback(callback) {
|
|
15597
15618
|
this.overuseUpdateCallback = callback;
|
|
15598
15619
|
}
|