@crh-fe/oava-customer-sdk 1.0.62 → 1.0.63

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.
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  /*
3
- * Version: 1.0.62
4
- * Build Time: 2026/12/03 08:17:52
3
+ * Version: 1.0.63
4
+ * Build Time: 2026/12/04 13:22:04
5
5
  */
6
6
  var commonjsGlobal = 'undefined' != typeof globalThis ? globalThis : 'undefined' != typeof window ? window : 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : {};
7
7
 
@@ -9014,12 +9014,12 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9014
9014
  }
9015
9015
  };
9016
9016
  }
9017
- var y = Object.create(null);
9018
- y.open = '0', y.close = '1', y.ping = '2', y.pong = '3', y.message = '4', y.upgrade = '5',
9019
- y.noop = '6';
9020
9017
  var b = Object.create(null);
9021
- Object.keys(y).forEach((function(e) {
9022
- b[y[e]] = e;
9018
+ b.open = '0', b.close = '1', b.ping = '2', b.pong = '3', b.message = '4', b.upgrade = '5',
9019
+ b.noop = '6';
9020
+ var y = Object.create(null);
9021
+ Object.keys(b).forEach((function(e) {
9022
+ y[b[e]] = e;
9023
9023
  }));
9024
9024
  for (var g = {
9025
9025
  type: 'error',
@@ -9027,7 +9027,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9027
9027
  }, E = 'function' == typeof Blob || 'undefined' != typeof Blob && '[object BlobConstructor]' === Object.prototype.toString.call(Blob), w = 'function' == typeof ArrayBuffer, _ = function(e, t, r) {
9028
9028
  var n, o = e.type, i = e.data;
9029
9029
  return E && i instanceof Blob ? t ? r(i) : R(i, r) : w && (i instanceof ArrayBuffer || (n = i,
9030
- 'function' == typeof ArrayBuffer.isView ? ArrayBuffer.isView(n) : n && n.buffer instanceof ArrayBuffer)) ? t ? r(i) : R(new Blob([ i ]), r) : r(y[o] + (i || ''));
9030
+ 'function' == typeof ArrayBuffer.isView ? ArrayBuffer.isView(n) : n && n.buffer instanceof ArrayBuffer)) ? t ? r(i) : R(new Blob([ i ]), r) : r(b[o] + (i || ''));
9031
9031
  }, R = function(e, t) {
9032
9032
  var r = new FileReader;
9033
9033
  return r.onload = function() {
@@ -9048,11 +9048,11 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9048
9048
  return 'b' === r ? {
9049
9049
  type: 'message',
9050
9050
  data: T(e.substring(1), t)
9051
- } : b[r] ? e.length > 1 ? {
9052
- type: b[r],
9051
+ } : y[r] ? e.length > 1 ? {
9052
+ type: y[r],
9053
9053
  data: e.substring(1)
9054
9054
  } : {
9055
- type: b[r]
9055
+ type: y[r]
9056
9056
  } : g;
9057
9057
  }, T = function(e, t) {
9058
9058
  if (A) {
@@ -9882,7 +9882,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9882
9882
  }
9883
9883
  return !1;
9884
9884
  }
9885
- function ye(t, r) {
9885
+ function be(t, r) {
9886
9886
  if (!t) {
9887
9887
  return t;
9888
9888
  }
@@ -9895,20 +9895,20 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9895
9895
  }
9896
9896
  if (Array.isArray(t)) {
9897
9897
  for (var o = new Array(t.length), i = 0; i < t.length; i++) {
9898
- o[i] = ye(t[i], r);
9898
+ o[i] = be(t[i], r);
9899
9899
  }
9900
9900
  return o;
9901
9901
  }
9902
9902
  if ('object' === e(t) && !(t instanceof Date)) {
9903
9903
  var a = {};
9904
9904
  for (var s in t) {
9905
- Object.prototype.hasOwnProperty.call(t, s) && (a[s] = ye(t[s], r));
9905
+ Object.prototype.hasOwnProperty.call(t, s) && (a[s] = be(t[s], r));
9906
9906
  }
9907
9907
  return a;
9908
9908
  }
9909
9909
  return t;
9910
9910
  }
9911
- function be(t, r) {
9911
+ function ye(t, r) {
9912
9912
  if (!t) {
9913
9913
  return t;
9914
9914
  }
@@ -9917,11 +9917,11 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9917
9917
  }
9918
9918
  if (Array.isArray(t)) {
9919
9919
  for (var n = 0; n < t.length; n++) {
9920
- t[n] = be(t[n], r);
9920
+ t[n] = ye(t[n], r);
9921
9921
  }
9922
9922
  } else if ('object' === e(t)) {
9923
9923
  for (var o in t) {
9924
- Object.prototype.hasOwnProperty.call(t, o) && (t[o] = be(t[o], r));
9924
+ Object.prototype.hasOwnProperty.call(t, o) && (t[o] = ye(t[o], r));
9925
9925
  }
9926
9926
  }
9927
9927
  return t;
@@ -9954,7 +9954,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
9954
9954
  value: function(e) {
9955
9955
  var t = function(e) {
9956
9956
  var t = [], r = e.data, n = e;
9957
- return n.data = ye(r, t), n.attachments = t.length, {
9957
+ return n.data = be(r, t), n.attachments = t.length, {
9958
9958
  packet: n,
9959
9959
  buffers: t
9960
9960
  };
@@ -10078,7 +10078,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
10078
10078
  value: function(e) {
10079
10079
  if (this.buffers.push(e), this.buffers.length === this.reconPack.attachments) {
10080
10080
  var t = function(e, t) {
10081
- return e.data = be(e.data, t), e.attachments = void 0, e;
10081
+ return e.data = ye(e.data, t), e.attachments = void 0, e;
10082
10082
  }(this.reconPack, this.buffers);
10083
10083
  return this.finishedReconstruction(), t;
10084
10084
  }
@@ -11554,14 +11554,14 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
11554
11554
  r = 0;
11555
11555
  }
11556
11556
  if ('string' == typeof t && (t = u.from(t, n)), u.isBuffer(t)) {
11557
- return 0 === t.length ? -1 : y(e, t, r, n, o);
11557
+ return 0 === t.length ? -1 : b(e, t, r, n, o);
11558
11558
  }
11559
11559
  if ('number' == typeof t) {
11560
- return t &= 255, u.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : y(e, [ t ], r, n, o);
11560
+ return t &= 255, u.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : b(e, [ t ], r, n, o);
11561
11561
  }
11562
11562
  throw new TypeError('val must be string, number or Buffer');
11563
11563
  }
11564
- function y(e, t, r, n, o) {
11564
+ function b(e, t, r, n, o) {
11565
11565
  var i, a = 1, s = e.length, u = t.length;
11566
11566
  if (void 0 !== n && ('ucs2' === (n = String(n).toLowerCase()) || 'ucs-2' === n || 'utf16le' === n || 'utf-16le' === n)) {
11567
11567
  if (e.length < 2 || t.length < 2) {
@@ -11598,7 +11598,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
11598
11598
  }
11599
11599
  return -1;
11600
11600
  }
11601
- function b(e, t, r, n) {
11601
+ function y(e, t, r, n) {
11602
11602
  r = Number(r) || 0;
11603
11603
  var o = e.length - r;
11604
11604
  n ? (n = Number(n)) > o && (n = o) : n = o;
@@ -11900,7 +11900,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
11900
11900
  for (var i = !1; ;) {
11901
11901
  switch (n) {
11902
11902
  case 'hex':
11903
- return b(this, e, t, r);
11903
+ return y(this, e, t, r);
11904
11904
 
11905
11905
  case 'utf8':
11906
11906
  case 'utf-8':
@@ -13248,7 +13248,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13248
13248
  }
13249
13249
  throw Error('Invalid continuation byte');
13250
13250
  }
13251
- function y(e) {
13251
+ function b(e) {
13252
13252
  var t, r;
13253
13253
  if (c > u) {
13254
13254
  throw Error('Invalid byte index');
@@ -13276,7 +13276,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13276
13276
  }
13277
13277
  throw Error('Invalid UTF-8 detected');
13278
13278
  }
13279
- var b = {
13279
+ var y = {
13280
13280
  version: '2.1.2',
13281
13281
  encode: function(e, t) {
13282
13282
  for (var r = !1 !== (t = t || {}).strict, n = d(e), o = n.length, i = -1, a = ''; ++i < o; ) {
@@ -13287,7 +13287,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13287
13287
  decode: function(e, t) {
13288
13288
  var r = !1 !== (t = t || {}).strict;
13289
13289
  s = d(e), u = s.length, c = 0;
13290
- for (var n, o = []; !1 !== (n = y(r)); ) {
13290
+ for (var n, o = []; !1 !== (n = b(r)); ) {
13291
13291
  o.push(n);
13292
13292
  }
13293
13293
  return function(e) {
@@ -13300,7 +13300,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13300
13300
  }
13301
13301
  };
13302
13302
  void 0 === (o = function() {
13303
- return b;
13303
+ return y;
13304
13304
  }.call(t, r, t, e)) || (e.exports = o);
13305
13305
  }();
13306
13306
  }).call(this, r(16)(e), r(0));
@@ -13560,14 +13560,14 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13560
13560
  r = 0;
13561
13561
  }
13562
13562
  if ('string' == typeof t && (t = u.from(t, n)), u.isBuffer(t)) {
13563
- return 0 === t.length ? -1 : y(e, t, r, n, o);
13563
+ return 0 === t.length ? -1 : b(e, t, r, n, o);
13564
13564
  }
13565
13565
  if ('number' == typeof t) {
13566
- return t &= 255, u.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : y(e, [ t ], r, n, o);
13566
+ return t &= 255, u.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : b(e, [ t ], r, n, o);
13567
13567
  }
13568
13568
  throw new TypeError('val must be string, number or Buffer');
13569
13569
  }
13570
- function y(e, t, r, n, o) {
13570
+ function b(e, t, r, n, o) {
13571
13571
  var i, a = 1, s = e.length, u = t.length;
13572
13572
  if (void 0 !== n && ('ucs2' === (n = String(n).toLowerCase()) || 'ucs-2' === n || 'utf16le' === n || 'utf-16le' === n)) {
13573
13573
  if (e.length < 2 || t.length < 2) {
@@ -13604,7 +13604,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13604
13604
  }
13605
13605
  return -1;
13606
13606
  }
13607
- function b(e, t, r, n) {
13607
+ function y(e, t, r, n) {
13608
13608
  r = Number(r) || 0;
13609
13609
  var o = e.length - r;
13610
13610
  n ? (n = Number(n)) > o && (n = o) : n = o;
@@ -13906,7 +13906,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
13906
13906
  for (var i = !1; ;) {
13907
13907
  switch (n) {
13908
13908
  case 'hex':
13909
- return b(this, e, t, r);
13909
+ return y(this, e, t, r);
13910
13910
 
13911
13911
  case 'utf8':
13912
13912
  case 'utf-8':
@@ -15053,7 +15053,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
15053
15053
  reason: new d.IRtcError(f.ErrorCode.LOCAL_UNKNOWN, 'Capture capability detection timed out.')
15054
15054
  };
15055
15055
  }
15056
- var y = r.FeatureSupportDetector = {
15056
+ var b = r.FeatureSupportDetector = {
15057
15057
  supportWebrtc: function() {
15058
15058
  return Promise.resolve(!!window.RTCPeerConnection);
15059
15059
  },
@@ -15068,7 +15068,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
15068
15068
  },
15069
15069
  supportAudioCodec: function(e) {
15070
15070
  return new Promise((function(t) {
15071
- y.supportAudioCodecs().then((function(r) {
15071
+ b.supportAudioCodecs().then((function(r) {
15072
15072
  t(r.some((function(t) {
15073
15073
  return t.toLowerCase() === e.toLowerCase();
15074
15074
  })));
@@ -15077,7 +15077,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
15077
15077
  },
15078
15078
  supportVideoCodec: function(e) {
15079
15079
  return new Promise((function(t) {
15080
- y.supportVideoCodecs().then((function(r) {
15080
+ b.supportVideoCodecs().then((function(r) {
15081
15081
  t(r.some((function(t) {
15082
15082
  return t.toLowerCase() === e.toLowerCase();
15083
15083
  })));
@@ -15206,7 +15206,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
15206
15206
  for (;;) {
15207
15207
  switch (e.prev = e.next) {
15208
15208
  case 0:
15209
- return e.next = 1, Promise.all([ y.supportAudioCodecs(), y.supportVideoCodecs(), y.supportScreenCapture(), y.supportCropScreen(), v(p.MediaStreamFactory.captureCapabilityDetection(!0, !0), 1e4, m(), 'media capture') ]);
15209
+ return e.next = 1, Promise.all([ b.supportAudioCodecs(), b.supportVideoCodecs(), b.supportScreenCapture(), b.supportCropScreen(), v(p.MediaStreamFactory.captureCapabilityDetection(!0, !0), 1e4, m(), 'media capture') ]);
15210
15210
 
15211
15211
  case 1:
15212
15212
  return t = e.sent, r = (0, a.default)(t, 5), n = r[0], o = r[1], s = r[2], u = r[3],
@@ -15746,12 +15746,12 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
15746
15746
  Object.defineProperty(r, '__esModule', {
15747
15747
  value: !0
15748
15748
  }), r.VideoTrackConstraints = r.StreamConstraints = r.MediaStreamFactory = r.AudioTrackConstraints = void 0;
15749
- var i = n(e('@babel/runtime/regenerator')), a = n(e('@babel/runtime/helpers/slicedToArray')), s = n(e('@babel/runtime/helpers/asyncToGenerator')), u = n(e('@babel/runtime/helpers/defineProperty')), c = n(e('@babel/runtime/helpers/createClass')), l = n(e('@babel/runtime/helpers/classCallCheck')), f = n(e('@babel/runtime/helpers/typeof')), d = y(e('./utils.js')), p = n(e('./logger.js')), h = y(e('./mediaformat.js')), v = e('./errorCode.js'), m = e('./IRtcError.js');
15750
- function y(e, t) {
15749
+ var i = n(e('@babel/runtime/regenerator')), a = n(e('@babel/runtime/helpers/slicedToArray')), s = n(e('@babel/runtime/helpers/asyncToGenerator')), u = n(e('@babel/runtime/helpers/defineProperty')), c = n(e('@babel/runtime/helpers/createClass')), l = n(e('@babel/runtime/helpers/classCallCheck')), f = n(e('@babel/runtime/helpers/typeof')), d = b(e('./utils.js')), p = n(e('./logger.js')), h = b(e('./mediaformat.js')), v = e('./errorCode.js'), m = e('./IRtcError.js');
15750
+ function b(e, t) {
15751
15751
  if ('function' == typeof WeakMap) {
15752
15752
  var r = new WeakMap, n = new WeakMap;
15753
15753
  }
15754
- return (y = function(e, t) {
15754
+ return (b = function(e, t) {
15755
15755
  if (!t && e && e.__esModule) {
15756
15756
  return e;
15757
15757
  }
@@ -15774,7 +15774,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
15774
15774
  return s;
15775
15775
  })(e, t);
15776
15776
  }
15777
- function b(e, t) {
15777
+ function y(e, t) {
15778
15778
  var r = 'undefined' != typeof Symbol && e[Symbol.iterator] || e['@@iterator'];
15779
15779
  if (!r) {
15780
15780
  if (Array.isArray(e) || (r = function(e, t) {
@@ -16103,7 +16103,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16103
16103
  return e.prev = 2, e.next = 3, navigator.mediaDevices.enumerateDevices();
16104
16104
 
16105
16105
  case 3:
16106
- n = e.sent, o = !1, a = !1, s = b(n);
16106
+ n = e.sent, o = !1, a = !1, s = y(n);
16107
16107
  try {
16108
16108
  for (s.s(); !(u = s.n()).done; ) {
16109
16109
  'videoinput' === (c = u.value).kind && (o = !0), 'audioinput' === c.kind && (a = !0);
@@ -16184,7 +16184,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16184
16184
  key: 'createMediaStream',
16185
16185
  value: function() {
16186
16186
  var t = (0, s.default)(i.default.mark((function t(r) {
16187
- var n, o, s, u, c, l, y, b, g, E, _, R, S, C, k, A, I, T;
16187
+ var n, o, s, u, c, l, b, y, g, E, _, R, S, C, k, A, I, T;
16188
16188
  return i.default.wrap((function(t) {
16189
16189
  for (;;) {
16190
16190
  switch (t.prev = t.next) {
@@ -16418,11 +16418,11 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16418
16418
  break;
16419
16419
  }
16420
16420
  return u = new MediaStream, (c = window.AudioContext || window.webkitAudioContext || !1) && (l = new c,
16421
- y = l.createMediaStreamDestination(), b = l.createBufferSource(), g = y.stream,
16421
+ b = l.createMediaStreamDestination(), y = l.createBufferSource(), g = b.stream,
16422
16422
  (E = new FileReader).onload = function(e) {
16423
16423
  l.decodeAudioData(e.target.result, (function(e) {
16424
16424
  var t = e;
16425
- b.buffer = t, b.connect(y), b.loop = r.audio.loop, b.start(0);
16425
+ y.buffer = t, y.connect(b), y.loop = r.audio.loop, y.start(0);
16426
16426
  }));
16427
16427
  }, E.readAsArrayBuffer(r.audio.file), u.addTrack(g.getAudioTracks()[0])), t.abrupt('return', Promise.resolve(u));
16428
16428
 
@@ -16519,12 +16519,12 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16519
16519
  key: 'start',
16520
16520
  value: function(t, r) {
16521
16521
  var n = this;
16522
- return v(e, this, b)._[t] ? Promise.reject(new d.IRtcError(f.ErrorCode.INVALID_STATE, ''.concat(t, ' plugin is already started'))) : new Promise((function(o, i) {
16522
+ return v(e, this, y)._[t] ? Promise.reject(new d.IRtcError(f.ErrorCode.INVALID_STATE, ''.concat(t, ' plugin is already started'))) : new Promise((function(o, i) {
16523
16523
  try {
16524
- var a = v(e, n, y).call(n), s = new URL(''.concat(t, '-sdk.min.js'), a).href, u = document.createElement('script');
16524
+ var a = v(e, n, b).call(n), s = new URL(''.concat(t, '-sdk.min.js'), a).href, u = document.createElement('script');
16525
16525
  u.src = s, u.async = !0, u.type = 'text/javascript', u.onload = function() {
16526
16526
  var i = t.charAt(0).toUpperCase() + t.slice(1), a = window[i] || null;
16527
- v(e, n, b)._[t] = {
16527
+ v(e, n, y)._[t] = {
16528
16528
  options: r,
16529
16529
  script: u,
16530
16530
  instance: a
@@ -16540,7 +16540,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16540
16540
  }, {
16541
16541
  key: 'get',
16542
16542
  value: function(t) {
16543
- var r = v(e, this, b)._[t];
16543
+ var r = v(e, this, y)._[t];
16544
16544
  return r ? r.instance : null;
16545
16545
  }
16546
16546
  }, {
@@ -16552,7 +16552,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16552
16552
  for (;;) {
16553
16553
  switch (t.prev = t.next) {
16554
16554
  case 0:
16555
- if (o = v(e, this, b)._[n]) {
16555
+ if (o = v(e, this, y)._[n]) {
16556
16556
  t.next = 1;
16557
16557
  break;
16558
16558
  }
@@ -16588,7 +16588,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16588
16588
  }, {
16589
16589
  key: 'update',
16590
16590
  value: function(t, r) {
16591
- var n = v(e, this, b)._[t];
16591
+ var n = v(e, this, y)._[t];
16592
16592
  if (!n) {
16593
16593
  throw new d.IRtcError(f.ErrorCode.INVALID_STATE, ''.concat(t, ' plugin is not started, cannot update options'));
16594
16594
  }
@@ -16597,19 +16597,19 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16597
16597
  }, {
16598
16598
  key: 'stop',
16599
16599
  value: function(t) {
16600
- var r = v(e, this, b)._[t];
16600
+ var r = v(e, this, y)._[t];
16601
16601
  if (!r) {
16602
16602
  throw new d.IRtcError(f.ErrorCode.INVALID_STATE, ''.concat(t, ' plugin is not started, cannot stop it'));
16603
16603
  }
16604
16604
  try {
16605
- r.script && r.script.parentNode && r.script.parentNode.removeChild(r.script), delete v(e, this, b)._[t];
16605
+ r.script && r.script.parentNode && r.script.parentNode.removeChild(r.script), delete v(e, this, y)._[t];
16606
16606
  } catch (e) {
16607
16607
  throw new d.IRtcError(f.ErrorCode.INTERNAL_ERROR, 'Failed to stop '.concat(t, ' plugin: ').concat(e.message));
16608
16608
  }
16609
16609
  }
16610
16610
  } ]);
16611
16611
  }();
16612
- function y() {
16612
+ function b() {
16613
16613
  if (v(o, this, g)._) {
16614
16614
  return v(o, this, g)._;
16615
16615
  }
@@ -16626,7 +16626,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16626
16626
  return g._ = v(o, this, t.src.substring(0, t.src.lastIndexOf('/') + 1)), v(o, this, g)._;
16627
16627
  }
16628
16628
  o = m;
16629
- var b = {
16629
+ var y = {
16630
16630
  _: {}
16631
16631
  }, g = {
16632
16632
  _: ''
@@ -16697,10 +16697,10 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16697
16697
  }
16698
16698
  })(e, t), t.set(e, r);
16699
16699
  }
16700
- function y(e, t, r) {
16700
+ function b(e, t, r) {
16701
16701
  return e.set(g(e, t), r), r;
16702
16702
  }
16703
- function b(e, t) {
16703
+ function y(e, t) {
16704
16704
  return e.get(g(e, t));
16705
16705
  }
16706
16706
  function g(e, t, r) {
@@ -16733,51 +16733,51 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16733
16733
  writable: !1,
16734
16734
  value: e || f.createUuid()
16735
16735
  }), p.stop = function() {
16736
- return b(_, p) && (clearInterval(b(_, p)), y(_, p, null), y(R, p, null), y(S, p, null)),
16736
+ return y(_, p) && (clearInterval(y(_, p)), b(_, p, null), b(R, p, null), b(S, p, null)),
16737
16737
  r();
16738
16738
  }, p.getStats = n, p.getConnectionStats = o, p.getConnectionSummary = function() {
16739
- return b(M, p) > 0 ? new d.ConnectionSummary(Math.round(100 * b(D, p) / b(M, p)), Math.round(b(N, p) / b(M, p))) : new d.ConnectionSummary(0, 0);
16739
+ return y(M, p) > 0 ? new d.ConnectionSummary(Math.round(100 * y(D, p) / y(M, p)), Math.round(y(N, p) / y(M, p))) : new d.ConnectionSummary(0, 0);
16740
16740
  }, p.mute = i, p.unmute = a, p.updateMedia = s, p.updateMediaTrack = u, p.setRemoteQosMonitorMode = function(e) {
16741
- y(L, p, e);
16742
- }, y(w, p, c), y(k, p, (function() {
16741
+ b(L, p, e);
16742
+ }, b(w, p, c), b(k, p, (function() {
16743
16743
  p.getStats().then((function(e) {
16744
16744
  e.forEach((function(e) {
16745
- 'true' === e.googActiveConnection && 'googCandidatePair' === e.type && e.googRtt ? y(A, p, Number(e.googRtt)) : 'candidate-pair' === e.type && 'succeeded' === e.state && e.currentRoundTripTime ? y(A, p, 1e3 * Number(e.currentRoundTripTime)) : 'remote-inbound-rtp' === e.type && e.roundTripTime && y(A, p, 1e3 * Number(e.roundTripTime));
16745
+ 'true' === e.googActiveConnection && 'googCandidatePair' === e.type && e.googRtt ? b(A, p, Number(e.googRtt)) : 'candidate-pair' === e.type && 'succeeded' === e.state && e.currentRoundTripTime ? b(A, p, 1e3 * Number(e.currentRoundTripTime)) : 'remote-inbound-rtp' === e.type && e.roundTripTime && b(A, p, 1e3 * Number(e.roundTripTime));
16746
16746
  }));
16747
16747
  }));
16748
16748
  })), p.onRemoteConnectionStatus = function(e) {
16749
- y(x, p, e);
16749
+ b(x, p, e);
16750
16750
  }, p;
16751
16751
  }
16752
16752
  return (0, a.default)(t, e), (0, c.default)(t, [ {
16753
16753
  key: 'addEventListener',
16754
16754
  value: function(e, r) {
16755
16755
  var n = this;
16756
- v(t, 'addEventListener', this, 3)([ e, r ]), 'quality-report' !== e || b(_, this) || (b(w, this).call(this, 'connection-status', {
16756
+ v(t, 'addEventListener', this, 3)([ e, r ]), 'quality-report' !== e || y(_, this) || (y(w, this).call(this, 'connection-status', {
16757
16757
  id: this.id
16758
- }), y(_, this, setInterval((function() {
16759
- b(k, n).call(n), n.getConnectionStats().then((function(t) {
16758
+ }), b(_, this, setInterval((function() {
16759
+ y(k, n).call(n), n.getConnectionStats().then((function(t) {
16760
16760
  var r, o, i = 0, a = 0, s = 0, u = 0, c = 0, l = 0;
16761
16761
  if (t.audio && (u = t.audio.bytesSent, a += t.audio.packetsSent, !t.video && t.audio.remote && t.audio.remote.packetsLost && (i += t.audio.remote.packetsLost)),
16762
16762
  t.video && (a = 0, t.video.nackCount ? i += t.video.nackCount : t.video.packetsLost && (i += t.video.packetsLost),
16763
16763
  a += t.video.packetsSent, t.video.retransmittedPacketsSent && (a += t.video.retransmittedPacketsSent,
16764
16764
  i = t.video.retransmittedPacketsSent), t.video.frameWidth && (r = t.video.frameWidth),
16765
16765
  t.video.frameHeight && (o = t.video.frameHeight), s = t.video.framesSent, c = t.video.bytesSent,
16766
- l = t.video.totalEncodeTime), b(S, n)) {
16766
+ l = t.video.totalEncodeTime), y(S, n)) {
16767
16767
  var f, p = 0;
16768
- p = 'connected' !== t.connectionState || a - b(S, n) == 0 ? 100 : Math.round(100 * (i - b(R, n)) / (a - b(S, n))),
16769
- y(I, n, 30), s - b(T, n) > 0 && y(I, n, b(I, n) + Math.round(1e3 * (l - b(j, n)) / (s - b(T, n)))),
16770
- y(I, n, b(I, n) + b(A, n)), y(N, n, b(N, n) + b(I, n));
16768
+ p = 'connected' !== t.connectionState || a - y(S, n) == 0 ? 100 : Math.round(100 * (i - y(R, n)) / (a - y(S, n))),
16769
+ b(I, n, 30), s - y(T, n) > 0 && b(I, n, y(I, n) + Math.round(1e3 * (l - y(j, n)) / (s - y(T, n)))),
16770
+ b(I, n, y(I, n) + y(A, n)), b(N, n, y(N, n) + y(I, n));
16771
16771
  var h, v = 0;
16772
- b(x, n) && b(x, n).video && void 0 !== b(x, n).video.fps ? (v = b(x, n).video.fps,
16773
- y(x, n, void 0)) : t.video && void 0 !== t.video.framesPerSecond ? v = t.video.framesPerSecond : s > 0 && (b(T, n) && (v = Math.round(1e3 * (s - b(T, n)) / 3e3)),
16774
- y(T, n, s)), t.video && v < 10 && b(M, n) > 1 && y(D, n, (h = b(D, n), ++h));
16772
+ y(x, n) && y(x, n).video && void 0 !== y(x, n).video.fps ? (v = y(x, n).video.fps,
16773
+ b(x, n, void 0)) : t.video && void 0 !== t.video.framesPerSecond ? v = t.video.framesPerSecond : s > 0 && (y(T, n) && (v = Math.round(1e3 * (s - y(T, n)) / 3e3)),
16774
+ b(T, n, s)), t.video && v < 10 && y(M, n) > 1 && b(D, n, (h = y(D, n), ++h));
16775
16775
  var m = 0;
16776
- u > 0 && (b(P, n) && (m = Math.round(8 * (u - b(P, n)) / 3e3)), y(P, n, u));
16776
+ u > 0 && (y(P, n) && (m = Math.round(8 * (u - y(P, n)) / 3e3)), b(P, n, u));
16777
16777
  var g = 0;
16778
- c > 0 && (b(O, n) && (g = Math.round(8 * (c - b(O, n)) / 3e3)), y(O, n, c));
16779
- var _ = new d.QualityInfo(p, b(I, n), v, m, g, r, o), k = new d.QualityCriterion(1), B = 100 - _.packetloss * k.packetloss, U = B >= 85 ? d.QualityReportStatus.GOOD : d.QualityReportStatus.BAD, V = new d.QualityReport(U, B, _, k), F = new d.QualityReportEvent(e, V);
16780
- n.dispatchEvent(F), y(M, n, (f = b(M, n), ++f)), (b(L, n) === E.Low && b(C, n) != U || b(L, n) === E.High) && b(w, n).call(n, 'custom', {
16778
+ c > 0 && (y(O, n) && (g = Math.round(8 * (c - y(O, n)) / 3e3)), b(O, n, c));
16779
+ var _ = new d.QualityInfo(p, y(I, n), v, m, g, r, o), k = new d.QualityCriterion(1), B = 100 - _.packetloss * k.packetloss, U = B >= 85 ? d.QualityReportStatus.GOOD : d.QualityReportStatus.BAD, V = new d.QualityReport(U, B, _, k), F = new d.QualityReportEvent(e, V);
16780
+ n.dispatchEvent(F), b(M, n, (f = y(M, n), ++f)), (y(L, n) === E.Low && y(C, n) != U || y(L, n) === E.High) && y(w, n).call(n, 'custom', {
16781
16781
  to: 'all',
16782
16782
  message: {
16783
16783
  type: 'stream',
@@ -16785,25 +16785,25 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16785
16785
  id: n.id,
16786
16786
  report: V
16787
16787
  }
16788
- }), y(C, n, U);
16788
+ }), b(C, n, U);
16789
16789
  }
16790
- y(R, n, i), y(S, n, a), y(j, n, l);
16790
+ b(R, n, i), b(S, n, a), b(j, n, l);
16791
16791
  }));
16792
16792
  }), 3e3)));
16793
16793
  }
16794
16794
  }, {
16795
16795
  key: 'removeEventListener',
16796
16796
  value: function(e, r) {
16797
- v(t, 'removeEventListener', this, 3)([ e, r ]), 'quality-report' === e && 0 === v(t, 'getEventListener', this, 3)([ e ]).length && b(_, this) && (clearInterval(b(_, this)),
16798
- y(_, this, null), y(R, this, null), y(S, this, null), y(A, this, null), y(T, this, null),
16799
- y(P, this, null), y(O, this, null));
16797
+ v(t, 'removeEventListener', this, 3)([ e, r ]), 'quality-report' === e && 0 === v(t, 'getEventListener', this, 3)([ e ]).length && y(_, this) && (clearInterval(y(_, this)),
16798
+ b(_, this, null), b(R, this, null), b(S, this, null), b(A, this, null), b(T, this, null),
16799
+ b(P, this, null), b(O, this, null));
16800
16800
  }
16801
16801
  }, {
16802
16802
  key: 'clearEventListener',
16803
16803
  value: function(e) {
16804
- v(t, 'clearEventListener', this, 3)([ e ]), 'quality-report' === e && b(_, this) && (clearInterval(b(_, this)),
16805
- y(_, this, null), y(R, this, null), y(S, this, null), y(A, this, null), y(T, this, null),
16806
- y(P, this, null), y(O, this, null));
16804
+ v(t, 'clearEventListener', this, 3)([ e ]), 'quality-report' === e && y(_, this) && (clearInterval(y(_, this)),
16805
+ b(_, this, null), b(R, this, null), b(S, this, null), b(A, this, null), b(T, this, null),
16806
+ b(P, this, null), b(O, this, null));
16807
16807
  }
16808
16808
  } ]);
16809
16809
  }(d.EventDispatcher), r.PublishOptions = (0, c.default)((function e(t, r) {
@@ -16855,7 +16855,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16855
16855
  return s;
16856
16856
  })(e, t);
16857
16857
  }
16858
- function y(e, t, r) {
16858
+ function b(e, t, r) {
16859
16859
  return t = (0, a.default)(t), (0, i.default)(e, function() {
16860
16860
  try {
16861
16861
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
@@ -16863,16 +16863,16 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16863
16863
  return !!e;
16864
16864
  }() ? Reflect.construct(t, r || [], (0, a.default)(e).constructor) : t.apply(e, r));
16865
16865
  }
16866
- var b = r.RecordOptions = (0, u.default)((function e(t, r, n, o, i) {
16866
+ var y = r.RecordOptions = (0, u.default)((function e(t, r, n, o, i) {
16867
16867
  (0, c.default)(this, e), this.mimeType = t, this.audioBitsPerSecond = r, this.videoBitsPerSecond = n,
16868
16868
  this.width = 'number' == typeof o && isFinite(o) ? o : 0, this.height = 'number' == typeof i && isFinite(i) ? i : 0;
16869
16869
  })), g = r.LocalRecorder = function(e) {
16870
16870
  function t(e, r) {
16871
16871
  var n;
16872
- if ((0, c.default)(this, t), n = y(this, t), !(e && e instanceof d.Stream)) {
16872
+ if ((0, c.default)(this, t), n = b(this, t), !(e && e instanceof d.Stream)) {
16873
16873
  throw new v.IRtcError(h.ErrorCode.INVALID_PARAMETER, 'Invalid stream.');
16874
16874
  }
16875
- if (!(r && r instanceof b)) {
16875
+ if (!(r && r instanceof y)) {
16876
16876
  throw new v.IRtcError(h.ErrorCode.INVALID_PARAMETER, 'Invalid options.');
16877
16877
  }
16878
16878
  return Object.defineProperty(n, 'stream', {
@@ -16978,7 +16978,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
16978
16978
  if ((0, c.default)(this, t), !e && !r) {
16979
16979
  throw new v.IRtcError(h.ErrorCode.MISSING_PARAMETER, 'Invalid stream.');
16980
16980
  }
16981
- if (!(n && n instanceof b)) {
16981
+ if (!(n && n instanceof y)) {
16982
16982
  throw new v.IRtcError(h.ErrorCode.INVALID_PARAMETER, 'Invalid options.');
16983
16983
  }
16984
16984
  var i = {}, a = document.createElement('canvas'), s = a.getContext('2d'), u = document.createElement('video');
@@ -17014,7 +17014,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17014
17014
  i[e.id] = t, t.connect(g);
17015
17015
  })), E.addTrack(w.getAudioTracks()[0]), E.addTrack(a.stream.getVideoTracks()[0]);
17016
17016
  var _ = new LocalStream(E, new StreamSourceInfo('mic', 'camera'));
17017
- return (o = y(this, t, [ _, n ])).updateVideo = function(e) {
17017
+ return (o = b(this, t, [ _, n ])).updateVideo = function(e) {
17018
17018
  if (!e) {
17019
17019
  throw new v.IRtcError(h.ErrorCode.MISSING_PARAMETER, 'Invalid stream.');
17020
17020
  }
@@ -17223,11 +17223,11 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17223
17223
  var u, c = [], m = o(r);
17224
17224
  try {
17225
17225
  for (m.s(); !(u = m.n()).done; ) {
17226
- for (var y = u.value, b = 0; b < n.length; b++) {
17227
- var g = f(n, b, -1, 'a=rtpmap', y);
17226
+ for (var b = u.value, y = 0; y < n.length; y++) {
17227
+ var g = f(n, y, -1, 'a=rtpmap', b);
17228
17228
  if (null !== g) {
17229
17229
  var E = d(n[g]);
17230
- E && (c.push(E), b = g);
17230
+ E && (c.push(E), y = g);
17231
17231
  }
17232
17232
  }
17233
17233
  }
@@ -17324,7 +17324,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17324
17324
  Object.defineProperty(r, '__esModule', {
17325
17325
  value: !0
17326
17326
  }), r.StreamUpdatedEvent = r.StreamSourceInfo = r.StreamEvent = r.Stream = r.SpeakingEvent = r.RemoteStream = r.PlayingProgressEvent = r.LocalStream = r.ConnectionStateEvent = r.AsrEvent = void 0;
17327
- var i = n(e('@babel/runtime/regenerator')), a = n(e('@babel/runtime/helpers/slicedToArray')), s = n(e('@babel/runtime/helpers/asyncToGenerator')), u = n(e('@babel/runtime/helpers/possibleConstructorReturn')), c = n(e('@babel/runtime/helpers/getPrototypeOf')), l = n(e('@babel/runtime/helpers/inherits')), f = n(e('@babel/runtime/helpers/typeof')), d = n(e('@babel/runtime/helpers/createClass')), p = n(e('@babel/runtime/helpers/classCallCheck')), h = n(e('./logger.js')), v = e('./event.js'), m = R(e('./utils.js')), y = R(e('../base/event.js')), b = R(e('./mediaformat.js')), g = e('./mediastream-factory.js'), E = e('./plugin.js'), w = e('./errorCode.js'), _ = e('./IRtcError.js');
17327
+ var i = n(e('@babel/runtime/regenerator')), a = n(e('@babel/runtime/helpers/slicedToArray')), s = n(e('@babel/runtime/helpers/asyncToGenerator')), u = n(e('@babel/runtime/helpers/possibleConstructorReturn')), c = n(e('@babel/runtime/helpers/getPrototypeOf')), l = n(e('@babel/runtime/helpers/inherits')), f = n(e('@babel/runtime/helpers/typeof')), d = n(e('@babel/runtime/helpers/createClass')), p = n(e('@babel/runtime/helpers/classCallCheck')), h = n(e('./logger.js')), v = e('./event.js'), m = R(e('./utils.js')), b = R(e('../base/event.js')), y = R(e('./mediaformat.js')), g = e('./mediastream-factory.js'), E = e('./plugin.js'), w = e('./errorCode.js'), _ = e('./IRtcError.js');
17328
17328
  function R(e, t) {
17329
17329
  if ('function' == typeof WeakMap) {
17330
17330
  var r = new WeakMap, n = new WeakMap;
@@ -17547,7 +17547,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17547
17547
  }));
17548
17548
  }, o.attachAudioLevel = function() {
17549
17549
  var e = (0, s.default)(i.default.mark((function e(t) {
17550
- var r, n, o, a, s, u, c, l, f, d, p, v, m, y, b, g, E, w = this;
17550
+ var r, n, o, a, s, u, c, l, f, d, p, v, m, b, y, g, E, w = this;
17551
17551
  return i.default.wrap((function(e) {
17552
17552
  for (;;) {
17553
17553
  switch (e.prev = e.next) {
@@ -17594,7 +17594,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17594
17594
 
17595
17595
  case 5:
17596
17596
  return (n = r.createAnalyser()).fftSize = 256, n.smoothingTimeConstant = .3, (o = r.createMediaStreamSource(this.mediaStream)).connect(n),
17597
- m = n.frequencyBinCount, s = new Uint8Array(m), y = function() {
17597
+ m = n.frequencyBinCount, s = new Uint8Array(m), b = function() {
17598
17598
  n.getByteTimeDomainData(s);
17599
17599
  for (var e = 0, t = 0, r = 0; r < m; r++) {
17600
17600
  var o = s[r], i = (o - 128) / 128;
@@ -17602,7 +17602,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17602
17602
  e += i * i, t++;
17603
17603
  }
17604
17604
  return 0 === t ? (console.error('没有有效的音频样本'), 0) : Math.sqrt(e / t);
17605
- }, b = {
17605
+ }, y = {
17606
17606
  result: !0,
17607
17607
  stop: function() {
17608
17608
  if (u) {
@@ -17622,7 +17622,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17622
17622
  return u;
17623
17623
  },
17624
17624
  getStatus: function() {
17625
- var e = y(), t = 20 * Math.log10(Math.max(l, e)), r = 20 * Math.log10(Math.max(l, Math.max(0, e - v)));
17625
+ var e = b(), t = 20 * Math.log10(Math.max(l, e)), r = 20 * Math.log10(Math.max(l, Math.max(0, e - v)));
17626
17626
  return {
17627
17627
  rms: e.toFixed(6),
17628
17628
  db: t.toFixed(1) + ' dB',
@@ -17637,7 +17637,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17637
17637
  }
17638
17638
  }, g = function() {
17639
17639
  if (u) {
17640
- var e = y(), r = Math.max(0, e - v), n = 0;
17640
+ var e = b(), r = Math.max(0, e - v), n = 0;
17641
17641
  if (r <= l) {
17642
17642
  n = 0;
17643
17643
  } else {
@@ -17651,9 +17651,9 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17651
17651
  }
17652
17652
  (i /= c.length) < p && (i = 0);
17653
17653
  var h = Math.round(i);
17654
- t(h), u && w.mediaStream && w.mediaStream.getAudioTracks().length > 0 ? a = requestAnimationFrame(g) : b.stop();
17654
+ t(h), u && w.mediaStream && w.mediaStream.getAudioTracks().length > 0 ? a = requestAnimationFrame(g) : y.stop();
17655
17655
  }
17656
- }, a = requestAnimationFrame(g), e.abrupt('return', b);
17656
+ }, a = requestAnimationFrame(g), e.abrupt('return', y);
17657
17657
 
17658
17658
  case 6:
17659
17659
  return e.prev = 6, E = e.catch(4), h.default.error('Error attaching audio level:', E),
@@ -17709,7 +17709,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17709
17709
  0 == e.getVideoTracks().length && (r.video.source = 'camera', e.addTrack(s.getVideoTracks()[0]));
17710
17710
  }
17711
17711
  i = k(this, t, [ e, r, n ]), o && (i.canvasInterval = a, i.dumyStream = s), e.oninactive = function() {
17712
- var e = new y.IRtcEvent('ended');
17712
+ var e = new b.IRtcEvent('ended');
17713
17713
  i.dispatchEvent(e);
17714
17714
  }, Object.defineProperty(i, 'id', {
17715
17715
  configurable: !1,
@@ -17759,14 +17759,14 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17759
17759
  value: function(e, r, n) {
17760
17760
  var o = this;
17761
17761
  return new Promise((function(i, a) {
17762
- if (o.media.video.source === b.VideoSourceInfo.CAMERA) {
17762
+ if (o.media.video.source === y.VideoSourceInfo.CAMERA) {
17763
17763
  var s;
17764
- 'boolean' != typeof n && (n = !0), o.media.audio.source !== b.AudioSourceInfo.MIC || n ? o.mediaStream.getVideoTracks().forEach((function(e) {
17764
+ 'boolean' != typeof n && (n = !0), o.media.audio.source !== y.AudioSourceInfo.MIC || n ? o.mediaStream.getVideoTracks().forEach((function(e) {
17765
17765
  e.stop();
17766
17766
  })) : (o.mediaStream.getTracks().forEach((function(e) {
17767
17767
  e.stop();
17768
- })), s = new g.AudioTrackConstraints(b.AudioSourceInfo.MIC));
17769
- var u = new g.VideoTrackConstraints(b.VideoSourceInfo.CAMERA);
17768
+ })), s = new g.AudioTrackConstraints(y.AudioSourceInfo.MIC));
17769
+ var u = new g.VideoTrackConstraints(y.VideoSourceInfo.CAMERA);
17770
17770
  u.deviceId = e, u.facingMode = r, u.resolution = o.resolution, u.frameRate = o.frameRate,
17771
17771
  g.MediaStreamFactory.createMediaStream(new g.StreamConstraints(s, u)).then((function(e) {
17772
17772
  if (s) {
@@ -17774,10 +17774,10 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17774
17774
  r !== n && (o.mediaStream.removeTrack(r), o.mediaStream.addTrack(n));
17775
17775
  }
17776
17776
  var i = o.mediaStream.getVideoTracks()[0], a = e.getVideoTracks()[0];
17777
- return i !== a && (o.mediaStream.removeTrack(i), o.mediaStream.addTrack(a)), new t(e, new I(b.AudioSourceInfo.MIC, b.VideoSourceInfo.CAMERA), null);
17777
+ return i !== a && (o.mediaStream.removeTrack(i), o.mediaStream.addTrack(a)), new t(e, new I(y.AudioSourceInfo.MIC, y.VideoSourceInfo.CAMERA), null);
17778
17778
  })).then((function(e) {
17779
17779
  o.publications.forEach((function(t) {
17780
- t.updateMediaTrack(e, s ? b.TrackKind.AUDIO_AND_VIDEO : b.TrackKind.VIDEO);
17780
+ t.updateMediaTrack(e, s ? y.TrackKind.AUDIO_AND_VIDEO : y.TrackKind.VIDEO);
17781
17781
  })), i();
17782
17782
  }));
17783
17783
  } else {
@@ -17791,7 +17791,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17791
17791
  return new Promise((function(u, c) {
17792
17792
  g.MediaStreamFactory.createMediaStream(e).then(function() {
17793
17793
  var e = (0, s.default)(i.default.mark((function e(s) {
17794
- var l, f, d, p, h, v, m, y, b;
17794
+ var l, f, d, p, h, v, m, b, y;
17795
17795
  return i.default.wrap((function(e) {
17796
17796
  for (;;) {
17797
17797
  switch (e.prev = e.next) {
@@ -17821,7 +17821,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17821
17821
  break;
17822
17822
 
17823
17823
  case 6:
17824
- e.prev = 6, y = e.catch(1), d.e(y);
17824
+ e.prev = 6, b = e.catch(1), d.e(b);
17825
17825
 
17826
17826
  case 7:
17827
17827
  return e.prev = 7, d.f(), e.finish(7);
@@ -17831,7 +17831,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17831
17831
  break;
17832
17832
 
17833
17833
  case 9:
17834
- e.prev = 9, b = e.catch(0), c(_.IRtcError.withCode(b));
17834
+ e.prev = 9, y = e.catch(0), c(_.IRtcError.withCode(y));
17835
17835
 
17836
17836
  case 10:
17837
17837
  case 'end':
@@ -17852,8 +17852,8 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17852
17852
  key: 'createFromCamera',
17853
17853
  value: function(e, r, n, o, i, a, s, u) {
17854
17854
  return new Promise((function(c, l) {
17855
- var f, d = new g.AudioTrackConstraints(b.AudioSourceInfo.MIC), p = new g.VideoTrackConstraints(b.VideoSourceInfo.CAMERA);
17856
- a ? f = new I(b.AudioSourceInfo.MIC, b.VideoSourceInfo.CAMERA) : (f = new I(void 0, b.VideoSourceInfo.CAMERA),
17855
+ var f, d = new g.AudioTrackConstraints(y.AudioSourceInfo.MIC), p = new g.VideoTrackConstraints(y.VideoSourceInfo.CAMERA);
17856
+ a ? f = new I(y.AudioSourceInfo.MIC, y.VideoSourceInfo.CAMERA) : (f = new I(void 0, y.VideoSourceInfo.CAMERA),
17857
17857
  d = !1), p.deviceId = e, p.resolution = {
17858
17858
  width: r,
17859
17859
  height: n
@@ -17870,8 +17870,8 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17870
17870
  key: 'createAudioFromMic',
17871
17871
  value: function(e) {
17872
17872
  return new Promise((function(r, n) {
17873
- var o, i = new g.AudioTrackConstraints(b.AudioSourceInfo.MIC);
17874
- o = new I(b.AudioSourceInfo.MIC, void 0);
17873
+ var o, i = new g.AudioTrackConstraints(y.AudioSourceInfo.MIC);
17874
+ o = new I(y.AudioSourceInfo.MIC, void 0);
17875
17875
  var a = new g.StreamConstraints(i, !1);
17876
17876
  t.createFromConstraints(a, o, e, !1).then((function(e) {
17877
17877
  r(e);
@@ -17884,8 +17884,8 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17884
17884
  key: 'createAudioFromFile',
17885
17885
  value: function(e, r, n) {
17886
17886
  return new Promise((function(o, i) {
17887
- var a, s = new g.AudioTrackConstraints(b.AudioSourceInfo.FILE);
17888
- s.file = e, s.loop = r, a = new I(b.AudioSourceInfo.FILE, void 0);
17887
+ var a, s = new g.AudioTrackConstraints(y.AudioSourceInfo.FILE);
17888
+ s.file = e, s.loop = r, a = new I(y.AudioSourceInfo.FILE, void 0);
17889
17889
  var u = new g.StreamConstraints(s, !1);
17890
17890
  t.createFromConstraints(u, a, n, !1).then((function(e) {
17891
17891
  o(e);
@@ -17898,8 +17898,8 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17898
17898
  key: 'createFromScreenCast',
17899
17899
  value: function(e, r, n, o) {
17900
17900
  return new Promise((function(i, a) {
17901
- var s, u = new g.AudioTrackConstraints(b.AudioSourceInfo.SCREENCAST), c = new g.VideoTrackConstraints(b.VideoSourceInfo.SCREENCAST);
17902
- s = new I(b.AudioSourceInfo.SCREENCAST, b.VideoSourceInfo.SCREENCAST), c.resolution = {
17901
+ var s, u = new g.AudioTrackConstraints(y.AudioSourceInfo.SCREENCAST), c = new g.VideoTrackConstraints(y.VideoSourceInfo.SCREENCAST);
17902
+ s = new I(y.AudioSourceInfo.SCREENCAST, y.VideoSourceInfo.SCREENCAST), c.resolution = {
17903
17903
  width: e,
17904
17904
  height: r
17905
17905
  }, c.frameRate = n;
@@ -17915,7 +17915,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17915
17915
  key: 'createFromCropElement',
17916
17916
  value: function(e, r, n, o, i) {
17917
17917
  return new Promise((function(a, s) {
17918
- var u = new g.AudioTrackConstraints(b.AudioSourceInfo.SCREENCAST), c = new g.VideoTrackConstraints(b.VideoSourceInfo.SCREENCAST), l = new I(b.AudioSourceInfo.SCREENCAST, b.VideoSourceInfo.SCREENCAST);
17918
+ var u = new g.AudioTrackConstraints(y.AudioSourceInfo.SCREENCAST), c = new g.VideoTrackConstraints(y.VideoSourceInfo.SCREENCAST), l = new I(y.AudioSourceInfo.SCREENCAST, y.VideoSourceInfo.SCREENCAST);
17919
17919
  c.cropElement = e, c.resolution = {
17920
17920
  width: r,
17921
17921
  height: n
@@ -17934,7 +17934,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17934
17934
  return new Promise((function(n, o) {
17935
17935
  if (e && e instanceof HTMLAudioElement && 'function' == typeof e.captureStream) {
17936
17936
  try {
17937
- var i = new I(b.AudioSourceInfo.FILE, void 0);
17937
+ var i = new I(y.AudioSourceInfo.FILE, void 0);
17938
17938
  n(new t(e.captureStream(), i, r, !1));
17939
17939
  } catch (e) {
17940
17940
  o(_.IRtcError.withCode(e));
@@ -17950,7 +17950,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
17950
17950
  return new Promise((function(n, o) {
17951
17951
  if (e && e instanceof HTMLVideoElement && 'function' == typeof e.captureStream) {
17952
17952
  try {
17953
- n(new t(e.captureStream(), new I(b.AudioSourceInfo.FILE, b.VideoSourceInfo.FILE), r, !1));
17953
+ n(new t(e.captureStream(), new I(y.AudioSourceInfo.FILE, y.VideoSourceInfo.FILE), r, !1));
17954
17954
  } catch (e) {
17955
17955
  o(_.IRtcError.withCode(e));
17956
17956
  }
@@ -18145,7 +18145,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18145
18145
  value: !0
18146
18146
  }), r.ConferencePeerConnectionChannel = void 0;
18147
18147
  var i = n(e('@babel/runtime/helpers/toConsumableArray')), a = n(e('@babel/runtime/helpers/typeof')), s = n(e('@babel/runtime/helpers/classCallCheck')), u = n(e('@babel/runtime/helpers/createClass')), c = n(e('@babel/runtime/helpers/possibleConstructorReturn')), l = n(e('@babel/runtime/helpers/getPrototypeOf')), f = n(e('@babel/runtime/helpers/inherits')), d = n(e('../base/logger.js')), p = e('../base/event.js'), h = e('../base/mediaformat.js'), v = (e('../base/mediastream-factory'),
18148
- e('../base/publication.js')), m = e('./subscription.js'), y = e('../base/errorCode.js'), b = e('../base/IRtcError.js'), g = w(e('../base/utils.js')), E = w(e('../base/sdputils.js'));
18148
+ e('../base/publication.js')), m = e('./subscription.js'), b = e('../base/errorCode.js'), y = e('../base/IRtcError.js'), g = w(e('../base/utils.js')), E = w(e('../base/sdputils.js'));
18149
18149
  function w(e, t) {
18150
18150
  if ('function' == typeof WeakMap) {
18151
18151
  var r = new WeakMap, n = new WeakMap;
@@ -18294,19 +18294,19 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18294
18294
  audio: !!e.mediaStream.getAudioTracks().length,
18295
18295
  video: !!e.mediaStream.getVideoTracks().length
18296
18296
  }), 'object' !== (0, a.default)(t)) {
18297
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Options should be an object.'));
18297
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Options should be an object.'));
18298
18298
  }
18299
18299
  void 0 !== t.audio && null !== t.audio || (t.audio = !!e.mediaStream.getAudioTracks().length),
18300
18300
  void 0 !== t.video && null !== t.video || (t.video = !!e.mediaStream.getVideoTracks().length);
18301
18301
  var n = !!t.audio, o = !!t.video;
18302
18302
  if (n && 0 == e.mediaStream.getAudioTracks().length || o && 0 == e.mediaStream.getVideoTracks().length) {
18303
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'options.audio/video is inconsistent with tracks presented in the MediaStream.'));
18303
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'options.audio/video is inconsistent with tracks presented in the MediaStream.'));
18304
18304
  }
18305
18305
  if (!1 === t.audio && !1 === t.video) {
18306
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Cannot publish a stream without audio and video.'));
18306
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Cannot publish a stream without audio and video.'));
18307
18307
  }
18308
18308
  if ('object' === (0, a.default)(t.audio) && !Array.isArray(t.audio)) {
18309
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'options.audio should be a boolean or an array.'));
18309
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'options.audio should be a boolean or an array.'));
18310
18310
  }
18311
18311
  if (this._isIrtcEncodingParameters(t.audio)) {
18312
18312
  var i, s = _(t.audio);
@@ -18314,7 +18314,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18314
18314
  for (s.s(); !(i = s.n()).done; ) {
18315
18315
  var u = i.value;
18316
18316
  if (!u.codec || 'string' != typeof u.codec.name || 0 === u.codec.name.length || void 0 !== u.maxBitrate && 'number' != typeof u.maxBitrate || void 0 !== u.minBitrate && 'number' != typeof u.minBitrate || void 0 !== u.startBitrate && 'number' != typeof u.startBitrate) {
18317
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'options.audio has incorrect parameters.'));
18317
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'options.audio has incorrect parameters.'));
18318
18318
  }
18319
18319
  }
18320
18320
  } catch (e) {
@@ -18324,7 +18324,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18324
18324
  }
18325
18325
  }
18326
18326
  if ('object' === (0, a.default)(t.video) && !Array.isArray(t.video)) {
18327
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'options.video should be a boolean or an array.'));
18327
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'options.video should be a boolean or an array.'));
18328
18328
  }
18329
18329
  if (this._isIrtcEncodingParameters(t.video)) {
18330
18330
  var c, l = _(t.video);
@@ -18332,7 +18332,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18332
18332
  for (l.s(); !(c = l.n()).done; ) {
18333
18333
  var f = c.value;
18334
18334
  if (!f.codec || 'string' != typeof f.codec.name || 0 === f.codec.name.length || void 0 !== f.maxBitrate && 'number' != typeof f.maxBitrate || void 0 !== f.minBitrate && 'number' != typeof f.minBitrate || void 0 !== f.startBitrate && 'number' != typeof f.startBitrate || void 0 !== f.codec.profile && 'string' != typeof f.codec.profile) {
18335
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'options.video has incorrect parameters.'));
18335
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'options.video has incorrect parameters.'));
18336
18336
  }
18337
18337
  }
18338
18338
  } catch (e) {
@@ -18346,7 +18346,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18346
18346
  if (this._createPeerConnection(), e.mediaStream.getAudioTracks().length > 0 && !1 !== t.audio && null !== t.audio) {
18347
18347
  if (e.mediaStream.getAudioTracks().length > 1 && d.default.warning('Publishing a stream with multiple audio tracks is not fully supported.'),
18348
18348
  'boolean' != typeof t.audio && 'object' !== (0, a.default)(t.audio)) {
18349
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Type of audio options should be boolean or an object.'));
18349
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Type of audio options should be boolean or an object.'));
18350
18350
  }
18351
18351
  h.audio = {}, h.audio.source = e.media.audio.source, h.audio.status = e.media.audio.status;
18352
18352
  var v, m = _(e.mediaStream.getAudioTracks());
@@ -18415,7 +18415,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18415
18415
  })).catch((function(e) {
18416
18416
  r._unpublish(), r._rejectPromise(e), r._fireEndedEventOnPublicationOrSubscription();
18417
18417
  })), this._callbackTimer = setTimeout((function() {
18418
- r._unpublish(), r._rejectPromise(new b.IRtcError(y.ErrorCode.MESSAGE_TIMEOUT, 'Publish timeout!')),
18418
+ r._unpublish(), r._rejectPromise(new y.IRtcError(b.ErrorCode.MESSAGE_TIMEOUT, 'Publish timeout!')),
18419
18419
  r._fireEndedEventOnPublicationOrSubscription();
18420
18420
  }), 15e3), new Promise((function(e, t) {
18421
18421
  r._publishPromise = {
@@ -18432,28 +18432,28 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18432
18432
  audio: !!e.capabilities.audio,
18433
18433
  video: !!e.capabilities.video
18434
18434
  }), void 0 !== e.mediaStream && null !== e.mediaStream) {
18435
- return Promise.reject(new b.IRtcError(y.ErrorCode.ALREADY_SUBSCRIBED, 'The same remote stream has already been subscribed. Subcribe after it is unsubscribed.'));
18435
+ return Promise.reject(new y.IRtcError(b.ErrorCode.ALREADY_SUBSCRIBED, 'The same remote stream has already been subscribed. Subcribe after it is unsubscribed.'));
18436
18436
  }
18437
18437
  if ('object' !== (0, a.default)(t)) {
18438
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Options should be an object.'));
18438
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Options should be an object.'));
18439
18439
  }
18440
18440
  if (void 0 !== t.audio && null !== t.audio || (t.audio = !!e.capabilities.audio),
18441
18441
  void 0 !== t.video && null !== t.video || (t.video = !!e.capabilities.video), void 0 !== t.audio && 'object' !== (0,
18442
18442
  a.default)(t.audio) && 'boolean' != typeof t.audio && null !== t.audio || void 0 !== t.video && 'object' !== (0,
18443
18443
  a.default)(t.video) && 'boolean' != typeof t.video && null !== t.video) {
18444
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Invalid options type.'));
18444
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Invalid options type.'));
18445
18445
  }
18446
18446
  if (t.audio && !e.capabilities.audio || t.video && !e.capabilities.video) {
18447
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'options.audio/video cannot be true or an object if there is no audio/video track in remote stream.'));
18447
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'options.audio/video cannot be true or an object if there is no audio/video track in remote stream.'));
18448
18448
  }
18449
18449
  if (!1 === t.audio && !1 === t.video) {
18450
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Cannot subscribe a stream without audio and video.'));
18450
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Cannot subscribe a stream without audio and video.'));
18451
18451
  }
18452
18452
  this._options = t;
18453
18453
  var n = {};
18454
18454
  if (t.audio) {
18455
18455
  if ('object' === (0, a.default)(t.audio) && Array.isArray(t.audio.codecs) && 0 === t.audio.codecs.length) {
18456
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Audio codec cannot be an empty array.'));
18456
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Audio codec cannot be an empty array.'));
18457
18457
  }
18458
18458
  n.audio = {}, n.audio.from = e.id;
18459
18459
  } else {
@@ -18461,7 +18461,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18461
18461
  }
18462
18462
  if (t.video) {
18463
18463
  if ('object' === (0, a.default)(t.video) && Array.isArray(t.video.codecs) && 0 === t.video.codecs.length) {
18464
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Video codec cannot be an empty array.'));
18464
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Video codec cannot be an empty array.'));
18465
18465
  }
18466
18466
  n.video = {}, n.video.from = e.id, (t.video.resolution || t.video.frameRate || t.video.bitrateMultiplier && 1 !== t.video.bitrateMultiplier || t.video.keyFrameInterval) && (n.video.parameters = {
18467
18467
  resolution: t.video.resolution,
@@ -18508,7 +18508,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18508
18508
  })).catch((function(e) {
18509
18509
  r._unsubscribe(), r._rejectPromise(e), r._fireEndedEventOnPublicationOrSubscription();
18510
18510
  })), this._callbackTimer = setTimeout((function() {
18511
- r._unsubscribe(), r._rejectPromise(new b.IRtcError(y.ErrorCode.MESSAGE_TIMEOUT, 'Subscribe timeout!')),
18511
+ r._unsubscribe(), r._rejectPromise(new y.IRtcError(b.ErrorCode.MESSAGE_TIMEOUT, 'Subscribe timeout!')),
18512
18512
  r._fireEndedEventOnPublicationOrSubscription();
18513
18513
  }), 15e3), new Promise((function(e, t) {
18514
18514
  r._subscribePromise = {
@@ -18522,7 +18522,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18522
18522
  value: function(e) {
18523
18523
  if (this._callbackTimer && (clearTimeout(this._callbackTimer), this._callbackTimer = null),
18524
18524
  e) {
18525
- var t = new b.IRtcError(y.ErrorCode.DISCONNECTED, e);
18525
+ var t = new y.IRtcError(b.ErrorCode.DISCONNECTED, e);
18526
18526
  this._publishPromise && (this._publishPromise.reject(t), this._publishPromise = null);
18527
18527
  }
18528
18528
  if (!this._stopped) {
@@ -18543,7 +18543,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18543
18543
  value: function(e) {
18544
18544
  if (this._callbackTimer && (clearTimeout(this._callbackTimer), this._callbackTimer = null),
18545
18545
  e) {
18546
- var t = new b.IRtcError(y.ErrorCode.DISCONNECTED, e);
18546
+ var t = new y.IRtcError(b.ErrorCode.DISCONNECTED, e);
18547
18547
  this._subscribePromise && (this._subscribePromise.reject(t), this._subscribePromise = null);
18548
18548
  }
18549
18549
  this._stopped || (this._subscribedStream.mediaStream = void 0, this._stopped = !0,
@@ -18559,7 +18559,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18559
18559
  value: function(e, t, r) {
18560
18560
  var n = this;
18561
18561
  if (this._stopped) {
18562
- return Promise.reject(t ? new b.IRtcError(y.ErrorCode.INVALID_STATE, 'publication is stopped.') : new b.IRtcError(y.ErrorCode.INVALID_STATE, 'subscripition is stopped.'));
18562
+ return Promise.reject(t ? new y.IRtcError(b.ErrorCode.INVALID_STATE, 'publication is stopped.') : new y.IRtcError(b.ErrorCode.INVALID_STATE, 'subscripition is stopped.'));
18563
18563
  }
18564
18564
  var o = t ? 'stream-control' : 'subscription-control', i = e ? 'pause' : 'play';
18565
18565
  return new Promise((function(a, s) {
@@ -18576,7 +18576,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18576
18576
  }
18577
18577
  a();
18578
18578
  })).catch((function(e) {
18579
- d.default.warning('MCU returns negative ack for muteOrUnmute: ' + e), s(b.IRtcError.withCode(e, y.ErrorCode.SERVER_ERROR));
18579
+ d.default.warning('MCU returns negative ack for muteOrUnmute: ' + e), s(y.IRtcError.withCode(e, b.ErrorCode.SERVER_ERROR));
18580
18580
  }));
18581
18581
  }));
18582
18582
  }
@@ -18585,13 +18585,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18585
18585
  value: function(e) {
18586
18586
  var t = this;
18587
18587
  if (!this._pc || !this._publication) {
18588
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'Only publication support this method.'));
18588
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'Only publication support this method.'));
18589
18589
  }
18590
18590
  if (!this._publishedStream.upgradeable) {
18591
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'Only upgradeable stream support this method.'));
18591
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'Only upgradeable stream support this method.'));
18592
18592
  }
18593
18593
  if (this._stopped) {
18594
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'Peerconnection has already stopped.'));
18594
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'Peerconnection has already stopped.'));
18595
18595
  }
18596
18596
  var r = !1, n = !1;
18597
18597
  this._getPCSenders().forEach((function(o) {
@@ -18633,10 +18633,10 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18633
18633
  value: function(e, t) {
18634
18634
  var r = this;
18635
18635
  if (!this._pc || !this._publication) {
18636
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'Only publication support this method.'));
18636
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'Only publication support this method.'));
18637
18637
  }
18638
18638
  if (this._stopped) {
18639
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'Peerconnection has already stopped.'));
18639
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'Peerconnection has already stopped.'));
18640
18640
  }
18641
18641
  var n = this._publishedStream.media.audio.status, o = this._publishedStream.media.video.status;
18642
18642
  this._getPCSenders().forEach((function(i) {
@@ -18671,7 +18671,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18671
18671
  key: '_applyOptions',
18672
18672
  value: function(e) {
18673
18673
  if ('object' !== (0, a.default)(e) || 'object' !== (0, a.default)(e.video)) {
18674
- return Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_PARAMETER, 'Options should be an object.'));
18674
+ return Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_PARAMETER, 'Options should be an object.'));
18675
18675
  }
18676
18676
  var t = {};
18677
18677
  return t.resolution = e.video.resolution, t.framerate = e.video.frameRate, t.bitrate = e.video.bitrateMultiplier ? 'x' + e.video.bitrateMultiplier.toString() : void 0,
@@ -18710,8 +18710,8 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18710
18710
  }, {
18711
18711
  key: '_rejectPromise',
18712
18712
  value: function(e) {
18713
- e ? e instanceof b.IRtcError || (d.default.error('[' + this._internalId + ']PeerConnection operation failed:', e),
18714
- e = new b.IRtcError(y.ErrorCode.INTERNAL_ERROR, 'string' == typeof e ? e : e.message, e)) : e = new b.IRtcError(y.ErrorCode.TRANSPORT_UNKNOWN, 'Connection failed or closed.'),
18713
+ e ? e instanceof y.IRtcError || (d.default.error('[' + this._internalId + ']PeerConnection operation failed:', e),
18714
+ e = new y.IRtcError(b.ErrorCode.INTERNAL_ERROR, 'string' == typeof e ? e : e.message, e)) : e = new y.IRtcError(b.ErrorCode.TRANSPORT_UNKNOWN, 'Connection failed or closed.'),
18715
18715
  this._publishPromise ? (this._publishPromise.reject(e), this._publishPromise = void 0) : this._subscribePromise && (this._subscribePromise.reject(e),
18716
18716
  this._subscribePromise = void 0);
18717
18717
  }
@@ -18784,7 +18784,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18784
18784
  }, {
18785
18785
  key: '_getStats',
18786
18786
  value: function() {
18787
- return this._pc ? this._pc.getStats() : Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'PeerConnection is not available.'));
18787
+ return this._pc ? this._pc.getStats() : Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'PeerConnection is not available.'));
18788
18788
  }
18789
18789
  }, {
18790
18790
  key: '_deleteUnusedKey',
@@ -18830,7 +18830,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18830
18830
  o.forEach((function(a) {
18831
18831
  a.getStats().then((function(a) {
18832
18832
  e._convertWebrtcStatsToIrtcStats(a, n), ++i === o.length && (n.audio || n.video ? (e._pc.connectionState ? n.connectionState = e._pc.connectionState : n.connectionState = e._pc.iceConnectionState,
18833
- t(n)) : r(new b.IRtcError(y.ErrorCode.NOT_SUPPORTED, 'unsupported browser.')));
18833
+ t(n)) : r(new y.IRtcError(b.ErrorCode.NOT_SUPPORTED, 'unsupported browser.')));
18834
18834
  }));
18835
18835
  }));
18836
18836
  }
@@ -18839,11 +18839,11 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18839
18839
  a.forEach((function(o) {
18840
18840
  o.getStats().then((function(o) {
18841
18841
  e._convertWebrtcStatsToIrtcStats(o, n), ++s === a.length && (n.audio || n.video ? (e._pc.connectionState ? n.connectionState = e._pc.connectionState : n.connectionState = e._pc.iceConnectionState,
18842
- t(n)) : r(new b.IRtcError(y.ErrorCode.NOT_SUPPORTED, 'unsupported browser.')));
18842
+ t(n)) : r(new y.IRtcError(b.ErrorCode.NOT_SUPPORTED, 'unsupported browser.')));
18843
18843
  }));
18844
18844
  }));
18845
18845
  }
18846
- })) : Promise.reject(new b.IRtcError(y.ErrorCode.INVALID_STATE, 'PeerConnection is not available.'));
18846
+ })) : Promise.reject(new y.IRtcError(b.ErrorCode.INVALID_STATE, 'PeerConnection is not available.'));
18847
18847
  }
18848
18848
  }, {
18849
18849
  key: '_getPCSenders',
@@ -18926,13 +18926,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
18926
18926
  key: '_errorHandler',
18927
18927
  value: function(e, t) {
18928
18928
  d.default.error('[' + this._internalId + ']progress error from server: ' + e + ('number' == typeof t ? ' (code=' + t + ')' : ''));
18929
- var r = 'number' == typeof t ? t : y.ErrorCode.SERVER_ERROR, n = this._publishPromise || this._subscribePromise;
18929
+ var r = 'number' == typeof t ? t : b.ErrorCode.SERVER_ERROR, n = this._publishPromise || this._subscribePromise;
18930
18930
  if (n) {
18931
- n.reject(new b.IRtcError(r, e));
18931
+ n.reject(new y.IRtcError(r, e));
18932
18932
  } else {
18933
18933
  var o = this._publication || this._subscription;
18934
18934
  if (o) {
18935
- var i = new b.IRtcError(r, e), a = new p.ErrorEvent('error', {
18935
+ var i = new y.IRtcError(r, e), a = new p.ErrorEvent('error', {
18936
18936
  error: i
18937
18937
  });
18938
18938
  o.dispatchEvent(a), this._fireEndedEventOnPublicationOrSubscription();
@@ -19153,7 +19153,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19153
19153
  value: !0
19154
19154
  }), r.ConferenceClient = void 0;
19155
19155
  var i = n(e('@babel/runtime/helpers/typeof')), a = (n(e('@babel/runtime/helpers/createClass')),
19156
- n(e('@babel/runtime/helpers/classCallCheck')), S(e('../base/event.js'))), s = e('./signaling.js'), u = n(e('../base/logger.js')), c = e('../base/base64.js'), l = e('./hostinfo.js'), f = e('../base/errorCode.js'), d = e('../base/IRtcError.js'), p = S(e('../base/utils.js')), h = S(e('../base/stream.js')), v = e('./participant.js'), m = e('./recording.js'), y = e('./playing.js'), b = S(e('./sip.js')), g = e('./info.js'), E = e('./channel.js'), w = e('./mixedstream.js'), _ = S(e('./streamutils.js')), R = e('./whiteboard.js');
19156
+ n(e('@babel/runtime/helpers/classCallCheck')), S(e('../base/event.js'))), s = e('./signaling.js'), u = n(e('../base/logger.js')), c = e('../base/base64.js'), l = e('./hostinfo.js'), f = e('../base/errorCode.js'), d = e('../base/IRtcError.js'), p = S(e('../base/utils.js')), h = S(e('../base/stream.js')), v = e('./participant.js'), m = e('./recording.js'), b = e('./playing.js'), y = S(e('./sip.js')), g = e('./info.js'), E = e('./channel.js'), w = e('./mixedstream.js'), _ = S(e('./streamutils.js')), R = e('./whiteboard.js');
19157
19157
  function S(e, t) {
19158
19158
  if ('function' == typeof WeakMap) {
19159
19159
  var r = new WeakMap, n = new WeakMap;
@@ -19259,7 +19259,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19259
19259
  };
19260
19260
  r.ConferenceClient = function(e, t) {
19261
19261
  Object.setPrototypeOf(this, new a.EventDispatcher);
19262
- var r, n, o, S = (e = e || {}) && e.rtcConfiguration, k = this, O = A.READY, j = t || new s.SioSignaling, x = new Map, M = new Map, N = new Array, D = new Array, L = new Map, B = new Map, U = void 0, V = new Map, F = new Map, W = [], q = [], Y = function(e) {
19262
+ var r, n, o, S = (e = e || {}) && e.rtcConfiguration, k = this, O = A.READY, j = t || new s.SioSignaling, x = new Map, M = new Map, N = new Array, D = new Array, L = new Map, B = void 0, U = new Map, V = new Map, F = [], W = [], q = function(e) {
19263
19263
  if ('string' == typeof e) {
19264
19264
  var t = e.trim();
19265
19265
  return t ? [ t ] : [];
@@ -19269,18 +19269,18 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19269
19269
  })).map((function(e) {
19270
19270
  return e.trim();
19271
19271
  })) : [];
19272
- }, H = function() {
19272
+ }, Y = function() {
19273
19273
  return Array.isArray(S && S.iceServers) && S.iceServers.some((function(e) {
19274
- return e && Y(e.urls).length > 0;
19274
+ return e && q(e.urls).length > 0;
19275
19275
  }));
19276
19276
  };
19277
- function z(t) {
19277
+ function H(t) {
19278
19278
  if (t && t.username && t.credential) {
19279
- if (H()) {
19279
+ if (Y()) {
19280
19280
  var r = [];
19281
19281
  return S.iceServers.forEach((function(e, n) {
19282
19282
  if (e) {
19283
- var o = Y(e.urls);
19283
+ var o = q(e.urls);
19284
19284
  if (0 !== o.length) {
19285
19285
  var i = Object.assign({}, e, {
19286
19286
  urls: o
@@ -19296,7 +19296,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19296
19296
  iceServers: r
19297
19297
  }));
19298
19298
  }
19299
- var n = q;
19299
+ var n = W;
19300
19300
  0 !== n.length ? (e.rtcConfiguration = Object.assign({}, e.rtcConfiguration, {
19301
19301
  iceServers: [ {
19302
19302
  urls: n,
@@ -19308,10 +19308,10 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19308
19308
  u.default.trace('ICE credentials are incomplete, keeping current ICE configuration');
19309
19309
  }
19310
19310
  }
19311
- function K() {
19311
+ function z() {
19312
19312
  return O == A.CONNECTED;
19313
19313
  }
19314
- function G(e, t) {
19314
+ function K(e, t) {
19315
19315
  if ('soac' === e || 'progress' === e) {
19316
19316
  if ('progress' === e && 'recording' === t.type) {
19317
19317
  return void function(e) {
@@ -19339,13 +19339,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19339
19339
  }
19340
19340
  }(t);
19341
19341
  }
19342
- if (!B.has(t.id)) {
19342
+ if (!L.has(t.id)) {
19343
19343
  return void u.default.warning('Cannot find a channel for incoming data.', t);
19344
19344
  }
19345
- B.get(t.id).onMessage(e, t);
19345
+ L.get(t.id).onMessage(e, t);
19346
19346
  } else {
19347
19347
  'stream' === e ? 'add' === t.status ? function(e) {
19348
- var t = Q(e);
19348
+ var t = G(e);
19349
19349
  x.set(t.id, t);
19350
19350
  var r = new h.StreamEvent('streamadded', {
19351
19351
  stream: t
@@ -19374,7 +19374,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19374
19374
  } else {
19375
19375
  u.default.warning('Cannot find specific remote stream.', e.id);
19376
19376
  }
19377
- }(t) : 'audio.status' === t.data.field || 'video.status' === t.data.field ? B.forEach((function(r) {
19377
+ }(t) : 'audio.status' === t.data.field || 'video.status' === t.data.field ? L.forEach((function(r) {
19378
19378
  r.onMessage(e, t);
19379
19379
  })) : 'activeInput' === t.data.field ? function(e) {
19380
19380
  if (x.has(e.id)) {
@@ -19414,58 +19414,10 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19414
19414
  }
19415
19415
  }(t.data.value) : 'progress' === t.data.field ? function(e, t) {
19416
19416
  if (x.has(e)) {
19417
- var r = x.get(e), n = t.value, o = Number(n.mediaTimestamp), i = new y.PlayingProgressInfo(n.playingProgress, e, n.currentFile, Number(n.currentFileIndex), Number(n.repeatCount), n.lastFile), a = new h.PlayingProgressEvent({
19418
- info: i
19419
- }), s = Number(n.rtpTimestamp);
19420
- if ('switched' === n.playingProgress && Number.isFinite(s)) {
19421
- !function(e, t, r) {
19422
- var n = J(e), o = $(n) || 48e3, i = performance.now() + 3e5, a = function() {
19423
- var s = X(n);
19424
- if (void 0 !== s) {
19425
- var c = r - s | 0;
19426
- if (u.default.log('[playingProgress] rtpTimestamp:', s, 'switchRtpTimestamp:', r, 'remainSamples:', c, 'clockRate:', o),
19427
- c <= 0 || c > 30 * o || performance.now() > i) {
19428
- e.dispatchEvent(t);
19429
- } else {
19430
- var l = c / o * 1e3;
19431
- setTimeout(a, Math.max(10, Math.min(1e3, l)));
19432
- }
19433
- } else {
19434
- e.dispatchEvent(t);
19435
- }
19436
- };
19437
- a();
19438
- }(r, a, s);
19439
- } else {
19440
- 'started' === n.playingProgress && function(e) {
19441
- var t = {
19442
- anchorRtpTs: void 0,
19443
- clockRate: 48e3
19444
- };
19445
- L.set(e, t);
19446
- var r = performance.now(), n = function() {
19447
- var i = J(x.get(e)), a = X(i);
19448
- if (void 0 !== a) {
19449
- return t.anchorRtpTs = a, void (t.clockRate = $(i));
19450
- }
19451
- performance.now() - r < 5e3 && setTimeout(n, 50);
19452
- };
19453
- n();
19454
- }(e);
19455
- var c = L.get(e);
19456
- 'switched' === n.playingProgress && Number.isFinite(o) && c && void 0 !== c.anchorRtpTs ? function(e, t, r, n) {
19457
- var o = J(e), i = performance.now() + 3e5, a = function() {
19458
- var s = X(o);
19459
- if (void 0 !== s) {
19460
- var c = (s - r.anchorRtpTs | 0) / (r.clockRate || 48e3) * 1e3, l = n - c;
19461
- l <= 0 || performance.now() > i ? e.dispatchEvent(t) : setTimeout(a, Math.max(10, Math.min(1e3, l)));
19462
- } else {
19463
- e.dispatchEvent(t);
19464
- }
19465
- };
19466
- a();
19467
- }(r, a, c, o) : r.dispatchEvent(a);
19468
- }
19417
+ var r = x.get(e), n = t.value, o = new b.PlayingProgressInfo(n.playingProgress, e, n.currentFile, Number(n.currentFileIndex), Number(n.repeatCount), n.lastFile), i = new h.PlayingProgressEvent({
19418
+ info: o
19419
+ });
19420
+ r.dispatchEvent(i);
19469
19421
  } else {
19470
19422
  u.default.warning('Cannot find specific remote stream.', e);
19471
19423
  }
@@ -19535,16 +19487,16 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19535
19487
  }(t) : 'coshow' === e ? function(e) {
19536
19488
  if ('add' === e.type) {
19537
19489
  var t = e.whiteboard.id, r = e.whiteboard.owner, n = e.whiteboard.name, o = e.whiteboard.path, i = e.whiteboard.attributes, s = new R.Whiteboard(t, r, n, o, i);
19538
- V.set(s.id, s);
19490
+ U.set(s.id, s);
19539
19491
  var u = new P('whiteboardadded', {
19540
19492
  whiteboard: s
19541
19493
  });
19542
19494
  k.dispatchEvent(u);
19543
19495
  } else if ('remove' === e.type) {
19544
- var c = e.whiteboard.id, l = V.get(c);
19545
- V.delete(c), l.dispatchEvent(new a.IRtcEvent('remove'));
19496
+ var c = e.whiteboard.id, l = U.get(c);
19497
+ U.delete(c), l.dispatchEvent(new a.IRtcEvent('remove'));
19546
19498
  } else if ('update' === e.type) {
19547
- var f = e.whiteboard.id, d = e.data, p = F.get(f);
19499
+ var f = e.whiteboard.id, d = e.data, p = V.get(f);
19548
19500
  p && p.contentWindow && p.contentWindow.onUpdate && p.contentWindow.onUpdate(d);
19549
19501
  }
19550
19502
  }(t) : 'custom' === e ? function(e) {
@@ -19558,72 +19510,33 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19558
19510
  }
19559
19511
  }(t) : 'sip' === e && function(e) {
19560
19512
  if ('incoming-call' === e.event) {
19561
- var t = new b.SipIncomingInfo(e.id, e.message.peerURI, e.message.audio, e.message.video, e.message.calleeID, e.message.extraInfo.xHeaders), r = new b.SipIncomingEvent(t);
19513
+ var t = new y.SipIncomingInfo(e.id, e.message.peerURI, e.message.audio, e.message.video, e.message.calleeID, e.message.extraInfo.xHeaders), r = new y.SipIncomingEvent(t);
19562
19514
  k.dispatchEvent(r);
19563
19515
  } else if ('incoming-call-cancelled' === e.event) {
19564
- var n = new b.SipIncomingCancelInfo(e.id, e.message.peerURI), o = new b.SipIncomingCancelEvent(n);
19516
+ var n = new y.SipIncomingCancelInfo(e.id, e.message.peerURI), o = new y.SipIncomingCancelEvent(n);
19565
19517
  k.dispatchEvent(o);
19566
19518
  } else if ('call-closed' === e.event) {
19567
- var i = new b.SipCallClosedInfo(e.id, e.message.peerURI), a = new b.SipCallClosedEvent(i);
19519
+ var i = new y.SipCallClosedInfo(e.id, e.message.peerURI), a = new y.SipCallClosedEvent(i);
19568
19520
  k.dispatchEvent(a);
19569
19521
  } else if ('registered-ok' === e.event) {
19570
- var s = new b.SipRegisteredInfo(e.message.user, e.message.server), u = new b.SipRegisteredOkEvent(s);
19522
+ var s = new y.SipRegisteredInfo(e.message.user, e.message.server), u = new y.SipRegisteredOkEvent(s);
19571
19523
  k.dispatchEvent(u);
19572
19524
  } else if ('registered-failed' === e.event) {
19573
- var c = new b.SipRegisteredInfo(e.message.user, e.message.server), l = new b.SipRegisteredFailedEvent(c);
19525
+ var c = new y.SipRegisteredInfo(e.message.user, e.message.server), l = new y.SipRegisteredFailedEvent(c);
19574
19526
  k.dispatchEvent(l);
19575
19527
  } else if ('dtmf' === e.event) {
19576
19528
  var f = void 0;
19577
19529
  void 0 !== e.message.end && (f = 1 === e.message.end);
19578
- var d = new b.SipDTMFInfo(e.id, e.message.type, e.message.peerId, e.message.duration, String.fromCharCode(e.message.key), f), p = new b.SipDTMFEvent(d);
19530
+ var d = new y.SipDTMFInfo(e.id, e.message.type, e.message.peerId, e.message.duration, String.fromCharCode(e.message.key), f), p = new y.SipDTMFEvent(d);
19579
19531
  k.dispatchEvent(p);
19580
19532
  } else if ('call-update' === e.event) {
19581
- var h = new b.SipUpdateInfo(e.id, e.message.update.audio, e.message.update.audio_dir, e.message.update.audio_codec, e.message.update.video, e.message.update.video_dir, e.message.update.video_codec, e.message.update.reason), v = new b.SipCallUpdateEvent(h);
19533
+ var h = new y.SipUpdateInfo(e.id, e.message.update.audio, e.message.update.audio_dir, e.message.update.audio_codec, e.message.update.video, e.message.update.video_dir, e.message.update.video_codec, e.message.update.reason), v = new y.SipCallUpdateEvent(h);
19582
19534
  k.dispatchEvent(v);
19583
19535
  }
19584
19536
  }(t);
19585
19537
  }
19586
19538
  }
19587
- function J(e) {
19588
- if (e && e.mediaStream) {
19589
- var t = e.mediaStream.getAudioTracks()[0] || e.mediaStream.getVideoTracks()[0];
19590
- if (t) {
19591
- for (var r = 0, n = D; r < n.length; r++) {
19592
- var o = n[r], i = o && o._pc;
19593
- if (i && 'function' == typeof i.getReceivers) {
19594
- var a = i.getReceivers().find((function(e) {
19595
- return e.track === t;
19596
- }));
19597
- if (a) {
19598
- return a;
19599
- }
19600
- }
19601
- }
19602
- }
19603
- }
19604
- }
19605
- function $(e) {
19606
- try {
19607
- var t = e.getParameters && e.getParameters();
19608
- if (t && t.codecs && t.codecs.length > 0 && t.codecs[0].clockRate) {
19609
- return t.codecs[0].clockRate;
19610
- }
19611
- } catch (e) {}
19612
- return 48e3;
19613
- }
19614
- function X(e) {
19615
- if (e && 'function' == typeof e.getSynchronizationSources) {
19616
- try {
19617
- var t = (e.getSynchronizationSources() || []).find((function(e) {
19618
- return e && void 0 !== e.rtpTimestamp;
19619
- }));
19620
- return t && t.rtpTimestamp;
19621
- } catch (e) {
19622
- return;
19623
- }
19624
- }
19625
- }
19626
- function Q(e) {
19539
+ function G(e) {
19627
19540
  if ('mixed' === e.type) {
19628
19541
  return new w.RemoteMixedStream(e);
19629
19542
  }
@@ -19645,12 +19558,12 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19645
19558
  return n.settings = _.convertToPublicationSettings(e.media), n.capabilities = _.convertToSubscriptionCapabilities(e.media),
19646
19559
  n;
19647
19560
  }
19648
- function Z(e, t, r) {
19561
+ function J(e, t, r) {
19649
19562
  return j.send(e, t, r);
19650
19563
  }
19651
- function ee() {
19564
+ function $() {
19652
19565
  var t = Object.create(a.EventDispatcher);
19653
- t.sendSignalingMessage = Z;
19566
+ t.sendSignalingMessage = J;
19654
19567
  var r = function() {
19655
19568
  t.onreconnected && t.onreconnected();
19656
19569
  };
@@ -19659,40 +19572,40 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19659
19572
  };
19660
19573
  var n = new E.ConferencePeerConnectionChannel(e, t);
19661
19574
  return n.addEventListener('id', (function(e) {
19662
- B.set(e.message, n);
19575
+ L.set(e.message, n);
19663
19576
  })), n.addEventListener('ended', (function() {
19664
- B.forEach((function(e, t) {
19665
- e == n && B.delete(t);
19577
+ L.forEach((function(e, t) {
19578
+ e == n && L.delete(t);
19666
19579
  }));
19667
19580
  })), n;
19668
19581
  }
19669
- function te() {
19582
+ function X() {
19670
19583
  r && (clearInterval(r), r = void 0), N.forEach((function(e) {
19671
19584
  e._unpublish('server disconnected');
19672
19585
  })), N.splice(0, N.length), D.forEach((function(e) {
19673
19586
  e._unsubscribe('server disconnected');
19674
- })), D.splice(0, D.length), W.forEach((function(e) {
19587
+ })), D.splice(0, D.length), F.forEach((function(e) {
19675
19588
  k.stopWhiteboard(e);
19676
- })), W.splice(0, W.length), M.clear(), x.clear(), V.clear(), F.clear();
19589
+ })), F.splice(0, F.length), M.clear(), x.clear(), U.clear(), V.clear();
19677
19590
  }
19678
19591
  j.addEventListener('data', (function(e) {
19679
- G(e.message.notification, e.message.data);
19592
+ K(e.message.notification, e.message.data);
19680
19593
  })), j.addEventListener('reconnecting', (function(e) {
19681
19594
  k.dispatchEvent(new a.ReconnectingEvent('serverreconnecting', e.attempt));
19682
19595
  })), j.addEventListener('reconnected', (function() {
19683
19596
  k.dispatchEvent(new a.IRtcEvent('serverreconnected'));
19684
19597
  })), j.addEventListener('disconnect', (function() {
19685
- te(), O = A.READY, k.dispatchEvent(new a.IRtcEvent('serverdisconnected'));
19598
+ X(), O = A.READY, k.dispatchEvent(new a.IRtcEvent('serverdisconnected'));
19686
19599
  })), Object.defineProperty(this, 'info', {
19687
19600
  configurable: !1,
19688
19601
  get: function() {
19689
- return o ? new g.ConferenceInfo(o.id, Array.from(M.values()), Array.from(x.values()), Array.from(V.values()), n) : null;
19602
+ return o ? new g.ConferenceInfo(o.id, Array.from(M.values()), Array.from(x.values()), Array.from(U.values()), n) : null;
19690
19603
  }
19691
19604
  }), this.setHostInfo = function(e) {
19692
19605
  if (!(e instanceof l.HostInfo)) {
19693
19606
  return Promise.reject(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'Invalid info.'));
19694
19607
  }
19695
- U = e;
19608
+ B = e;
19696
19609
  }, this.join = function(e) {
19697
19610
  return new Promise((function(t, a) {
19698
19611
  var s;
@@ -19703,34 +19616,34 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19703
19616
  }
19704
19617
  if (s && 'object' === (0, i.default)(s)) {
19705
19618
  var h = !0 === s.secure, m = s.room;
19706
- q = Y(s.iceServers);
19707
- var y = s.host;
19708
- if ('string' == typeof y) {
19709
- if (-1 === y.indexOf('http') && (y = h ? 'https://' + y : 'http://' + y), O === A.READY) {
19619
+ W = q(s.iceServers);
19620
+ var b = s.host;
19621
+ if ('string' == typeof b) {
19622
+ if (-1 === b.indexOf('http') && (b = h ? 'https://' + b : 'http://' + b), O === A.READY) {
19710
19623
  O = A.CONNECTING;
19711
- var b = {
19624
+ var y = {
19712
19625
  token: e,
19713
19626
  userAgent: p.sysInfo(),
19714
19627
  protocol: '1.0',
19715
19628
  hostInfo: {}
19716
19629
  };
19717
- if (U && U instanceof l.HostInfo) {
19718
- if (U.ip && (b.hostInfo.ip = U.ip), U.location) {
19630
+ if (B && B instanceof l.HostInfo) {
19631
+ if (B.ip && (y.hostInfo.ip = B.ip), B.location) {
19719
19632
  var E = {};
19720
- void 0 !== U.location.lat && (E.lat = U.location.lat), void 0 !== U.location.lng && (E.lng = U.location.lng),
19721
- b.hostInfo.location = E;
19633
+ void 0 !== B.location.lat && (E.lat = B.location.lat), void 0 !== B.location.lng && (E.lng = B.location.lng),
19634
+ y.hostInfo.location = E;
19722
19635
  }
19723
- if (U.address) {
19636
+ if (B.address) {
19724
19637
  var w = {};
19725
- void 0 !== U.address.nation && (w.nation = U.address.nation), void 0 !== U.address.province && (w.province = U.address.province),
19726
- void 0 !== U.address.city && (w.city = U.address.city), void 0 !== U.address.district && (w.district = U.address.district),
19727
- void 0 !== U.address.code && (w.code = U.address.code), b.hostInfo.address = w;
19638
+ void 0 !== B.address.nation && (w.nation = B.address.nation), void 0 !== B.address.province && (w.province = B.address.province),
19639
+ void 0 !== B.address.city && (w.city = B.address.city), void 0 !== B.address.district && (w.district = B.address.district),
19640
+ void 0 !== B.address.code && (w.code = B.address.code), y.hostInfo.address = w;
19728
19641
  }
19729
19642
  }
19730
- j.connect(y, h, b, m).then((function(e) {
19731
- if (O = A.CONNECTED, z(e.ice), e.ice && e.ice.lifetime >= 20 && (r = setInterval((function() {
19732
- Z('refreshIceLoginCredential').then((function(e) {
19733
- z(e);
19643
+ j.connect(b, h, y, m).then((function(e) {
19644
+ if (O = A.CONNECTED, H(e.ice), e.ice && e.ice.lifetime >= 20 && (r = setInterval((function() {
19645
+ J('refreshIceLoginCredential').then((function(e) {
19646
+ H(e);
19734
19647
  })).catch((function(e) {
19735
19648
  u.default.warning('refresh ice login credential failed', e);
19736
19649
  }));
@@ -19740,7 +19653,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19740
19653
  try {
19741
19654
  for (s.s(); !(i = s.n()).done; ) {
19742
19655
  var c = i.value;
19743
- 'mixed' === c.type && (c.viewport = c.info.label), x.set(c.id, Q(c));
19656
+ 'mixed' === c.type && (c.viewport = c.info.label), x.set(c.id, G(c));
19744
19657
  }
19745
19658
  } catch (e) {
19746
19659
  s.e(e);
@@ -19762,19 +19675,19 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19762
19675
  }
19763
19676
  }
19764
19677
  if (o.whiteboards) {
19765
- var m, y = C(o.whiteboards);
19678
+ var m, b = C(o.whiteboards);
19766
19679
  try {
19767
- for (y.s(); !(m = y.n()).done; ) {
19768
- var b = m.value;
19769
- V.set(b.id, new R.Whiteboard(b.id, b.owner, b.name, b.path, b.attributes));
19680
+ for (b.s(); !(m = b.n()).done; ) {
19681
+ var y = m.value;
19682
+ U.set(y.id, new R.Whiteboard(y.id, y.owner, y.name, y.path, y.attributes));
19770
19683
  }
19771
19684
  } catch (e) {
19772
- y.e(e);
19685
+ b.e(e);
19773
19686
  } finally {
19774
- y.f();
19687
+ b.f();
19775
19688
  }
19776
19689
  }
19777
- t(new g.ConferenceInfo(o.id, Array.from(M.values()), Array.from(x.values()), Array.from(V.values()), n));
19690
+ t(new g.ConferenceInfo(o.id, Array.from(M.values()), Array.from(x.values()), Array.from(U.values()), n));
19778
19691
  } else {
19779
19692
  a(new d.IRtcError(f.ErrorCode.SERVER_ERROR, 'Invalid room.'));
19780
19693
  }
@@ -19792,13 +19705,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19792
19705
  }
19793
19706
  }));
19794
19707
  }, this.publish = function(e, t) {
19795
- if (!K()) {
19708
+ if (!z()) {
19796
19709
  return Promise.reject(new d.IRtcError(f.ErrorCode.DISCONNECTED, 'Conference server is not connected.'));
19797
19710
  }
19798
19711
  if (!(e instanceof h.LocalStream)) {
19799
19712
  return Promise.reject(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'Invalid stream.'));
19800
19713
  }
19801
- var r = ee();
19714
+ var r = $();
19802
19715
  return N.push(r), r.addEventListener('ended', (function() {
19803
19716
  var e = N.indexOf(r);
19804
19717
  e > -1 && N.splice(e, 1);
@@ -19810,13 +19723,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19810
19723
  if (e.subscribe) {
19811
19724
  return Promise.reject(new d.IRtcError(f.ErrorCode.ALREADY_SUBSCRIBED, 'stream is already in subscribe.'));
19812
19725
  }
19813
- if (e.subscribe = !0, !K()) {
19726
+ if (e.subscribe = !0, !z()) {
19814
19727
  return delete e.subscribe, Promise.reject(new d.IRtcError(f.ErrorCode.DISCONNECTED, 'Conference server is not connected.'));
19815
19728
  }
19816
19729
  if (!(e instanceof h.RemoteStream)) {
19817
19730
  return delete e.subscribe, Promise.reject(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'Invalid stream.'));
19818
19731
  }
19819
- var r = ee();
19732
+ var r = $();
19820
19733
  return D.push(r), r.addEventListener('ended', (function() {
19821
19734
  var e = D.indexOf(r);
19822
19735
  e > -1 && D.splice(e, 1);
@@ -19828,13 +19741,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19828
19741
  }));
19829
19742
  }));
19830
19743
  }, this.send = function(e, t) {
19831
- return K() ? (void 0 === t && (t = 'all'), Z('text', {
19744
+ return z() ? (void 0 === t && (t = 'all'), J('text', {
19832
19745
  to: t,
19833
19746
  message: e
19834
19747
  })) : Promise.reject(new d.IRtcError(f.ErrorCode.DISCONNECTED, 'Conference server is not connected.'));
19835
19748
  }, this.createWhiteboard = function(e, t, r) {
19836
19749
  return new Promise((function(o, i) {
19837
- return K() ? 'string' != typeof e ? i(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'name should be a string.')) : 'string' != typeof t ? i(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'path should be a string.')) : void Z('coshow', {
19750
+ return z() ? 'string' != typeof e ? i(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'name should be a string.')) : 'string' != typeof t ? i(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'path should be a string.')) : void J('coshow', {
19838
19751
  name: e,
19839
19752
  path: t,
19840
19753
  attributes: r,
@@ -19848,20 +19761,20 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19848
19761
  }));
19849
19762
  }, this.startWhiteboard = function(e, t) {
19850
19763
  return new Promise((function(r, o) {
19851
- return K() ? t instanceof R.Whiteboard ? 'string' != typeof e ? o(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'hostname should be a string.')) : void Z('coshow', {
19764
+ return z() ? t instanceof R.Whiteboard ? 'string' != typeof e ? o(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'hostname should be a string.')) : void J('coshow', {
19852
19765
  id: t.id,
19853
19766
  action: 'start'
19854
19767
  }).then((function(o) {
19855
- W.push(V.get(t.id));
19768
+ F.push(U.get(t.id));
19856
19769
  var i, a = document.createElement('iframe'), s = o.path, c = e.endsWith('/'), l = s.startsWith('/');
19857
19770
  i = c && l ? ''.concat(e).concat(s.substring(1)) : c || l ? ''.concat(e).concat(s) : ''.concat(e, '/').concat(s),
19858
- a.src = i, a.height = '100%', a.width = '100%', a.id = o.id, F.set(o.id, a), a.onStart = !0,
19771
+ a.src = i, a.height = '100%', a.width = '100%', a.id = o.id, V.set(o.id, a), a.onStart = !0,
19859
19772
  window[o.id] = function(e) {
19860
19773
  var r = JSON.parse(e);
19861
19774
  'load' === r.method ? a.contentWindow.onStart({
19862
19775
  owner: t.owner,
19863
19776
  user: n.id
19864
- }) : 'update' === r.method ? Z('coshow', {
19777
+ }) : 'update' === r.method ? J('coshow', {
19865
19778
  id: t.id,
19866
19779
  action: 'update',
19867
19780
  data: r.data
@@ -19877,41 +19790,41 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
19877
19790
  }));
19878
19791
  }, this.snapshot = function(e) {
19879
19792
  return new Promise((function(t, r) {
19880
- if (!K()) {
19793
+ if (!z()) {
19881
19794
  return r(new d.IRtcError(f.ErrorCode.DISCONNECTED, 'Conference server is not connected.'));
19882
19795
  }
19883
19796
  if (!(e instanceof R.Whiteboard)) {
19884
19797
  return r(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'whiteboard should be Whiteboard type.'));
19885
19798
  }
19886
- var n = e.id, o = F.get(n);
19799
+ var n = e.id, o = V.get(n);
19887
19800
  o.contentWindow.onSnapshot ? (o.snapshotCallback || (o.snapshotCallback = []), o.snapshotCallback.push(t),
19888
19801
  o.contentWindow.onSnapshot()) : r(new d.IRtcError(f.ErrorCode.NOT_SUPPORTED, 'whiteboard does not support snapshot.'));
19889
19802
  }));
19890
19803
  }, this.stopWhiteboard = function(e) {
19891
19804
  return new Promise((function(t, r) {
19892
- return K() ? e instanceof R.Whiteboard ? void Z('coshow', {
19805
+ return z() ? e instanceof R.Whiteboard ? void J('coshow', {
19893
19806
  id: e.id,
19894
19807
  action: 'stop'
19895
19808
  }).then((function(r) {
19896
- W.includes(V.get(e.id)) && W.splice(W.indexOf(V.get(e.id)), 1), F.get(r.id) && F.delete(r.id),
19897
- t(V.get(r.id));
19809
+ F.includes(U.get(e.id)) && F.splice(F.indexOf(U.get(e.id)), 1), V.get(r.id) && V.delete(r.id),
19810
+ t(U.get(r.id));
19898
19811
  })).catch((function(e) {
19899
19812
  u.default.info(e), r(d.IRtcError.withCode(e, f.ErrorCode.SERVER_ERROR));
19900
19813
  })) : r(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'whiteboard should be Whiteboard type.')) : r(new d.IRtcError(f.ErrorCode.DISCONNECTED, 'Conference server is not connected.'));
19901
19814
  }));
19902
19815
  }, this.removeWhiteboard = function(e) {
19903
19816
  return new Promise((function(t, r) {
19904
- return K() ? e instanceof R.Whiteboard ? void Z('coshow', {
19817
+ return z() ? e instanceof R.Whiteboard ? void J('coshow', {
19905
19818
  id: e.id,
19906
19819
  action: 'remove'
19907
19820
  }).then((function(e) {
19908
- t(V.get(e.id));
19821
+ t(U.get(e.id));
19909
19822
  })).catch((function(e) {
19910
19823
  u.default.info(e), r(d.IRtcError.withCode(e, f.ErrorCode.SERVER_ERROR));
19911
19824
  })) : r(new d.IRtcError(f.ErrorCode.INVALID_PARAMETER, 'whiteboard should be Whiteboard type.')) : r(new d.IRtcError(f.ErrorCode.DISCONNECTED, 'Conference server is not connected.'));
19912
19825
  }));
19913
19826
  }, this.leave = function() {
19914
- return te(), j.disconnect().then((function() {
19827
+ return X(), j.disconnect().then((function() {
19915
19828
  O = A.READY;
19916
19829
  }));
19917
19830
  };
@@ -20285,12 +20198,12 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20285
20198
  Object.defineProperty(r, '__esModule', {
20286
20199
  value: !0
20287
20200
  }), r.SioSignaling = void 0;
20288
- var i = n(e('@babel/runtime/helpers/classCallCheck')), a = n(e('@babel/runtime/helpers/createClass')), s = n(e('@babel/runtime/helpers/possibleConstructorReturn')), u = n(e('@babel/runtime/helpers/getPrototypeOf')), c = n(e('@babel/runtime/helpers/inherits')), l = n(e('../base/logger.js')), f = b(e('../base/event.js')), d = e('../base/errorCode.js'), p = e('../base/IRtcError.js'), h = b(e('../base/utils.js')), v = e('../base/base64.js'), m = n(e('../../dependencies/socket.io.js')), y = n(e('../../dependencies/weapp.socket.io.js'));
20289
- function b(e, t) {
20201
+ var i = n(e('@babel/runtime/helpers/classCallCheck')), a = n(e('@babel/runtime/helpers/createClass')), s = n(e('@babel/runtime/helpers/possibleConstructorReturn')), u = n(e('@babel/runtime/helpers/getPrototypeOf')), c = n(e('@babel/runtime/helpers/inherits')), l = n(e('../base/logger.js')), f = y(e('../base/event.js')), d = e('../base/errorCode.js'), p = e('../base/IRtcError.js'), h = y(e('../base/utils.js')), v = e('../base/base64.js'), m = n(e('../../dependencies/socket.io.js')), b = n(e('../../dependencies/weapp.socket.io.js'));
20202
+ function y(e, t) {
20290
20203
  if ('function' == typeof WeakMap) {
20291
20204
  var r = new WeakMap, n = new WeakMap;
20292
20205
  }
20293
- return (b = function(e, t) {
20206
+ return (y = function(e, t) {
20294
20207
  if (!t && e && e.__esModule) {
20295
20208
  return e;
20296
20209
  }
@@ -20417,9 +20330,9 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20417
20330
  v.forceNew && 'boolean' == typeof v.forceNew && (c.forceNew = v.forceNew), v.timeout && 'number' == typeof v.timeout && v.timeout !== 1 / 0 && !isNaN(v.timeout) && (c.timeout = v.timeout),
20418
20331
  v.transports) {
20419
20332
  h.isString(v.transports) ? s.push(v.transports) : h.isArray(v.transports) ? s = v.transports : l.default.error('transports is error:' + v.transports);
20420
- for (var b = 0; b < s.length; b++) {
20421
- i.indexOf(s[b]) < 0 && (l.default.error('unsupported transports:' + s[b]), s.splice(b, 1),
20422
- b--);
20333
+ for (var y = 0; y < s.length; y++) {
20334
+ i.indexOf(s[y]) < 0 && (l.default.error('unsupported transports:' + s[y]), s.splice(y, 1),
20335
+ y--);
20423
20336
  }
20424
20337
  s.length > 0 && (c.transports = s);
20425
20338
  }
@@ -20429,7 +20342,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20429
20342
  }))), v.query && v.query.servicePath && 'string' == typeof v.query.servicePath || (c.query.servicePath = '_zms_portal'),
20430
20343
  n && (c.query.roomId = n), o._config = c;
20431
20344
  }
20432
- 'weapp' === h.sysInfo().runtime.name ? o._socket = (0, y.default)(e, c) : o._socket = (0,
20345
+ 'weapp' === h.sysInfo().runtime.name ? o._socket = (0, b.default)(e, c) : o._socket = (0,
20433
20346
  m.default)(e, c), [ 'participant', 'text', 'stream', 'progress', 'asr', 'speaking', 'coshow', 'custom', 'sip' ].forEach((function(e) {
20434
20347
  o._socket.on(e, (function(t) {
20435
20348
  o.dispatchEvent(new f.MessageEvent('data', {
@@ -20681,8 +20594,8 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20681
20594
  var v, m = c(e.video.optional.format);
20682
20595
  try {
20683
20596
  for (m.s(); !(v = m.n()).done; ) {
20684
- var y = v.value, b = new a.VideoCodecParameters(y.codec, y.profile);
20685
- h.push(b);
20597
+ var b = v.value, y = new a.VideoCodecParameters(b.codec, b.profile);
20598
+ h.push(y);
20686
20599
  }
20687
20600
  } catch (e) {
20688
20601
  m.e(e);
@@ -20857,13 +20770,13 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20857
20770
  return !!e;
20858
20771
  }() ? Reflect.construct(t, r || [], (0, s.default)(e).constructor) : t.apply(e, r));
20859
20772
  }
20860
- function y(e, t, r, n) {
20773
+ function b(e, t, r, n) {
20861
20774
  var o = (0, u.default)((0, s.default)(1 & n ? e.prototype : e), t, r);
20862
20775
  return 2 & n && 'function' == typeof o ? function(e) {
20863
20776
  return o.apply(r, e);
20864
20777
  } : o;
20865
20778
  }
20866
- function b(e, t, r) {
20779
+ function y(e, t, r) {
20867
20780
  (function(e, t) {
20868
20781
  if (t.has(e)) {
20869
20782
  throw new TypeError('Cannot initialize the same private elements twice on an object');
@@ -20906,9 +20819,9 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20906
20819
  r.Subscription = function(e) {
20907
20820
  function t(e, r, n, o, i, a, s, u) {
20908
20821
  var c;
20909
- if ((0, l.default)(this, t), b(c = m(this, t), _, null), b(c, R, null), b(c, S, null),
20910
- b(c, C, null), b(c, k, null), b(c, A, null), b(c, I, null), b(c, T, null), b(c, P, null),
20911
- b(c, O, null), b(c, j, null), b(c, x, null), b(c, M, 0), b(c, N, 0), b(c, D, 0),
20822
+ if ((0, l.default)(this, t), y(c = m(this, t), _, null), y(c, R, null), y(c, S, null),
20823
+ y(c, C, null), y(c, k, null), y(c, A, null), y(c, I, null), y(c, T, null), y(c, P, null),
20824
+ y(c, O, null), y(c, j, null), y(c, x, null), y(c, M, 0), y(c, N, 0), y(c, D, 0),
20912
20825
  !e) {
20913
20826
  throw new h.IRtcError(p.ErrorCode.MISSING_PARAMETER, 'ID cannot be null or undefined.');
20914
20827
  }
@@ -20937,7 +20850,7 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20937
20850
  key: 'addEventListener',
20938
20851
  value: function(e, r) {
20939
20852
  var n = this;
20940
- y(t, 'addEventListener', this, 3)([ e, r ]), 'quality-report' !== e || E(R, this) || (E(_, this).call(this, 'connection-status', {
20853
+ b(t, 'addEventListener', this, 3)([ e, r ]), 'quality-report' !== e || E(R, this) || (E(_, this).call(this, 'connection-status', {
20941
20854
  id: this.id
20942
20855
  }), g(R, this, setInterval((function() {
20943
20856
  E(k, n).call(n), n.getConnectionStats().then((function(t) {
@@ -20956,11 +20869,11 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20956
20869
  var v, m = 0;
20957
20870
  s > 0 && (E(T, n) && (m = Math.round(1e3 * (s - E(T, n)) / 3e3)), g(T, n, s)), t.video && m < 10 && E(M, n) > 1 && g(D, n, (v = E(D, n),
20958
20871
  ++v));
20959
- var y = 0;
20960
- u > 0 && (E(P, n) && (y = Math.round(8 * (u - E(P, n)) / 3e3)), g(P, n, u));
20961
20872
  var b = 0;
20962
- c > 0 && (E(O, n) && (b = Math.round(8 * (c - E(O, n)) / 3e3)), g(O, n, c));
20963
- var w = new d.QualityInfo(h, E(I, n), m, y, b, r, o), _ = new d.QualityCriterion(1), R = 100 - w.packetloss * _.packetloss, k = R >= 85 ? d.QualityReportStatus.GOOD : d.QualityReportStatus.BAD, j = new d.QualityReport(k, R, w, _), L = new d.QualityReportEvent(e, j);
20873
+ u > 0 && (E(P, n) && (b = Math.round(8 * (u - E(P, n)) / 3e3)), g(P, n, u));
20874
+ var y = 0;
20875
+ c > 0 && (E(O, n) && (y = Math.round(8 * (c - E(O, n)) / 3e3)), g(O, n, c));
20876
+ var w = new d.QualityInfo(h, E(I, n), m, b, y, r, o), _ = new d.QualityCriterion(1), R = 100 - w.packetloss * _.packetloss, k = R >= 85 ? d.QualityReportStatus.GOOD : d.QualityReportStatus.BAD, j = new d.QualityReport(k, R, w, _), L = new d.QualityReportEvent(e, j);
20964
20877
  n.dispatchEvent(L), g(M, n, (p = E(M, n), ++p));
20965
20878
  }
20966
20879
  g(S, n, i), g(C, n, a), g(x, n, l);
@@ -20970,14 +20883,14 @@ irtc.exports, module = irtc, irtc.exports, module.exports = function e(t, r, n)
20970
20883
  }, {
20971
20884
  key: 'removeEventListener',
20972
20885
  value: function(e, r) {
20973
- y(t, 'removeEventListener', this, 3)([ e, r ]), 'quality-report' === e && 0 === y(t, 'getEventListener', this, 3)([ e ]).length && E(R, this) && (clearInterval(E(R, this)),
20886
+ b(t, 'removeEventListener', this, 3)([ e, r ]), 'quality-report' === e && 0 === b(t, 'getEventListener', this, 3)([ e ]).length && E(R, this) && (clearInterval(E(R, this)),
20974
20887
  g(R, this, null), g(S, this, null), g(C, this, null), g(A, this, 0), g(T, this, null),
20975
20888
  g(P, this, null), g(O, this, null));
20976
20889
  }
20977
20890
  }, {
20978
20891
  key: 'clearEventListener',
20979
20892
  value: function(e) {
20980
- y(t, 'clearEventListener', this, 3)([ e ]), 'quality-report' === e && E(R, this) && (clearInterval(E(R, this)),
20893
+ b(t, 'clearEventListener', this, 3)([ e ]), 'quality-report' === e && E(R, this) && (clearInterval(E(R, this)),
20981
20894
  g(R, this, null), g(S, this, null), g(C, this, null), g(A, this, 0), g(T, this, null),
20982
20895
  g(P, this, null), g(O, this, null));
20983
20896
  }
@@ -23519,7 +23432,7 @@ const faceCheckRequest = (url, faceBase64, userFaceBase64) => new Promise(functi
23519
23432
  };
23520
23433
  }());
23521
23434
 
23522
- var name = '@crh-fe/oava-customer-sdk', version = '1.0.62', description = 'Customer JS SDK package for oava-widget', type = 'module', main = './dist/customerComponent.js', files = [ 'dist', 'README.md' ], publishConfig = {
23435
+ var name = '@crh-fe/oava-customer-sdk', version = '1.0.63', description = 'Customer JS SDK package for oava-widget', type = 'module', main = './dist/customerComponent.js', files = [ 'dist', 'README.md' ], publishConfig = {
23523
23436
  access: 'public'
23524
23437
  }, pkg = {
23525
23438
  name,