media-av 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mediaAV.js CHANGED
@@ -128,13 +128,13 @@ const ui = (t, e, r, { allOwnKeys: n } = {}) => (Te(e, (i, o) => {
128
128
  function(r, n, i) {
129
129
  return n.toUpperCase() + i;
130
130
  }
131
- ), Jt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), bi = B("RegExp"), Nr = (t, e) => {
131
+ ), Jt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), bi = B("RegExp"), Fr = (t, e) => {
132
132
  const r = Object.getOwnPropertyDescriptors(t), n = {};
133
133
  Te(r, (i, o) => {
134
134
  e(i, o, t) !== !1 && (n[o] = i);
135
135
  }), Object.defineProperties(t, n);
136
136
  }, Ri = (t) => {
137
- Nr(t, (e, r) => {
137
+ Fr(t, (e, r) => {
138
138
  if (L(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
139
139
  return !1;
140
140
  const n = t[r];
@@ -156,11 +156,11 @@ const ui = (t, e, r, { allOwnKeys: n } = {}) => (Te(e, (i, o) => {
156
156
  };
157
157
  return de(t) ? n(t) : n(String(t).split(e)), r;
158
158
  }, Ei = () => {
159
- }, Pi = (t, e) => (t = +t, Number.isFinite(t) ? t : e), et = "abcdefghijklmnopqrstuvwxyz", qt = "0123456789", Fr = {
159
+ }, Pi = (t, e) => (t = +t, Number.isFinite(t) ? t : e), et = "abcdefghijklmnopqrstuvwxyz", qt = "0123456789", Nr = {
160
160
  DIGIT: qt,
161
161
  ALPHA: et,
162
162
  ALPHA_DIGIT: et + et.toUpperCase() + qt
163
- }, Oi = (t = 16, e = Fr.ALPHA_DIGIT) => {
163
+ }, Oi = (t = 16, e = Nr.ALPHA_DIGIT) => {
164
164
  let r = "";
165
165
  const { length: n } = e;
166
166
  for (; t--; )
@@ -225,7 +225,7 @@ const Ii = (t) => {
225
225
  hasOwnProperty: Jt,
226
226
  hasOwnProp: Jt,
227
227
  // an alias to avoid ESLint no-prototype-builtins detection
228
- reduceDescriptors: Nr,
228
+ reduceDescriptors: Fr,
229
229
  freezeMethods: Ri,
230
230
  toObjectSet: Ti,
231
231
  toCamelCase: Ci,
@@ -234,7 +234,7 @@ const Ii = (t) => {
234
234
  findKey: Lr,
235
235
  global: kr,
236
236
  isContextDefined: Mr,
237
- ALPHABET: Fr,
237
+ ALPHABET: Nr,
238
238
  generateString: Oi,
239
239
  isSpecCompliantForm: Ai,
240
240
  toJSONObject: Ii,
@@ -337,10 +337,10 @@ function Ye(t, e, r) {
337
337
  if (d.endsWith(y, "{}"))
338
338
  y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
339
339
  else if (d.isArray(h) && Li(h) || (d.isFileList(h) || d.endsWith(y, "[]")) && (S = d.toArray(h)))
340
- return y = jr(y), S.forEach(function(x, w) {
340
+ return y = jr(y), S.forEach(function(x, H) {
341
341
  !(d.isUndefined(x) || x === null) && e.append(
342
342
  // eslint-disable-next-line no-nested-ternary
343
- s === !0 ? Kt([y], w, o) : s === null ? y : y + "[]",
343
+ s === !0 ? Kt([y], H, o) : s === null ? y : y + "[]",
344
344
  c(x)
345
345
  );
346
346
  }), !1;
@@ -403,7 +403,7 @@ $r.toString = function(e) {
403
403
  function Mi(t) {
404
404
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
405
405
  }
406
- function Hr(t, e, r) {
406
+ function wr(t, e, r) {
407
407
  if (!e)
408
408
  return t;
409
409
  const n = r && r.encode || Mi, i = r && r.serialize;
@@ -414,7 +414,7 @@ function Hr(t, e, r) {
414
414
  }
415
415
  return t;
416
416
  }
417
- class Ni {
417
+ class Fi {
418
418
  constructor() {
419
419
  this.handlers = [];
420
420
  }
@@ -468,18 +468,18 @@ class Ni {
468
468
  });
469
469
  }
470
470
  }
471
- const Yt = Ni, wr = {
471
+ const Yt = Fi, Hr = {
472
472
  silentJSONParsing: !0,
473
473
  forcedJSONParsing: !0,
474
474
  clarifyTimeoutError: !1
475
- }, Fi = typeof URLSearchParams < "u" ? URLSearchParams : Lt, Ui = typeof FormData < "u" ? FormData : null, Bi = typeof Blob < "u" ? Blob : null, ji = (() => {
475
+ }, Ni = typeof URLSearchParams < "u" ? URLSearchParams : Lt, Ui = typeof FormData < "u" ? FormData : null, Bi = typeof Blob < "u" ? Blob : null, ji = (() => {
476
476
  let t;
477
477
  return typeof navigator < "u" && ((t = navigator.product) === "ReactNative" || t === "NativeScript" || t === "NS") ? !1 : typeof window < "u" && typeof document < "u";
478
478
  })(), $i = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
479
479
  self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), U = {
480
480
  isBrowser: !0,
481
481
  classes: {
482
- URLSearchParams: Fi,
482
+ URLSearchParams: Ni,
483
483
  FormData: Ui,
484
484
  Blob: Bi
485
485
  },
@@ -487,14 +487,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
487
487
  isStandardBrowserWebWorkerEnv: $i,
488
488
  protocols: ["http", "https", "file", "blob", "url", "data"]
489
489
  };
490
- function Hi(t, e) {
490
+ function wi(t, e) {
491
491
  return Ye(t, new U.classes.URLSearchParams(), Object.assign({
492
492
  visitor: function(r, n, i, o) {
493
493
  return U.isNode && d.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
494
494
  }
495
495
  }, e));
496
496
  }
497
- function wi(t) {
497
+ function Hi(t) {
498
498
  return d.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
499
499
  }
500
500
  function Gi(t) {
@@ -515,7 +515,7 @@ function Gr(t) {
515
515
  if (d.isFormData(t) && d.isFunction(t.entries)) {
516
516
  const r = {};
517
517
  return d.forEachEntry(t, (n, i) => {
518
- e(wi(n), i, r, 0);
518
+ e(Hi(n), i, r, 0);
519
519
  }), r;
520
520
  }
521
521
  return null;
@@ -534,7 +534,7 @@ function Vi(t, e, r) {
534
534
  return (r || JSON.stringify)(t);
535
535
  }
536
536
  const Xe = {
537
- transitional: wr,
537
+ transitional: Hr,
538
538
  adapter: ["xhr", "http"],
539
539
  transformRequest: [function(e, r) {
540
540
  const n = r.getContentType() || "", i = n.indexOf("application/json") > -1, o = d.isObject(e);
@@ -549,7 +549,7 @@ const Xe = {
549
549
  let a;
550
550
  if (o) {
551
551
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
552
- return Hi(e, this.formSerializer).toString();
552
+ return wi(e, this.formSerializer).toString();
553
553
  if ((a = d.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
554
554
  const l = this.env && this.env.FormData;
555
555
  return Ye(
@@ -778,9 +778,9 @@ class Ze {
778
778
  Ze.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
779
779
  d.freezeMethods(Ze.prototype);
780
780
  d.freezeMethods(Ze);
781
- const H = Ze;
781
+ const w = Ze;
782
782
  function rt(t, e) {
783
- const r = this || kt, n = e || r, i = H.from(n.headers);
783
+ const r = this || kt, n = e || r, i = w.from(n.headers);
784
784
  let o = n.data;
785
785
  return d.forEach(t, function(a) {
786
786
  o = a.call(r, o, i.normalize(), e ? e.status : void 0);
@@ -918,7 +918,7 @@ function Zt(t, e) {
918
918
  const oo = typeof XMLHttpRequest < "u", so = oo && function(t) {
919
919
  return new Promise(function(r, n) {
920
920
  let i = t.data;
921
- const o = H.from(t.headers).normalize(), s = t.responseType;
921
+ const o = w.from(t.headers).normalize(), s = t.responseType;
922
922
  let a;
923
923
  function l() {
924
924
  t.cancelToken && t.cancelToken.unsubscribe(a), t.signal && t.signal.removeEventListener("abort", a);
@@ -930,11 +930,11 @@ const oo = typeof XMLHttpRequest < "u", so = oo && function(t) {
930
930
  o.set("Authorization", "Basic " + btoa(m + ":" + h));
931
931
  }
932
932
  const u = Vr(t.baseURL, t.url);
933
- c.open(t.method.toUpperCase(), Hr(u, t.params, t.paramsSerializer), !0), c.timeout = t.timeout;
933
+ c.open(t.method.toUpperCase(), wr(u, t.params, t.paramsSerializer), !0), c.timeout = t.timeout;
934
934
  function f() {
935
935
  if (!c)
936
936
  return;
937
- const m = H.from(
937
+ const m = w.from(
938
938
  "getAllResponseHeaders" in c && c.getAllResponseHeaders()
939
939
  ), y = {
940
940
  data: !s || s === "text" || s === "json" ? c.responseText : c.response,
@@ -958,7 +958,7 @@ const oo = typeof XMLHttpRequest < "u", so = oo && function(t) {
958
958
  n(new C("Network Error", C.ERR_NETWORK, t, c)), c = null;
959
959
  }, c.ontimeout = function() {
960
960
  let h = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
961
- const y = t.transitional || wr;
961
+ const y = t.transitional || Hr;
962
962
  t.timeoutErrorMessage && (h = t.timeoutErrorMessage), n(new C(
963
963
  h,
964
964
  y.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
@@ -1019,7 +1019,7 @@ function nt(t) {
1019
1019
  throw new Ee(null, t);
1020
1020
  }
1021
1021
  function er(t) {
1022
- return nt(t), t.headers = H.from(t.headers), t.data = rt.call(
1022
+ return nt(t), t.headers = w.from(t.headers), t.data = rt.call(
1023
1023
  t,
1024
1024
  t.transformRequest
1025
1025
  ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ao.getAdapter(t.adapter || kt.adapter)(t).then(function(n) {
@@ -1027,16 +1027,16 @@ function er(t) {
1027
1027
  t,
1028
1028
  t.transformResponse,
1029
1029
  n
1030
- ), n.headers = H.from(n.headers), n;
1030
+ ), n.headers = w.from(n.headers), n;
1031
1031
  }, function(n) {
1032
1032
  return zr(n) || (nt(t), n && n.response && (n.response.data = rt.call(
1033
1033
  t,
1034
1034
  t.transformResponse,
1035
1035
  n.response
1036
- ), n.response.headers = H.from(n.response.headers))), Promise.reject(n);
1036
+ ), n.response.headers = w.from(n.response.headers))), Promise.reject(n);
1037
1037
  });
1038
1038
  }
1039
- const tr = (t) => t instanceof H ? t.toJSON() : t;
1039
+ const tr = (t) => t instanceof w ? t.toJSON() : t;
1040
1040
  function le(t, e) {
1041
1041
  e = e || {};
1042
1042
  const r = {};
@@ -1185,7 +1185,7 @@ class Ge {
1185
1185
  (h) => {
1186
1186
  delete o[h];
1187
1187
  }
1188
- ), r.headers = H.concat(s, o);
1188
+ ), r.headers = w.concat(s, o);
1189
1189
  const a = [];
1190
1190
  let l = !0;
1191
1191
  this.interceptors.request.forEach(function(y) {
@@ -1225,7 +1225,7 @@ class Ge {
1225
1225
  getUri(e) {
1226
1226
  e = le(this.defaults, e);
1227
1227
  const r = Vr(e.baseURL, e.url);
1228
- return Hr(r, e.params, e.paramsSerializer);
1228
+ return wr(r, e.params, e.paramsSerializer);
1229
1229
  }
1230
1230
  }
1231
1231
  d.forEach(["delete", "get", "head", "options"], function(e) {
@@ -1253,7 +1253,7 @@ d.forEach(["post", "put", "patch"], function(e) {
1253
1253
  Ge.prototype[e] = r(), Ge.prototype[e + "Form"] = r(!0);
1254
1254
  });
1255
1255
  const Me = Ge;
1256
- class Nt {
1256
+ class Ft {
1257
1257
  constructor(e) {
1258
1258
  if (typeof e != "function")
1259
1259
  throw new TypeError("executor must be a function.");
@@ -1314,14 +1314,14 @@ class Nt {
1314
1314
  static source() {
1315
1315
  let e;
1316
1316
  return {
1317
- token: new Nt(function(i) {
1317
+ token: new Ft(function(i) {
1318
1318
  e = i;
1319
1319
  }),
1320
1320
  cancel: e
1321
1321
  };
1322
1322
  }
1323
1323
  }
1324
- const lo = Nt;
1324
+ const lo = Ft;
1325
1325
  function uo(t) {
1326
1326
  return function(r) {
1327
1327
  return t.apply(null, r);
@@ -1420,7 +1420,7 @@ E.all = function(e) {
1420
1420
  E.spread = uo;
1421
1421
  E.isAxiosError = fo;
1422
1422
  E.mergeConfig = le;
1423
- E.AxiosHeaders = H;
1423
+ E.AxiosHeaders = w;
1424
1424
  E.formToJSON = (t) => Gr(d.isHTMLForm(t) ? new FormData(t) : t);
1425
1425
  E.HttpStatusCode = po;
1426
1426
  E.default = E;
@@ -1502,7 +1502,7 @@ var yo = function() {
1502
1502
  c.prototype = r.prototype, i.prototype = new c(), c.prototype = null;
1503
1503
  }
1504
1504
  return i;
1505
- }, Po = Eo, Ft = Function.prototype.bind || Po, Oo = Ft, Ao = Oo.call(Function.call, Object.prototype.hasOwnProperty), v, ue = SyntaxError, Kr = Function, ae = TypeError, ot = function(t) {
1505
+ }, Po = Eo, Nt = Function.prototype.bind || Po, Oo = Nt, Ao = Oo.call(Function.call, Object.prototype.hasOwnProperty), v, ue = SyntaxError, Kr = Function, ae = TypeError, ot = function(t) {
1506
1506
  try {
1507
1507
  return Kr('"use strict"; return (' + t + ").constructor;")();
1508
1508
  } catch {
@@ -1672,14 +1672,14 @@ var Lo = function t(e) {
1672
1672
  "%URIErrorPrototype%": ["URIError", "prototype"],
1673
1673
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
1674
1674
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
1675
- }, Pe = Ft, ze = Ao, ko = Pe.call(Function.call, Array.prototype.concat), Mo = Pe.call(Function.apply, Array.prototype.splice), sr = Pe.call(Function.call, String.prototype.replace), Ve = Pe.call(Function.call, String.prototype.slice), No = Pe.call(Function.call, RegExp.prototype.exec), Fo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Uo = /\\(\\)?/g, Bo = function(e) {
1675
+ }, Pe = Nt, ze = Ao, ko = Pe.call(Function.call, Array.prototype.concat), Mo = Pe.call(Function.apply, Array.prototype.splice), sr = Pe.call(Function.call, String.prototype.replace), Ve = Pe.call(Function.call, String.prototype.slice), Fo = Pe.call(Function.call, RegExp.prototype.exec), No = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Uo = /\\(\\)?/g, Bo = function(e) {
1676
1676
  var r = Ve(e, 0, 1), n = Ve(e, -1);
1677
1677
  if (r === "%" && n !== "%")
1678
1678
  throw new ue("invalid intrinsic syntax, expected closing `%`");
1679
1679
  if (n === "%" && r !== "%")
1680
1680
  throw new ue("invalid intrinsic syntax, expected opening `%`");
1681
1681
  var i = [];
1682
- return sr(e, Fo, function(o, s, a, l) {
1682
+ return sr(e, No, function(o, s, a, l) {
1683
1683
  i[i.length] = a ? sr(l, Uo, "$1") : s || o;
1684
1684
  }), i;
1685
1685
  }, jo = function(e, r) {
@@ -1700,7 +1700,7 @@ var Lo = function t(e) {
1700
1700
  throw new ae("intrinsic name must be a non-empty string");
1701
1701
  if (arguments.length > 1 && typeof r != "boolean")
1702
1702
  throw new ae('"allowMissing" argument must be a boolean');
1703
- if (No(/^%?[^%]*%?$/, e) === null)
1703
+ if (Fo(/^%?[^%]*%?$/, e) === null)
1704
1704
  throw new ue("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1705
1705
  var n = Bo(e), i = n.length > 0 ? n[0] : "", o = jo("%" + i + "%", r), s = o.name, a = o.value, l = !1, c = o.alias;
1706
1706
  c && (i = c[0], Mo(n, ko([0, 1], c)));
@@ -1727,7 +1727,7 @@ var Lo = function t(e) {
1727
1727
  return a;
1728
1728
  }, Qr = { exports: {} };
1729
1729
  (function(t) {
1730
- var e = Ft, r = Ut, n = r("%Function.prototype.apply%"), i = r("%Function.prototype.call%"), o = r("%Reflect.apply%", !0) || e.call(i, n), s = r("%Object.getOwnPropertyDescriptor%", !0), a = r("%Object.defineProperty%", !0), l = r("%Math.max%");
1730
+ var e = Nt, r = Ut, n = r("%Function.prototype.apply%"), i = r("%Function.prototype.call%"), o = r("%Reflect.apply%", !0) || e.call(i, n), s = r("%Object.getOwnPropertyDescriptor%", !0), a = r("%Object.defineProperty%", !0), l = r("%Math.max%");
1731
1731
  if (a)
1732
1732
  try {
1733
1733
  a({}, "a", { value: 1 });
@@ -1751,15 +1751,15 @@ var Lo = function t(e) {
1751
1751
  };
1752
1752
  a ? a(t.exports, "apply", { value: c }) : t.exports.apply = c;
1753
1753
  })(Qr);
1754
- var $o = Qr.exports, Yr = Ut, Xr = $o, Ho = Xr(Yr("String.prototype.indexOf")), wo = function(e, r) {
1754
+ var $o = Qr.exports, Yr = Ut, Xr = $o, wo = Xr(Yr("String.prototype.indexOf")), Ho = function(e, r) {
1755
1755
  var n = Yr(e, !!r);
1756
- return typeof n == "function" && Ho(e, ".prototype.") > -1 ? Xr(n) : n;
1756
+ return typeof n == "function" && wo(e, ".prototype.") > -1 ? Xr(n) : n;
1757
1757
  };
1758
1758
  const Go = {}, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1759
1759
  __proto__: null,
1760
1760
  default: Go
1761
1761
  }, Symbol.toStringTag, { value: "Module" })), Vo = /* @__PURE__ */ mo(zo);
1762
- var Bt = typeof Map == "function" && Map.prototype, at = Object.getOwnPropertyDescriptor && Bt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, We = Bt && at && typeof at.get == "function" ? at.get : null, ar = Bt && Map.prototype.forEach, jt = typeof Set == "function" && Set.prototype, ct = Object.getOwnPropertyDescriptor && jt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Je = jt && ct && typeof ct.get == "function" ? ct.get : null, cr = jt && Set.prototype.forEach, Wo = typeof WeakMap == "function" && WeakMap.prototype, ve = Wo ? WeakMap.prototype.has : null, Jo = typeof WeakSet == "function" && WeakSet.prototype, Ce = Jo ? WeakSet.prototype.has : null, qo = typeof WeakRef == "function" && WeakRef.prototype, lr = qo ? WeakRef.prototype.deref : null, Ko = Boolean.prototype.valueOf, Qo = Object.prototype.toString, Yo = Function.prototype.toString, Xo = String.prototype.match, $t = String.prototype.slice, W = String.prototype.replace, Zo = String.prototype.toUpperCase, ur = String.prototype.toLowerCase, Zr = RegExp.prototype.test, fr = Array.prototype.concat, N = Array.prototype.join, es = Array.prototype.slice, pr = Math.floor, St = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, lt = Object.getOwnPropertySymbols, vt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, fe = typeof Symbol == "function" && typeof Symbol.iterator == "object", _ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === fe || "symbol") ? Symbol.toStringTag : null, en = Object.prototype.propertyIsEnumerable, dr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1762
+ var Bt = typeof Map == "function" && Map.prototype, at = Object.getOwnPropertyDescriptor && Bt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, We = Bt && at && typeof at.get == "function" ? at.get : null, ar = Bt && Map.prototype.forEach, jt = typeof Set == "function" && Set.prototype, ct = Object.getOwnPropertyDescriptor && jt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Je = jt && ct && typeof ct.get == "function" ? ct.get : null, cr = jt && Set.prototype.forEach, Wo = typeof WeakMap == "function" && WeakMap.prototype, ve = Wo ? WeakMap.prototype.has : null, Jo = typeof WeakSet == "function" && WeakSet.prototype, Ce = Jo ? WeakSet.prototype.has : null, qo = typeof WeakRef == "function" && WeakRef.prototype, lr = qo ? WeakRef.prototype.deref : null, Ko = Boolean.prototype.valueOf, Qo = Object.prototype.toString, Yo = Function.prototype.toString, Xo = String.prototype.match, $t = String.prototype.slice, W = String.prototype.replace, Zo = String.prototype.toUpperCase, ur = String.prototype.toLowerCase, Zr = RegExp.prototype.test, fr = Array.prototype.concat, F = Array.prototype.join, es = Array.prototype.slice, pr = Math.floor, St = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, lt = Object.getOwnPropertySymbols, vt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, fe = typeof Symbol == "function" && typeof Symbol.iterator == "object", _ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === fe || "symbol") ? Symbol.toStringTag : null, en = Object.prototype.propertyIsEnumerable, dr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1763
1763
  return t.__proto__;
1764
1764
  } : null);
1765
1765
  function hr(t, e) {
@@ -1826,7 +1826,7 @@ var Ct = Vo, mr = Ct.custom, yr = rn(mr) ? mr : null, ts = function t(e, r, n, i
1826
1826
  }
1827
1827
  if (typeof e == "function" && !gr(e)) {
1828
1828
  var m = us(e), h = Ie(e, p);
1829
- return "[Function" + (m ? ": " + m : " (anonymous)") + "]" + (h.length > 0 ? " { " + N.call(h, ", ") + " }" : "");
1829
+ return "[Function" + (m ? ": " + m : " (anonymous)") + "]" + (h.length > 0 ? " { " + F.call(h, ", ") + " }" : "");
1830
1830
  }
1831
1831
  if (rn(e)) {
1832
1832
  var y = fe ? W.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : vt.call(e);
@@ -1841,11 +1841,11 @@ var Ct = Vo, mr = Ct.custom, yr = rn(mr) ? mr : null, ts = function t(e, r, n, i
1841
1841
  if (e.length === 0)
1842
1842
  return "[]";
1843
1843
  var x = Ie(e, p);
1844
- return f && !Ss(x) ? "[" + Rt(x, f) + "]" : "[ " + N.call(x, ", ") + " ]";
1844
+ return f && !Ss(x) ? "[" + Rt(x, f) + "]" : "[ " + F.call(x, ", ") + " ]";
1845
1845
  }
1846
1846
  if (is(e)) {
1847
- var w = Ie(e, p);
1848
- return !("cause" in Error.prototype) && "cause" in e && !en.call(e, "cause") ? "{ [" + String(e) + "] " + N.call(fr.call("[cause]: " + p(e.cause), w), ", ") + " }" : w.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + N.call(w, ", ") + " }";
1847
+ var H = Ie(e, p);
1848
+ return !("cause" in Error.prototype) && "cause" in e && !en.call(e, "cause") ? "{ [" + String(e) + "] " + F.call(fr.call("[cause]: " + p(e.cause), H), ", ") + " }" : H.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + F.call(H, ", ") + " }";
1849
1849
  }
1850
1850
  if (typeof e == "object" && s) {
1851
1851
  if (yr && typeof e[yr] == "function" && Ct)
@@ -1880,8 +1880,8 @@ var Ct = Vo, mr = Ct.custom, yr = rn(mr) ? mr : null, ts = function t(e, r, n, i
1880
1880
  if (os(e))
1881
1881
  return Se(p(String(e)));
1882
1882
  if (!ns(e) && !gr(e)) {
1883
- var q = Ie(e, p), G = dr ? dr(e) === Object.prototype : e instanceof Object || e.constructor === Object, te = e instanceof Object ? "" : "null prototype", re = !G && _ && Object(e) === e && _ in e ? $t.call(J(e), 8, -1) : te ? "Object" : "", ye = G || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", k = ye + (re || te ? "[" + N.call(fr.call([], re || [], te || []), ": ") + "] " : "");
1884
- return q.length === 0 ? k + "{}" : f ? k + "{" + Rt(q, f) + "}" : k + "{ " + N.call(q, ", ") + " }";
1883
+ var q = Ie(e, p), G = dr ? dr(e) === Object.prototype : e instanceof Object || e.constructor === Object, te = e instanceof Object ? "" : "null prototype", re = !G && _ && Object(e) === e && _ in e ? $t.call(J(e), 8, -1) : te ? "Object" : "", ye = G || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", k = ye + (re || te ? "[" + F.call(fr.call([], re || [], te || []), ": ") + "] " : "");
1884
+ return q.length === 0 ? k + "{}" : f ? k + "{" + Rt(q, f) + "}" : k + "{ " + F.call(q, ", ") + " }";
1885
1885
  }
1886
1886
  return String(e);
1887
1887
  };
@@ -2055,7 +2055,7 @@ function ut(t) {
2055
2055
  return t + " { ? }";
2056
2056
  }
2057
2057
  function Sr(t, e, r, n) {
2058
- var i = n ? Rt(r, n) : N.call(r, ", ");
2058
+ var i = n ? Rt(r, n) : F.call(r, ", ");
2059
2059
  return t + " (" + e + ") {" + i + "}";
2060
2060
  }
2061
2061
  function Ss(t) {
@@ -2070,12 +2070,12 @@ function vs(t, e) {
2070
2070
  if (t.indent === " ")
2071
2071
  r = " ";
2072
2072
  else if (typeof t.indent == "number" && t.indent > 0)
2073
- r = N.call(Array(t.indent + 1), " ");
2073
+ r = F.call(Array(t.indent + 1), " ");
2074
2074
  else
2075
2075
  return null;
2076
2076
  return {
2077
2077
  base: r,
2078
- prev: N.call(Array(e + 1), r)
2078
+ prev: F.call(Array(e + 1), r)
2079
2079
  };
2080
2080
  }
2081
2081
  function Rt(t, e) {
@@ -2083,7 +2083,7 @@ function Rt(t, e) {
2083
2083
  return "";
2084
2084
  var r = `
2085
2085
  ` + e.prev + e.base;
2086
- return r + N.call(t, "," + r) + `
2086
+ return r + F.call(t, "," + r) + `
2087
2087
  ` + e.prev;
2088
2088
  }
2089
2089
  function Ie(t, e) {
@@ -2106,15 +2106,15 @@ function Ie(t, e) {
2106
2106
  en.call(t, o[c]) && n.push("[" + e(o[c]) + "]: " + e(t[o[c]], t));
2107
2107
  return n;
2108
2108
  }
2109
- var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0), xe = Ht("%Map%", !0), Rs = he("WeakMap.prototype.get", !0), Ts = he("WeakMap.prototype.set", !0), Es = he("WeakMap.prototype.has", !0), Ps = he("Map.prototype.get", !0), Os = he("Map.prototype.set", !0), As = he("Map.prototype.has", !0), wt = function(t, e) {
2109
+ var wt = Ut, he = Ho, Cs = ts, bs = wt("%TypeError%"), _e = wt("%WeakMap%", !0), xe = wt("%Map%", !0), Rs = he("WeakMap.prototype.get", !0), Ts = he("WeakMap.prototype.set", !0), Es = he("WeakMap.prototype.has", !0), Ps = he("Map.prototype.get", !0), Os = he("Map.prototype.set", !0), As = he("Map.prototype.has", !0), Ht = function(t, e) {
2110
2110
  for (var r = t, n; (n = r.next) !== null; r = n)
2111
2111
  if (n.key === e)
2112
2112
  return r.next = n.next, n.next = t.next, t.next = n, n;
2113
2113
  }, Is = function(t, e) {
2114
- var r = wt(t, e);
2114
+ var r = Ht(t, e);
2115
2115
  return r && r.value;
2116
2116
  }, _s = function(t, e, r) {
2117
- var n = wt(t, e);
2117
+ var n = Ht(t, e);
2118
2118
  n ? n.value = r : t.next = {
2119
2119
  // eslint-disable-line no-param-reassign
2120
2120
  key: e,
@@ -2122,7 +2122,7 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2122
2122
  value: r
2123
2123
  };
2124
2124
  }, xs = function(t, e) {
2125
- return !!wt(t, e);
2125
+ return !!Ht(t, e);
2126
2126
  }, Ds = function() {
2127
2127
  var e, r, n, i = {
2128
2128
  assert: function(o) {
@@ -2174,7 +2174,7 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2174
2174
  for (var t = [], e = 0; e < 256; ++e)
2175
2175
  t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
2176
2176
  return t;
2177
- }(), Ns = function(e) {
2177
+ }(), Fs = function(e) {
2178
2178
  for (; e.length > 1; ) {
2179
2179
  var r = e.pop(), n = r.obj[r.prop];
2180
2180
  if (Y(n)) {
@@ -2187,7 +2187,7 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2187
2187
  for (var n = r && r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, i = 0; i < e.length; ++i)
2188
2188
  typeof e[i] < "u" && (n[i] = e[i]);
2189
2189
  return n;
2190
- }, Fs = function t(e, r, n) {
2190
+ }, Ns = function t(e, r, n) {
2191
2191
  if (!r)
2192
2192
  return e;
2193
2193
  if (typeof r != "object") {
@@ -2260,10 +2260,10 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2260
2260
  var c = a[l], u = s[c];
2261
2261
  typeof u == "object" && u !== null && n.indexOf(u) === -1 && (r.push({ obj: s, prop: c }), n.push(u));
2262
2262
  }
2263
- return Ns(r), e;
2264
- }, Hs = function(e) {
2265
- return Object.prototype.toString.call(e) === "[object RegExp]";
2263
+ return Fs(r), e;
2266
2264
  }, ws = function(e) {
2265
+ return Object.prototype.toString.call(e) === "[object RegExp]";
2266
+ }, Hs = function(e) {
2267
2267
  return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
2268
2268
  }, Gs = function(e, r) {
2269
2269
  return [].concat(e, r);
@@ -2281,11 +2281,11 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2281
2281
  compact: $s,
2282
2282
  decode: Bs,
2283
2283
  encode: js,
2284
- isBuffer: ws,
2285
- isRegExp: Hs,
2284
+ isBuffer: Hs,
2285
+ isRegExp: ws,
2286
2286
  maybeMap: zs,
2287
- merge: Fs
2288
- }, cn = Ds, Ne = an, be = Gt, Vs = Object.prototype.hasOwnProperty, vr = {
2287
+ merge: Ns
2288
+ }, cn = Ds, Fe = an, be = Gt, Vs = Object.prototype.hasOwnProperty, vr = {
2289
2289
  brackets: function(e) {
2290
2290
  return e + "[]";
2291
2291
  },
@@ -2305,7 +2305,7 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2305
2305
  charsetSentinel: !1,
2306
2306
  delimiter: "&",
2307
2307
  encode: !0,
2308
- encoder: Ne.encode,
2308
+ encoder: Fe.encode,
2309
2309
  encodeValuesOnly: !1,
2310
2310
  format: Cr,
2311
2311
  formatter: be.formatters[Cr],
@@ -2319,23 +2319,23 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2319
2319
  }, qs = function(e) {
2320
2320
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
2321
2321
  }, dt = {}, Ks = function t(e, r, n, i, o, s, a, l, c, u, f, p, m, h, y, T) {
2322
- for (var S = e, A = T, x = 0, w = !1; (A = A.get(dt)) !== void 0 && !w; ) {
2322
+ for (var S = e, A = T, x = 0, H = !1; (A = A.get(dt)) !== void 0 && !H; ) {
2323
2323
  var me = A.get(e);
2324
2324
  if (x += 1, typeof me < "u") {
2325
2325
  if (me === x)
2326
2326
  throw new RangeError("Cyclic object value");
2327
- w = !0;
2327
+ H = !0;
2328
2328
  }
2329
2329
  typeof A.get(dt) > "u" && (x = 0);
2330
2330
  }
2331
- if (typeof l == "function" ? S = l(r, S) : S instanceof Date ? S = f(S) : n === "comma" && $(S) && (S = Ne.maybeMap(S, function(ie) {
2331
+ if (typeof l == "function" ? S = l(r, S) : S instanceof Date ? S = f(S) : n === "comma" && $(S) && (S = Fe.maybeMap(S, function(ie) {
2332
2332
  return ie instanceof Date ? f(ie) : ie;
2333
2333
  })), S === null) {
2334
2334
  if (o)
2335
2335
  return a && !h ? a(r, I.encoder, y, "key", p) : r;
2336
2336
  S = "";
2337
2337
  }
2338
- if (qs(S) || Ne.isBuffer(S)) {
2338
+ if (qs(S) || Fe.isBuffer(S)) {
2339
2339
  if (a) {
2340
2340
  var Oe = h ? r : a(r, I.encoder, y, "key", p);
2341
2341
  return [m(Oe) + "=" + m(a(S, I.encoder, y, "value", p))];
@@ -2347,7 +2347,7 @@ var Ht = Ut, he = wo, Cs = ts, bs = Ht("%TypeError%"), _e = Ht("%WeakMap%", !0),
2347
2347
  return q;
2348
2348
  var G;
2349
2349
  if (n === "comma" && $(S))
2350
- h && a && (S = Ne.maybeMap(S, a)), G = [{ value: S.length > 0 ? S.join(",") || null : void 0 }];
2350
+ h && a && (S = Fe.maybeMap(S, a)), G = [{ value: S.length > 0 ? S.join(",") || null : void 0 }];
2351
2351
  else if ($(l))
2352
2352
  G = l;
2353
2353
  else {
@@ -2612,7 +2612,7 @@ class pa {
2612
2612
  }
2613
2613
  var b = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.AUDIO = 1] = "AUDIO", t[t.VIDEO = 2] = "VIDEO", t[t.RTSP_PULL = 3] = "RTSP_PULL", t[t.AUDIO_PUSH = 4] = "AUDIO_PUSH", t[t.VIDEO_PUSH = 5] = "VIDEO_PUSH", t))(b || {}), K = /* @__PURE__ */ ((t) => (t.FRONT_FACING = "user", t.BACK_FACING = "environment", t))(K || {});
2614
2614
  let pn = !0, dn = !0;
2615
- function Fe(t, e, r) {
2615
+ function Ne(t, e, r) {
2616
2616
  const n = t.match(e);
2617
2617
  return n && n.length >= r && parseInt(n[r], 10);
2618
2618
  }
@@ -2682,19 +2682,19 @@ function ma(t) {
2682
2682
  return e.browser = "Not a browser.", e;
2683
2683
  const { navigator: r } = t;
2684
2684
  if (r.mozGetUserMedia)
2685
- e.browser = "firefox", e.version = Fe(
2685
+ e.browser = "firefox", e.version = Ne(
2686
2686
  r.userAgent,
2687
2687
  /Firefox\/(\d+)\./,
2688
2688
  1
2689
2689
  );
2690
2690
  else if (r.webkitGetUserMedia || t.isSecureContext === !1 && t.webkitRTCPeerConnection)
2691
- e.browser = "chrome", e.version = Fe(
2691
+ e.browser = "chrome", e.version = Ne(
2692
2692
  r.userAgent,
2693
2693
  /Chrom(e|ium)\/(\d+)\./,
2694
2694
  2
2695
2695
  );
2696
2696
  else if (t.RTCPeerConnection && r.userAgent.match(/AppleWebKit\/(\d+)\./))
2697
- e.browser = "safari", e.version = Fe(
2697
+ e.browser = "safari", e.version = Ne(
2698
2698
  r.userAgent,
2699
2699
  /AppleWebKit\/(\d+)\./,
2700
2700
  1
@@ -3432,7 +3432,7 @@ const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3432
3432
  shimRemoveStream: _n,
3433
3433
  shimSenderGetStats: An
3434
3434
  }, Symbol.toStringTag, { value: "Module" }));
3435
- function Nn(t) {
3435
+ function Fn(t) {
3436
3436
  if (!(typeof t != "object" || !t.RTCPeerConnection)) {
3437
3437
  if ("getLocalStreams" in t.RTCPeerConnection.prototype || (t.RTCPeerConnection.prototype.getLocalStreams = function() {
3438
3438
  return this._localStreams || (this._localStreams = []), this._localStreams;
@@ -3467,7 +3467,7 @@ function Nn(t) {
3467
3467
  });
3468
3468
  }
3469
3469
  }
3470
- function Fn(t) {
3470
+ function Nn(t) {
3471
3471
  if (!(typeof t != "object" || !t.RTCPeerConnection) && ("getRemoteStreams" in t.RTCPeerConnection.prototype || (t.RTCPeerConnection.prototype.getRemoteStreams = function() {
3472
3472
  return this._remoteStreams ? this._remoteStreams : [];
3473
3473
  }), !("onaddstream" in t.RTCPeerConnection.prototype))) {
@@ -3562,14 +3562,14 @@ function $n(t) {
3562
3562
  }
3563
3563
  });
3564
3564
  }
3565
- function Hn(t) {
3565
+ function wn(t) {
3566
3566
  typeof t == "object" && t.RTCTrackEvent && "receiver" in t.RTCTrackEvent.prototype && !("transceiver" in t.RTCTrackEvent.prototype) && Object.defineProperty(t.RTCTrackEvent.prototype, "transceiver", {
3567
3567
  get() {
3568
3568
  return { receiver: this.receiver };
3569
3569
  }
3570
3570
  });
3571
3571
  }
3572
- function wn(t) {
3572
+ function Hn(t) {
3573
3573
  const e = t.RTCPeerConnection.prototype.createOffer;
3574
3574
  t.RTCPeerConnection.prototype.createOffer = function(n) {
3575
3575
  if (n) {
@@ -3590,12 +3590,12 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3590
3590
  shimAudioContext: Gn,
3591
3591
  shimCallbacksAPI: Un,
3592
3592
  shimConstraints: jn,
3593
- shimCreateOfferLegacy: wn,
3593
+ shimCreateOfferLegacy: Hn,
3594
3594
  shimGetUserMedia: Bn,
3595
- shimLocalStreamsAPI: Nn,
3595
+ shimLocalStreamsAPI: Fn,
3596
3596
  shimRTCIceServerUrls: $n,
3597
- shimRemoteStreamsAPI: Fn,
3598
- shimTrackEventTransceiver: Hn
3597
+ shimRemoteStreamsAPI: Nn,
3598
+ shimTrackEventTransceiver: wn
3599
3599
  }, Symbol.toStringTag, { value: "Module" }));
3600
3600
  var zn = { exports: {} };
3601
3601
  (function(t) {
@@ -4180,7 +4180,7 @@ function $e(t, e) {
4180
4180
  return arguments[0] ? (e.browser === "chrome" && e.version < 78 || e.browser === "firefox" && e.version < 68 || e.browser === "safari") && arguments[0] && arguments[0].candidate === "" ? Promise.resolve() : r.apply(this, arguments) : (arguments[1] && arguments[1].apply(null), Promise.resolve());
4181
4181
  });
4182
4182
  }
4183
- function He(t, e) {
4183
+ function we(t, e) {
4184
4184
  if (!(t.RTCPeerConnection && t.RTCPeerConnection.prototype))
4185
4185
  return;
4186
4186
  const r = t.RTCPeerConnection.prototype.setLocalDescription;
@@ -4208,7 +4208,7 @@ const va = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4208
4208
  shimAddIceCandidateNullOrEmpty: $e,
4209
4209
  shimConnectionState: It,
4210
4210
  shimMaxMessageSize: Be,
4211
- shimParameterlessSetLocalDescription: He,
4211
+ shimParameterlessSetLocalDescription: we,
4212
4212
  shimRTCIceCandidate: Ue,
4213
4213
  shimRTCIceCandidateRelayProtocol: At,
4214
4214
  shimSendThrowTypeError: je
@@ -4221,7 +4221,7 @@ function Ca({ window: t } = {}, e = {
4221
4221
  const r = hn, n = ma(t), i = {
4222
4222
  browserDetails: n,
4223
4223
  commonShim: va,
4224
- extractVersion: Fe,
4224
+ extractVersion: Ne,
4225
4225
  disableLog: da,
4226
4226
  disableWarnings: ha,
4227
4227
  // Expose sdp as a convenience. For production apps include directly.
@@ -4233,17 +4233,17 @@ function Ca({ window: t } = {}, e = {
4233
4233
  return r("Chrome shim is not included in this adapter release."), i;
4234
4234
  if (n.version === null)
4235
4235
  return r("Chrome shim can not determine version, not shimming."), i;
4236
- r("adapter.js shimming chrome."), i.browserShim = Er, $e(t, n), He(t), yn(t, n), gn(t), Pt(t, n), Sn(t), Tn(t, n), vn(t), Cn(t), bn(t), En(t, n), Ue(t), At(t), It(t), Be(t, n), je(t), _t(t, n);
4236
+ r("adapter.js shimming chrome."), i.browserShim = Er, $e(t, n), we(t), yn(t, n), gn(t), Pt(t, n), Sn(t), Tn(t, n), vn(t), Cn(t), bn(t), En(t, n), Ue(t), At(t), It(t), Be(t, n), je(t), _t(t, n);
4237
4237
  break;
4238
4238
  case "firefox":
4239
4239
  if (!Pr || !Ot || !e.shimFirefox)
4240
4240
  return r("Firefox shim is not included in this adapter release."), i;
4241
- r("adapter.js shimming firefox."), i.browserShim = Pr, $e(t, n), He(t), Pn(t, n), Ot(t, n), On(t), _n(t), An(t), In(t), xn(t), Dn(t), Ln(t), kn(t), Mn(t), Ue(t), It(t), Be(t, n), je(t);
4241
+ r("adapter.js shimming firefox."), i.browserShim = Pr, $e(t, n), we(t), Pn(t, n), Ot(t, n), On(t), _n(t), An(t), In(t), xn(t), Dn(t), Ln(t), kn(t), Mn(t), Ue(t), It(t), Be(t, n), je(t);
4242
4242
  break;
4243
4243
  case "safari":
4244
4244
  if (!Or || !e.shimSafari)
4245
4245
  return r("Safari shim is not included in this adapter release."), i;
4246
- r("adapter.js shimming safari."), i.browserShim = Or, $e(t, n), He(t), $n(t), wn(t), Un(t), Nn(t), Fn(t), Hn(t), Bn(t), Gn(t), Ue(t), At(t), Be(t, n), je(t), _t(t, n);
4246
+ r("adapter.js shimming safari."), i.browserShim = Or, $e(t, n), we(t), $n(t), Hn(t), Un(t), Fn(t), Nn(t), wn(t), Bn(t), Gn(t), Ue(t), At(t), Be(t, n), je(t), _t(t, n);
4247
4247
  break;
4248
4248
  default:
4249
4249
  r("Unsupported browser!");
@@ -4301,17 +4301,17 @@ class Vt {
4301
4301
  }
4302
4302
  switch (this.isCallOut = e, this.hasSetRemoteSdp = !1, this.facingMode = K.FRONT_FACING, this.facingChanging = !1, this.muted = !1, this.peerConnection = new RTCPeerConnection({ iceServers: [] }), this.peerConnection.onnegotiationneeded = () => {
4303
4303
  e ? this.peerConnection.createOffer().then((n) => {
4304
- this.peerConnection.setLocalDescription(n).then(() => {
4304
+ console.debug("webrtc createOffer success"), this.peerConnection.setLocalDescription(n).then(() => {
4305
4305
  }).catch((i) => {
4306
4306
  this.error(i);
4307
4307
  });
4308
4308
  }).catch((n) => {
4309
4309
  this.error(n);
4310
- }) : (console.debug(r), this.peerConnection.setRemoteDescription(
4310
+ }) : (console.debug("webrtc call in: ", r), this.peerConnection.setRemoteDescription(
4311
4311
  new RTCSessionDescription({ type: "offer", sdp: r })
4312
4312
  ).then(() => {
4313
- this.peerConnection.createAnswer().then((n) => {
4314
- this.peerConnection.setLocalDescription(n).then(() => {
4313
+ console.debug("webrtc setRemoteDescription success"), this.peerConnection.createAnswer().then((n) => {
4314
+ console.debug("webrtc createAnswer success"), this.peerConnection.setLocalDescription(n).then(() => {
4315
4315
  }).catch((i) => {
4316
4316
  this.error(i);
4317
4317
  });
@@ -4323,8 +4323,10 @@ class Vt {
4323
4323
  }));
4324
4324
  }, this.peerConnection.onicecandidate = (n) => {
4325
4325
  }, this.peerConnection.onicegatheringstatechange = () => {
4326
- this.peerConnection && this.peerConnection.iceGatheringState == "complete" && this.peerConnection.localDescription && this.sessionListener.onStartSuccess(this.peerConnection.localDescription);
4326
+ var n;
4327
+ console.debug("webrtc onicegatheringstatechange", (n = this.peerConnection) == null ? void 0 : n.iceGatheringState), this.peerConnection && this.peerConnection.iceGatheringState == "complete" && this.peerConnection.localDescription && this.sessionListener.onStartSuccess(this.peerConnection.localDescription);
4327
4328
  }, this.peerConnection.ontrack = (n) => {
4329
+ console.debug("webrtc ontrack");
4328
4330
  for (let i = 0; i < n.streams.length; i++)
4329
4331
  this.remoteStream ? n.streams[i].getTracks().forEach((o) => {
4330
4332
  var s;
@@ -4358,6 +4360,7 @@ class Vt {
4358
4360
  if (this.hasSetRemoteSdp)
4359
4361
  return;
4360
4362
  this.hasSetRemoteSdp = !0, this.peerConnection.setRemoteDescription(new RTCSessionDescription({ type: "answer", sdp: e })).then(() => {
4363
+ console.debug("webrtc setRemoteDescription success");
4361
4364
  }).catch((r) => {
4362
4365
  this.error(r);
4363
4366
  });
@@ -4366,6 +4369,7 @@ class Vt {
4366
4369
  addRemoteCandidate(e) {
4367
4370
  this.peerConnection && e.forEach((r) => {
4368
4371
  this.peerConnection.addIceCandidate(r).then(() => {
4372
+ console.debug("webrtc addIceCandidate success");
4369
4373
  }).catch((n) => console.log(n));
4370
4374
  });
4371
4375
  }
@@ -4373,7 +4377,7 @@ class Vt {
4373
4377
  * 关闭会话
4374
4378
  */
4375
4379
  stop() {
4376
- this.peerConnection && (this.peerConnection.close(), this.peerConnection = void 0), this.localStream && (this.localStream.getTracks().forEach((e) => {
4380
+ console.debug("webrtc stop"), this.peerConnection && (this.peerConnection.close(), this.peerConnection = void 0), this.localStream && (this.localStream.getTracks().forEach((e) => {
4377
4381
  this.localStream.removeTrack(e), e.stop();
4378
4382
  }), this.localStream = void 0), this.remoteStream = void 0;
4379
4383
  }
@@ -4428,7 +4432,7 @@ class Vt {
4428
4432
  });
4429
4433
  }
4430
4434
  error(e) {
4431
- this.stop(), this.sessionListener.onError(e);
4435
+ console.debug("webrtc error: ", e), this.stop(), this.sessionListener.onError(e);
4432
4436
  }
4433
4437
  addTransceivers() {
4434
4438
  this.peerConnection.addTransceiver("audio", {
@@ -4465,7 +4469,7 @@ class Vt {
4465
4469
  }) : this.error(new Error("Browser does not support WebRTC"));
4466
4470
  }
4467
4471
  getMediaSuccess(e) {
4468
- this.localStream = e, (this.sessionType === b.VIDEO || this.sessionType === b.VIDEO_PUSH) && this.sessionListener.onAddLocalStream(e), e.getTracks().forEach((r) => {
4472
+ console.debug("webrtc getMediaSuccess"), this.localStream = e, (this.sessionType === b.VIDEO || this.sessionType === b.VIDEO_PUSH) && this.sessionListener.onAddLocalStream(e), e.getTracks().forEach((r) => {
4469
4473
  switch (this.sessionType) {
4470
4474
  case b.VIDEO:
4471
4475
  case b.AUDIO:
@@ -4479,7 +4483,7 @@ class Vt {
4479
4483
  }), this.muted = !1;
4480
4484
  }
4481
4485
  getMediaFailed(e) {
4482
- if (this.sessionType === b.VIDEO) {
4486
+ if (console.debug("webrtc getMediaFailed failed"), this.sessionType === b.VIDEO) {
4483
4487
  console.error("get video media failed. maybe not found camera.", e), this.sessionType = b.AUDIO, this.gotLocalMedia();
4484
4488
  return;
4485
4489
  } else if (this.sessionType === b.VIDEO_PUSH) {
@@ -4620,7 +4624,7 @@ class Ta {
4620
4624
  });
4621
4625
  }
4622
4626
  }
4623
- var R = /* @__PURE__ */ ((t) => (t[t.OFFLINE = -1] = "OFFLINE", t[t.IDLE = 0] = "IDLE", t[t.TRY = 1] = "TRY", t[t.RING = 2] = "RING", t[t.TALK = 3] = "TALK", t))(R || {}), F = /* @__PURE__ */ ((t) => (t.VIDEO = "video", t.AUDIO = "audio", t))(F || {}), we = /* @__PURE__ */ ((t) => (t.FULL = "full-duplex", t.HALF = "half-duplex", t))(we || {}), Q = /* @__PURE__ */ ((t) => (t.IN = "in", t.OUT = "out", t))(Q || {}), D = /* @__PURE__ */ ((t) => (t.LOGIN = "login", t.LOGOUT = "logout", t.Invite = "invite", t.RING = "ring", t.ANSWER = "answer", t.HANGUP = "hangup", t.DTMF = "dtmf", t))(D || {});
4627
+ var R = /* @__PURE__ */ ((t) => (t[t.OFFLINE = -1] = "OFFLINE", t[t.IDLE = 0] = "IDLE", t[t.TRY = 1] = "TRY", t[t.RING = 2] = "RING", t[t.TALK = 3] = "TALK", t))(R || {}), N = /* @__PURE__ */ ((t) => (t.VIDEO = "video", t.AUDIO = "audio", t))(N || {}), He = /* @__PURE__ */ ((t) => (t.FULL = "full-duplex", t.HALF = "half-duplex", t))(He || {}), Q = /* @__PURE__ */ ((t) => (t.IN = "in", t.OUT = "out", t))(Q || {}), D = /* @__PURE__ */ ((t) => (t.LOGIN = "login", t.LOGOUT = "logout", t.Invite = "invite", t.RING = "ring", t.ANSWER = "answer", t.HANGUP = "hangup", t.DTMF = "dtmf", t))(D || {});
4624
4628
  function Ir() {
4625
4629
  try {
4626
4630
  return !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia);
@@ -4720,8 +4724,8 @@ class _a {
4720
4724
  constructor(e, r) {
4721
4725
  g(this, "tel", "");
4722
4726
  g(this, "status", R.OFFLINE);
4723
- g(this, "mediaType", F.AUDIO);
4724
- g(this, "callMode", we.FULL);
4727
+ g(this, "mediaType", N.AUDIO);
4728
+ g(this, "callMode", He.FULL);
4725
4729
  g(this, "callDirect", Q.OUT);
4726
4730
  g(this, "called", "");
4727
4731
  g(this, "callId");
@@ -4744,7 +4748,7 @@ class _a {
4744
4748
  init() {
4745
4749
  this.websocketInit(this.wsUrl);
4746
4750
  }
4747
- makeCall(e, r = F.AUDIO, n = we.FULL) {
4751
+ makeCall(e, r = N.AUDIO, n = He.FULL) {
4748
4752
  var i;
4749
4753
  try {
4750
4754
  if (this.status == R.OFFLINE) {
@@ -4759,7 +4763,7 @@ class _a {
4759
4763
  console.debug("Browser does not support WEBRTC"), this.sessionListener.onError(new Error("Browser does not support WEBRTC"));
4760
4764
  return;
4761
4765
  }
4762
- this.mediaType = r, this.callMode = n, this.called = e, this.callDirect = Q.OUT, this.callId = Ea(), this.webrtcCreate(F.VIDEO == r ? b.VIDEO : b.AUDIO), (i = this.webrtcSession) == null || i.start(!0), this.status = R.TRY;
4766
+ this.mediaType = r, this.callMode = n, this.called = e, this.callDirect = Q.OUT, this.callId = Ea(), this.webrtcCreate(N.VIDEO == r ? b.VIDEO : b.AUDIO), (i = this.webrtcSession) == null || i.start(!0), this.status = R.TRY;
4763
4767
  } catch (o) {
4764
4768
  this.status = R.IDLE, this.sessionListener.onError(new Error("" + o));
4765
4769
  }
@@ -4774,7 +4778,7 @@ class _a {
4774
4778
  console.debug("session is call out, not allow answer");
4775
4779
  return;
4776
4780
  }
4777
- this.webrtcCreate(F.VIDEO == this.mediaType ? b.VIDEO : b.AUDIO), (e = this.webrtcSession) == null || e.start(!1, this.remoteSdp);
4781
+ this.webrtcCreate(N.VIDEO == this.mediaType ? b.VIDEO : b.AUDIO), (e = this.webrtcSession) == null || e.start(!1, this.remoteSdp);
4778
4782
  }
4779
4783
  hangup() {
4780
4784
  this.status <= R.IDLE || (this.status == R.TALK ? this.sendHangup(this.callId ?? "") : this.callDirect == Q.IN ? this.sendHangup(this.callId ?? "", 488) : this.sendHangup(this.callId ?? "", 801), this.close());
@@ -4942,7 +4946,7 @@ class _a {
4942
4946
  e.callId != this.callId && (console.debug("receive invite, but busy."), this.sendHangup(e.callId, 486));
4943
4947
  return;
4944
4948
  }
4945
- this.callId = e.callId, this.mediaType = e.mediaType ?? F.AUDIO, this.callMode = e.callMode ?? we.FULL, this.called = e.from ?? "", this.callDirect = Q.IN, this.remoteSdp = e.sdp, this.candidate = e.candidate, this.sendRing(), this.ringtone.currentTime = 0, this.ringtone.play().then(() => {
4949
+ this.callId = e.callId, this.mediaType = e.mediaType ?? N.AUDIO, this.callMode = e.callMode ?? He.FULL, this.called = e.from ?? "", this.callDirect = Q.IN, this.remoteSdp = e.sdp, this.candidate = e.candidate, this.sendRing(), this.ringtone.currentTime = 0, this.ringtone.play().then(() => {
4946
4950
  }).catch(() => {
4947
4951
  }), this.sessionListener.onNewCall(new Aa(this.called, this.mediaType, this.callMode));
4948
4952
  }
@@ -5007,7 +5011,7 @@ class La {
5007
5011
  g(this, "webrtcSession");
5008
5012
  g(this, "sessionListener", new xa());
5009
5013
  g(this, "httpClient");
5010
- this.tel = e, this.httpClient = r, this.mediaType = n === F.VIDEO ? F.VIDEO : F.AUDIO, this.webrtcSession = new Vt(n == F.VIDEO ? b.VIDEO_PUSH : b.AUDIO_PUSH), this.webrtcSession.setListener(this);
5014
+ this.tel = e, this.httpClient = r, this.mediaType = n === N.VIDEO ? N.VIDEO : N.AUDIO, this.webrtcSession = new Vt(n == N.VIDEO ? b.VIDEO_PUSH : b.AUDIO_PUSH), this.webrtcSession.setListener(this);
5011
5015
  }
5012
5016
  setBroadcastSessionListener(e) {
5013
5017
  this.sessionListener = e;
@@ -5044,10 +5048,10 @@ let Wt = new fn("/"), Jn = "/media-server/ws/voip", xt = new URL((location.proto
5044
5048
  function Ma(t) {
5045
5049
  Wt = new fn(t);
5046
5050
  }
5047
- function Na(t) {
5051
+ function Fa(t) {
5048
5052
  return new Ta(t, Wt);
5049
5053
  }
5050
- function Fa(t, e) {
5054
+ function Na(t, e) {
5051
5055
  return new La(t, Wt, e);
5052
5056
  }
5053
5057
  function Ua(t) {
@@ -5057,9 +5061,9 @@ function Ba(t) {
5057
5061
  return new _a(xt.toString(), t);
5058
5062
  }
5059
5063
  export {
5060
- Fa as createBroadcastSession,
5064
+ Na as createBroadcastSession,
5061
5065
  Ba as createCallSession,
5062
- Na as createRtspPullSession,
5066
+ Fa as createRtspPullSession,
5063
5067
  Ma as videoModuleInit,
5064
5068
  Ua as voipModuleInit
5065
5069
  };