@webex/web-client-media-engine 3.20.2 → 3.20.4

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/esm/index.js CHANGED
@@ -7915,6 +7915,7 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
7915
7915
  var args = arguments;
7916
7916
  trace("on".concat(method), makeEvent(method === 'addIceCandidate' ? arguments[0] : arguments[0].sdp));
7917
7917
  return nativeMethod.apply(this, [arguments[0]]).then(function () {
7918
+ var _a;
7918
7919
  trace("on".concat(method, "OnSuccess"), makeEvent('success'));
7919
7920
  if (method.endsWith('Description')) {
7920
7921
  if (!_this.transportEventsPreviouslyAdded) {
@@ -7956,10 +7957,13 @@ var rtcStats = function (pc, logger, intervalTime, statsPreProcessor) {
7956
7957
  }
7957
7958
  }
7958
7959
  if (!_this.sctpEventsPreviouslyAdded) {
7959
- _this.sctp.addEventListener('statechange', function () {
7960
- trace('onsctpStateChange', makeEvent(_this.sctp.state));
7961
- });
7962
- _this.sctpEventsPreviouslyAdded = true;
7960
+ // Some Firefox versions prior to 113 have sctp defined but not the events, so check both here.
7961
+ if ((_a = _this.sctp) === null || _a === void 0 ? void 0 : _a.addEventListener) {
7962
+ _this.sctp.addEventListener('statechange', function () {
7963
+ trace('onsctpStateChange', makeEvent(_this.sctp.state));
7964
+ });
7965
+ _this.sctpEventsPreviouslyAdded = true;
7966
+ }
7963
7967
  }
7964
7968
  }
7965
7969
  if (args.length >= 2 && typeof args[1] === 'function') {