quickvo-sdk-js 0.5.5 → 0.5.7

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/index.js CHANGED
@@ -4,7 +4,7 @@ var te = (a) => {
4
4
  };
5
5
  var ne = (a, I, u) => I in a ? ie(a, I, { enumerable: !0, configurable: !0, writable: !0, value: u }) : a[I] = u;
6
6
  var Z = (a, I, u) => ne(a, typeof I != "symbol" ? I + "" : I, u), ee = (a, I, u) => I.has(a) || te("Cannot " + u);
7
- var V = (a, I, u) => (ee(a, I, "read from private field"), u ? u.call(a) : I.get(a)), at = (a, I, u) => I.has(a) ? te("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(a) : I.set(a, u), vt = (a, I, u, E) => (ee(a, I, "write to private field"), E ? E.call(a, u) : I.set(a, u), u);
7
+ var Q = (a, I, u) => (ee(a, I, "read from private field"), u ? u.call(a) : I.get(a)), at = (a, I, u) => I.has(a) ? te("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(a) : I.set(a, u), wt = (a, I, u, E) => (ee(a, I, "write to private field"), E ? E.call(a, u) : I.set(a, u), u);
8
8
  const L = (a, I = []) => {
9
9
  const u = { ...a }, E = Object.keys(u);
10
10
  for (const _ of E)
@@ -83,7 +83,7 @@ const L = (a, I = []) => {
83
83
  }, G = (a) => W(a), U = (a, I = "YYYY-MM-DD hh:mm:ss", u = {}) => {
84
84
  const E = { empty_str: "-", ...u }, { empty_str: _, offset: k } = E, e = W(a, k);
85
85
  if (Number(a) !== 0 && e === 0) return _;
86
- const n = new Date(e), O = `${n.getFullYear()}`, $ = `${n.getMonth() + 1}`, N = `${n.getDate()}`, D = `${n.getDay() === 0 ? 7 : n.getDay()}`, q = `${n.getHours()}`, P = `${n.getMinutes()}`, j = `${n.getSeconds()}`, Q = `${Math.ceil((e - G(`${O}/01/01 00:00:00`) + 1) / 864e5)}`, J = `${Math.ceil(((e - G(`${O}/01/01 00:00:00`)) / 864e5 - Number(D)) / 7) + 1}`, z = [
86
+ const n = new Date(e), O = `${n.getFullYear()}`, $ = `${n.getMonth() + 1}`, N = `${n.getDate()}`, D = `${n.getDay() === 0 ? 7 : n.getDay()}`, q = `${n.getHours()}`, P = `${n.getMinutes()}`, j = `${n.getSeconds()}`, V = `${Math.ceil((e - G(`${O}/01/01 00:00:00`) + 1) / 864e5)}`, J = `${Math.ceil(((e - G(`${O}/01/01 00:00:00`)) / 864e5 - Number(D)) / 7) + 1}`, z = [
87
87
  { k: "Y+", v: O },
88
88
  // 年
89
89
  { k: "M+", v: $ },
@@ -98,7 +98,7 @@ const L = (a, I = []) => {
98
98
  // 分
99
99
  { k: "s+", v: j },
100
100
  // 秒
101
- { k: "d+", v: Q },
101
+ { k: "d+", v: V },
102
102
  // 第几天
103
103
  { k: "w+", v: J }
104
104
  // 第几周
@@ -591,9 +591,9 @@ function requireParser() {
591
591
  var q = D[0], P = D.slice(2);
592
592
  q === "m" && ($.push({ rtp: [], fmtp: [] }), N = $[$.length - 1]);
593
593
  for (var j = 0; j < (_[q] || []).length; j += 1) {
594
- var Q = _[q][j];
595
- if (Q.reg.test(P))
596
- return E(Q, N, P);
594
+ var V = _[q][j];
595
+ if (V.reg.test(P))
596
+ return E(V, N, P);
597
597
  }
598
598
  }), O.media = $, O;
599
599
  };
@@ -954,16 +954,16 @@ function requireBase64() {
954
954
  E[u[_] = _ < 26 ? _ + 65 : _ < 52 ? _ + 71 : _ < 62 ? _ - 4 : _ - 59 | 43] = _++;
955
955
  I.encode = function(n, O, $) {
956
956
  for (var N = null, D = [], q = 0, P = 0, j; O < $; ) {
957
- var Q = n[O++];
957
+ var V = n[O++];
958
958
  switch (P) {
959
959
  case 0:
960
- D[q++] = u[Q >> 2], j = (Q & 3) << 4, P = 1;
960
+ D[q++] = u[V >> 2], j = (V & 3) << 4, P = 1;
961
961
  break;
962
962
  case 1:
963
- D[q++] = u[j | Q >> 4], j = (Q & 15) << 2, P = 2;
963
+ D[q++] = u[j | V >> 4], j = (V & 15) << 2, P = 2;
964
964
  break;
965
965
  case 2:
966
- D[q++] = u[j | Q >> 6], D[q++] = u[Q & 63], P = 0;
966
+ D[q++] = u[j | V >> 6], D[q++] = u[V & 63], P = 0;
967
967
  break;
968
968
  }
969
969
  q > 8191 && ((N || (N = [])).push(String.fromCharCode.apply(String, D)), q = 0);
@@ -1040,11 +1040,11 @@ function requireFloat() {
1040
1040
  function a(k) {
1041
1041
  return typeof Float32Array < "u" ? function() {
1042
1042
  var e = new Float32Array([-0]), n = new Uint8Array(e.buffer), O = n[3] === 128;
1043
- function $(P, j, Q) {
1044
- e[0] = P, j[Q] = n[0], j[Q + 1] = n[1], j[Q + 2] = n[2], j[Q + 3] = n[3];
1043
+ function $(P, j, V) {
1044
+ e[0] = P, j[V] = n[0], j[V + 1] = n[1], j[V + 2] = n[2], j[V + 3] = n[3];
1045
1045
  }
1046
- function N(P, j, Q) {
1047
- e[0] = P, j[Q] = n[3], j[Q + 1] = n[2], j[Q + 2] = n[1], j[Q + 3] = n[0];
1046
+ function N(P, j, V) {
1047
+ e[0] = P, j[V] = n[3], j[V + 1] = n[2], j[V + 2] = n[1], j[V + 3] = n[0];
1048
1048
  }
1049
1049
  k.writeFloatLE = O ? $ : N, k.writeFloatBE = O ? N : $;
1050
1050
  function D(P, j) {
@@ -1084,11 +1084,11 @@ function requireFloat() {
1084
1084
  k.readFloatLE = n.bind(null, E), k.readFloatBE = n.bind(null, _);
1085
1085
  }(), typeof Float64Array < "u" ? function() {
1086
1086
  var e = new Float64Array([-0]), n = new Uint8Array(e.buffer), O = n[7] === 128;
1087
- function $(P, j, Q) {
1088
- e[0] = P, j[Q] = n[0], j[Q + 1] = n[1], j[Q + 2] = n[2], j[Q + 3] = n[3], j[Q + 4] = n[4], j[Q + 5] = n[5], j[Q + 6] = n[6], j[Q + 7] = n[7];
1087
+ function $(P, j, V) {
1088
+ e[0] = P, j[V] = n[0], j[V + 1] = n[1], j[V + 2] = n[2], j[V + 3] = n[3], j[V + 4] = n[4], j[V + 5] = n[5], j[V + 6] = n[6], j[V + 7] = n[7];
1089
1089
  }
1090
- function N(P, j, Q) {
1091
- e[0] = P, j[Q] = n[7], j[Q + 1] = n[6], j[Q + 2] = n[5], j[Q + 3] = n[4], j[Q + 4] = n[3], j[Q + 5] = n[2], j[Q + 6] = n[1], j[Q + 7] = n[0];
1090
+ function N(P, j, V) {
1091
+ e[0] = P, j[V] = n[7], j[V + 1] = n[6], j[V + 2] = n[5], j[V + 3] = n[4], j[V + 4] = n[3], j[V + 5] = n[2], j[V + 6] = n[1], j[V + 7] = n[0];
1092
1092
  }
1093
1093
  k.writeDoubleLE = O ? $ : N, k.writeDoubleBE = O ? N : $;
1094
1094
  function D(P, j) {
@@ -1114,19 +1114,19 @@ function requireFloat() {
1114
1114
  else if (D > 17976931348623157e292)
1115
1115
  O(0, q, P + $), O((j << 31 | 2146435072) >>> 0, q, P + N);
1116
1116
  else {
1117
- var Q;
1117
+ var V;
1118
1118
  if (D < 22250738585072014e-324)
1119
- Q = D / 5e-324, O(Q >>> 0, q, P + $), O((j << 31 | Q / 4294967296) >>> 0, q, P + N);
1119
+ V = D / 5e-324, O(V >>> 0, q, P + $), O((j << 31 | V / 4294967296) >>> 0, q, P + N);
1120
1120
  else {
1121
1121
  var J = Math.floor(Math.log(D) / Math.LN2);
1122
- J === 1024 && (J = 1023), Q = D * Math.pow(2, -J), O(Q * 4503599627370496 >>> 0, q, P + $), O((j << 31 | J + 1023 << 20 | Q * 1048576 & 1048575) >>> 0, q, P + N);
1122
+ J === 1024 && (J = 1023), V = D * Math.pow(2, -J), O(V * 4503599627370496 >>> 0, q, P + $), O((j << 31 | J + 1023 << 20 | V * 1048576 & 1048575) >>> 0, q, P + N);
1123
1123
  }
1124
1124
  }
1125
1125
  }
1126
1126
  k.writeDoubleLE = e.bind(null, I, 0, 4), k.writeDoubleBE = e.bind(null, u, 4, 0);
1127
1127
  function n(O, $, N, D, q) {
1128
- var P = O(D, q + $), j = O(D, q + N), Q = (j >> 31) * 2 + 1, J = j >>> 20 & 2047, z = 4294967296 * (j & 1048575) + P;
1129
- return J === 2047 ? z ? NaN : Q * (1 / 0) : J === 0 ? Q * 5e-324 * z : Q * Math.pow(2, J - 1075) * (z + 4503599627370496);
1128
+ var P = O(D, q + $), j = O(D, q + N), V = (j >> 31) * 2 + 1, J = j >>> 20 & 2047, z = 4294967296 * (j & 1048575) + P;
1129
+ return J === 2047 ? z ? NaN : V * (1 / 0) : J === 0 ? V * 5e-324 * z : V * Math.pow(2, J - 1075) * (z + 4503599627370496);
1130
1130
  }
1131
1131
  k.readDoubleLE = n.bind(null, E, 0, 4), k.readDoubleBE = n.bind(null, _, 4, 0);
1132
1132
  }(), k;
@@ -1474,7 +1474,7 @@ function requireWriter() {
1474
1474
  }, O.prototype.double = function(z) {
1475
1475
  return this._push(a.float.writeDoubleLE, 8, z);
1476
1476
  };
1477
- var Q = a.Array.prototype.set ? function(z, Y, et) {
1477
+ var V = a.Array.prototype.set ? function(z, Y, et) {
1478
1478
  Y.set(z, et);
1479
1479
  } : function(z, Y, et) {
1480
1480
  for (var tt = 0; tt < z.length; ++tt)
@@ -1488,7 +1488,7 @@ function requireWriter() {
1488
1488
  var et = O.alloc(Y = E.length(z));
1489
1489
  E.decode(z, et, 0), z = et;
1490
1490
  }
1491
- return this.uint32(Y)._push(Q, Y, z);
1491
+ return this.uint32(Y)._push(V, Y, z);
1492
1492
  }, O.prototype.string = function(z) {
1493
1493
  var Y = _.length(z);
1494
1494
  return Y ? this.uint32(Y)._push(_.write, Y, z) : this._push(N, 1, 0);
@@ -1560,8 +1560,8 @@ function requireReader() {
1560
1560
  throw Error("illegal buffer");
1561
1561
  }, n = function() {
1562
1562
  return a.Buffer ? function(P) {
1563
- return (k.create = function(Q) {
1564
- return a.Buffer.isBuffer(Q) ? new I(Q) : e(Q);
1563
+ return (k.create = function(V) {
1564
+ return a.Buffer.isBuffer(V) ? new I(V) : e(V);
1565
1565
  })(P);
1566
1566
  } : e;
1567
1567
  };
@@ -1648,8 +1648,8 @@ function requireReader() {
1648
1648
  if (this.pos += q, Array.isArray(this.buf))
1649
1649
  return this.buf.slice(P, j);
1650
1650
  if (P === j) {
1651
- var Q = a.Buffer;
1652
- return Q ? Q.alloc(0) : new this.buf.constructor(0);
1651
+ var V = a.Buffer;
1652
+ return V ? V.alloc(0) : new this.buf.constructor(0);
1653
1653
  }
1654
1654
  return this._slice.call(this.buf, P, j);
1655
1655
  }, k.prototype.string = function() {
@@ -5339,17 +5339,17 @@ const d_code = (a) => a < 256 ? _dist_code[a] : _dist_code[256 + (a >>> 7)], put
5339
5339
  a.bi_valid === 16 ? (put_short(a, a.bi_buf), a.bi_buf = 0, a.bi_valid = 0) : a.bi_valid >= 8 && (a.pending_buf[a.pending++] = a.bi_buf & 255, a.bi_buf >>= 8, a.bi_valid -= 8);
5340
5340
  }, gen_bitlen = (a, I) => {
5341
5341
  const u = I.dyn_tree, E = I.max_code, _ = I.stat_desc.static_tree, k = I.stat_desc.has_stree, e = I.stat_desc.extra_bits, n = I.stat_desc.extra_base, O = I.stat_desc.max_length;
5342
- let $, N, D, q, P, j, Q = 0;
5342
+ let $, N, D, q, P, j, V = 0;
5343
5343
  for (q = 0; q <= MAX_BITS$1; q++)
5344
5344
  a.bl_count[q] = 0;
5345
5345
  for (u[a.heap[a.heap_max] * 2 + 1] = 0, $ = a.heap_max + 1; $ < HEAP_SIZE$1; $++)
5346
- N = a.heap[$], q = u[u[N * 2 + 1] * 2 + 1] + 1, q > O && (q = O, Q++), u[N * 2 + 1] = q, !(N > E) && (a.bl_count[q]++, P = 0, N >= n && (P = e[N - n]), j = u[N * 2], a.opt_len += j * (q + P), k && (a.static_len += j * (_[N * 2 + 1] + P)));
5347
- if (Q !== 0) {
5346
+ N = a.heap[$], q = u[u[N * 2 + 1] * 2 + 1] + 1, q > O && (q = O, V++), u[N * 2 + 1] = q, !(N > E) && (a.bl_count[q]++, P = 0, N >= n && (P = e[N - n]), j = u[N * 2], a.opt_len += j * (q + P), k && (a.static_len += j * (_[N * 2 + 1] + P)));
5347
+ if (V !== 0) {
5348
5348
  do {
5349
5349
  for (q = O - 1; a.bl_count[q] === 0; )
5350
5350
  q--;
5351
- a.bl_count[q]--, a.bl_count[q + 1] += 2, a.bl_count[O]--, Q -= 2;
5352
- } while (Q > 0);
5351
+ a.bl_count[q]--, a.bl_count[q + 1] += 2, a.bl_count[O]--, V -= 2;
5352
+ } while (V > 0);
5353
5353
  for (q = O; q !== 0; q--)
5354
5354
  for (N = a.bl_count[q]; N !== 0; )
5355
5355
  D = a.heap[--$], !(D > E) && (u[D * 2 + 1] !== q && (a.opt_len += (q - u[D * 2 + 1]) * u[D * 2], u[D * 2 + 1] = q), N--);
@@ -6134,12 +6134,12 @@ var Deflate_1$1 = Deflate$1, deflate_2 = deflate$1, deflateRaw_1$1 = deflateRaw$
6134
6134
  };
6135
6135
  const BAD$1 = 16209, TYPE$1 = 16191;
6136
6136
  var inffast = function a(I, u) {
6137
- let E, _, k, e, n, O, $, N, D, q, P, j, Q, J, z, Y, et, tt, nt, lt, it, st, ct, ot;
6137
+ let E, _, k, e, n, O, $, N, D, q, P, j, V, J, z, Y, et, tt, nt, lt, it, st, ct, ot;
6138
6138
  const rt = I.state;
6139
- E = I.next_in, ct = I.input, _ = E + (I.avail_in - 5), k = I.next_out, ot = I.output, e = k - (u - I.avail_out), n = k + (I.avail_out - 257), O = rt.dmax, $ = rt.wsize, N = rt.whave, D = rt.wnext, q = rt.window, P = rt.hold, j = rt.bits, Q = rt.lencode, J = rt.distcode, z = (1 << rt.lenbits) - 1, Y = (1 << rt.distbits) - 1;
6139
+ E = I.next_in, ct = I.input, _ = E + (I.avail_in - 5), k = I.next_out, ot = I.output, e = k - (u - I.avail_out), n = k + (I.avail_out - 257), O = rt.dmax, $ = rt.wsize, N = rt.whave, D = rt.wnext, q = rt.window, P = rt.hold, j = rt.bits, V = rt.lencode, J = rt.distcode, z = (1 << rt.lenbits) - 1, Y = (1 << rt.distbits) - 1;
6140
6140
  t:
6141
6141
  do {
6142
- j < 15 && (P += ct[E++] << j, j += 8, P += ct[E++] << j, j += 8), et = Q[P & z];
6142
+ j < 15 && (P += ct[E++] << j, j += 8, P += ct[E++] << j, j += 8), et = V[P & z];
6143
6143
  e:
6144
6144
  for (; ; ) {
6145
6145
  if (tt = et >>> 24, P >>>= tt, j -= tt, tt = et >>> 16 & 255, tt === 0)
@@ -6207,7 +6207,7 @@ var inffast = function a(I, u) {
6207
6207
  break;
6208
6208
  }
6209
6209
  } else if ((tt & 64) === 0) {
6210
- et = Q[(et & 65535) + (P & (1 << tt) - 1)];
6210
+ et = V[(et & 65535) + (P & (1 << tt) - 1)];
6211
6211
  continue e;
6212
6212
  } else if (tt & 32) {
6213
6213
  rt.mode = TYPE$1;
@@ -6357,7 +6357,7 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
6357
6357
  64
6358
6358
  ]), inflate_table = (a, I, u, E, _, k, e, n) => {
6359
6359
  const O = n.bits;
6360
- let $ = 0, N = 0, D = 0, q = 0, P = 0, j = 0, Q = 0, J = 0, z = 0, Y = 0, et, tt, nt, lt, it, st = null, ct;
6360
+ let $ = 0, N = 0, D = 0, q = 0, P = 0, j = 0, V = 0, J = 0, z = 0, Y = 0, et, tt, nt, lt, it, st = null, ct;
6361
6361
  const ot = new Uint16Array(MAXBITS + 1), rt = new Uint16Array(MAXBITS + 1);
6362
6362
  let Ot = null, Xt, Nt, At;
6363
6363
  for ($ = 0; $ <= MAXBITS; $++)
@@ -6379,12 +6379,12 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
6379
6379
  rt[$ + 1] = rt[$] + ot[$];
6380
6380
  for (N = 0; N < E; N++)
6381
6381
  I[u + N] !== 0 && (e[rt[I[u + N]]++] = N);
6382
- if (a === CODES$1 ? (st = Ot = e, ct = 20) : a === LENS$1 ? (st = lbase, Ot = lext, ct = 257) : (st = dbase, Ot = dext, ct = 0), Y = 0, N = 0, $ = D, it = k, j = P, Q = 0, nt = -1, z = 1 << P, lt = z - 1, a === LENS$1 && z > ENOUGH_LENS$1 || a === DISTS$1 && z > ENOUGH_DISTS$1)
6382
+ if (a === CODES$1 ? (st = Ot = e, ct = 20) : a === LENS$1 ? (st = lbase, Ot = lext, ct = 257) : (st = dbase, Ot = dext, ct = 0), Y = 0, N = 0, $ = D, it = k, j = P, V = 0, nt = -1, z = 1 << P, lt = z - 1, a === LENS$1 && z > ENOUGH_LENS$1 || a === DISTS$1 && z > ENOUGH_DISTS$1)
6383
6383
  return 1;
6384
6384
  for (; ; ) {
6385
- Xt = $ - Q, e[N] + 1 < ct ? (Nt = 0, At = e[N]) : e[N] >= ct ? (Nt = Ot[e[N] - ct], At = st[e[N] - ct]) : (Nt = 96, At = 0), et = 1 << $ - Q, tt = 1 << j, D = tt;
6385
+ Xt = $ - V, e[N] + 1 < ct ? (Nt = 0, At = e[N]) : e[N] >= ct ? (Nt = Ot[e[N] - ct], At = st[e[N] - ct]) : (Nt = 96, At = 0), et = 1 << $ - V, tt = 1 << j, D = tt;
6386
6386
  do
6387
- tt -= et, _[it + (Y >> Q) + tt] = Xt << 24 | Nt << 16 | At | 0;
6387
+ tt -= et, _[it + (Y >> V) + tt] = Xt << 24 | Nt << 16 | At | 0;
6388
6388
  while (tt !== 0);
6389
6389
  for (et = 1 << $ - 1; Y & et; )
6390
6390
  et >>= 1;
@@ -6394,14 +6394,14 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
6394
6394
  $ = I[u + e[N]];
6395
6395
  }
6396
6396
  if ($ > P && (Y & lt) !== nt) {
6397
- for (Q === 0 && (Q = P), it += D, j = $ - Q, J = 1 << j; j + Q < q && (J -= ot[j + Q], !(J <= 0)); )
6397
+ for (V === 0 && (V = P), it += D, j = $ - V, J = 1 << j; j + V < q && (J -= ot[j + V], !(J <= 0)); )
6398
6398
  j++, J <<= 1;
6399
6399
  if (z += 1 << j, a === LENS$1 && z > ENOUGH_LENS$1 || a === DISTS$1 && z > ENOUGH_DISTS$1)
6400
6400
  return 1;
6401
6401
  nt = Y & lt, _[nt] = P << 24 | j << 16 | it - k | 0;
6402
6402
  }
6403
6403
  }
6404
- return Y !== 0 && (_[it + Y] = $ - Q << 24 | 64 << 16 | 0), n.bits = P, 0;
6404
+ return Y !== 0 && (_[it + Y] = $ - V << 24 | 64 << 16 | 0), n.bits = P, 0;
6405
6405
  };
6406
6406
  var inftrees = inflate_table;
6407
6407
  const CODES = 0, LENS = 1, DISTS = 2, {
@@ -6472,7 +6472,7 @@ const fixedtables = (a) => {
6472
6472
  const k = a.state;
6473
6473
  return k.window === null && (k.wsize = 1 << k.wbits, k.wnext = 0, k.whave = 0, k.window = new Uint8Array(k.wsize)), E >= k.wsize ? (k.window.set(I.subarray(u - k.wsize, u), 0), k.wnext = 0, k.whave = k.wsize) : (_ = k.wsize - k.wnext, _ > E && (_ = E), k.window.set(I.subarray(u - E, u - E + _), k.wnext), E -= _, E ? (k.window.set(I.subarray(u - E, u), 0), k.wnext = E, k.whave = k.wsize) : (k.wnext += _, k.wnext === k.wsize && (k.wnext = 0), k.whave < k.wsize && (k.whave += _))), 0;
6474
6474
  }, inflate$2 = (a, I) => {
6475
- let u, E, _, k, e, n, O, $, N, D, q, P, j, Q, J = 0, z, Y, et, tt, nt, lt, it, st;
6475
+ let u, E, _, k, e, n, O, $, N, D, q, P, j, V, J = 0, z, Y, et, tt, nt, lt, it, st;
6476
6476
  const ct = new Uint8Array(4);
6477
6477
  let ot, rt;
6478
6478
  const Ot = (
@@ -6861,12 +6861,12 @@ const fixedtables = (a) => {
6861
6861
  a.msg = "invalid distance too far back", u.mode = BAD;
6862
6862
  break;
6863
6863
  }
6864
- P > u.wnext ? (P -= u.wnext, j = u.wsize - P) : j = u.wnext - P, P > u.length && (P = u.length), Q = u.window;
6864
+ P > u.wnext ? (P -= u.wnext, j = u.wsize - P) : j = u.wnext - P, P > u.length && (P = u.length), V = u.window;
6865
6865
  } else
6866
- Q = _, j = e - u.offset, P = u.length;
6866
+ V = _, j = e - u.offset, P = u.length;
6867
6867
  P > O && (P = O), O -= P, u.length -= P;
6868
6868
  do
6869
- _[e++] = Q[j++];
6869
+ _[e++] = V[j++];
6870
6870
  while (--P);
6871
6871
  u.length === 0 && (u.mode = LEN);
6872
6872
  break;
@@ -7154,11 +7154,11 @@ const noLogEvents = ["heartbeat", "onNetQuality", "networkQualityChange"], compr
7154
7154
  }
7155
7155
  return a;
7156
7156
  };
7157
- var kt, ut, Rt, dt, yt, qt, Dt, Ct, Ut, Et, Mt, Pt, Bt;
7157
+ var vt, ut, Rt, yt, _t, qt, Dt, Ct, Ut, Et, Mt, Pt, Bt;
7158
7158
  class CallsWebSocket {
7159
7159
  // 状态
7160
7160
  constructor(I) {
7161
- at(this, kt);
7161
+ at(this, vt);
7162
7162
  at(this, ut, {
7163
7163
  url: "wss://demo.putplay.cc/websocket",
7164
7164
  // 地址
@@ -7170,8 +7170,8 @@ class CallsWebSocket {
7170
7170
  });
7171
7171
  at(this, Rt, "");
7172
7172
  // 缓存登录凭证
7173
- at(this, dt, {});
7174
7173
  at(this, yt, {});
7174
+ at(this, _t, {});
7175
7175
  Z(this, "state", "closed");
7176
7176
  // 外部 发送消息之前
7177
7177
  Z(this, "sendMessageBefore", async () => {
@@ -7190,11 +7190,11 @@ class CallsWebSocket {
7190
7190
  });
7191
7191
  // 重连成功
7192
7192
  at(this, Dt, async (I) => {
7193
- V(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连成功", I), this.state = "connected", this.onReconnectSuccess(I);
7193
+ Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连成功", I), this.state = "connected", this.onReconnectSuccess(I);
7194
7194
  });
7195
7195
  // 重连停止
7196
7196
  at(this, Ct, async (I) => {
7197
- V(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连停止", I), this.close(), this.state = "closed", this.onReconnectStop(I);
7197
+ Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连停止", I), this.close(), this.state = "closed", this.onReconnectStop(I);
7198
7198
  });
7199
7199
  // 自定义心跳规则
7200
7200
  at(this, Ut, () => {
@@ -7223,7 +7223,7 @@ class CallsWebSocket {
7223
7223
  }
7224
7224
  let P = "#quickvo.logs";
7225
7225
  ignoreEvent.includes(_) && (P = "#quickvo.ignoreEvents");
7226
- const j = { "#action": q, timeStr: $, event: _, data: N, time: E, ...O }, Q = localStorage.getItem(P) || JSON.stringify([]), J = JSON.parse(Q), z = [j, ...J].slice(0, 500);
7226
+ const j = { "#action": q, timeStr: $, event: _, data: N, time: E, ...O }, V = localStorage.getItem(P) || JSON.stringify([]), J = JSON.parse(V), z = [j, ...J].slice(0, 500);
7227
7227
  localStorage.setItem(P, JSON.stringify(z));
7228
7228
  } catch (E) {
7229
7229
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: updataLogs is error", E);
@@ -7232,22 +7232,22 @@ class CallsWebSocket {
7232
7232
  // 创建事件
7233
7233
  at(this, Mt, (I, { resolve: u, reject: E }) => {
7234
7234
  const { sn: _ } = I, k = () => {
7235
- const n = V(this, dt)[_];
7236
- clearTimeout(n.destructionTimer), delete V(this, dt)[_];
7235
+ const n = Q(this, yt)[_];
7236
+ clearTimeout(n.destructionTimer), delete Q(this, yt)[_];
7237
7237
  }, e = setTimeout(() => {
7238
- const n = V(this, dt)[_];
7238
+ const n = Q(this, yt)[_];
7239
7239
  console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo:event is timeout", n.message), k(), E("event is timeout");
7240
- }, V(this, ut).timeout);
7241
- V(this, dt)[_] = { message: I, resolve: u, reject: E, destruction: k, destructionTimer: e };
7240
+ }, Q(this, ut).timeout);
7241
+ Q(this, yt)[_] = { message: I, resolve: u, reject: E, destruction: k, destructionTimer: e };
7242
7242
  });
7243
7243
  // 获取事件
7244
- at(this, Pt, (I) => V(this, dt)[I]);
7244
+ at(this, Pt, (I) => Q(this, yt)[I]);
7245
7245
  // 接收消息
7246
7246
  at(this, Bt, async (I) => {
7247
7247
  const u = new Uint8Array(I), E = com.quick.voice.proto.CommonRsp.decode(u), { sn: _, event: k } = E, e = onMessageFormat(E);
7248
- if (V(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff0097;padding:16px 0;", "------->quickvo: 响应消息↓", e), ignoreEvent.includes(k) || V(this, Et).call(this, "res", e)), notifyName_keys.includes(k))
7248
+ if (Q(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff0097;padding:16px 0;", "------->quickvo: 响应消息↓", e), ignoreEvent.includes(k) || Q(this, Et).call(this, "res", e)), notifyName_keys.includes(k))
7249
7249
  return this.emitNotify(k, L(e, ["code", "data", "desc"]));
7250
- const O = V(this, Pt).call(this, _);
7250
+ const O = Q(this, Pt).call(this, _);
7251
7251
  if (O) {
7252
7252
  const { resolve: $ = (D) => {
7253
7253
  }, destruction: N = () => {
@@ -7257,12 +7257,12 @@ class CallsWebSocket {
7257
7257
  });
7258
7258
  // 清除事件
7259
7259
  Z(this, "clearEvents", (I = []) => {
7260
- const u = Object.keys(V(this, dt));
7260
+ const u = Object.keys(Q(this, yt));
7261
7261
  I.length === 0 && (I = u);
7262
7262
  for (const E of u) {
7263
7263
  if (!I.includes(E)) continue;
7264
- const _ = V(this, dt)[E];
7265
- clearTimeout(_.destructionTimer), delete V(this, dt)[E];
7264
+ const _ = Q(this, yt)[E];
7265
+ clearTimeout(_.destructionTimer), delete Q(this, yt)[E];
7266
7266
  }
7267
7267
  });
7268
7268
  /**
@@ -7271,31 +7271,31 @@ class CallsWebSocket {
7271
7271
  * @returns
7272
7272
  */
7273
7273
  Z(this, "connect", async (I = "") => new Promise(async (u) => {
7274
- I && vt(this, Rt, I), V(this, kt) && (await V(this, kt).close(), this.state = "closed");
7275
- const E = `${V(this, ut).url}?s=${V(this, Rt)}&t=${Date.now()}`;
7276
- vt(this, kt, new M({
7277
- ...V(this, ut),
7274
+ I && wt(this, Rt, I), Q(this, vt) && (await Q(this, vt).close(), this.state = "closed");
7275
+ const E = `${Q(this, ut).url}?s=${Q(this, Rt)}&t=${Date.now()}`;
7276
+ wt(this, vt, new M({
7277
+ ...Q(this, ut),
7278
7278
  url: E,
7279
7279
  binaryType: "arraybuffer",
7280
- onMessage: V(this, Bt),
7281
- checkReconnect: V(this, qt),
7282
- getHeartbeatMsg: V(this, Ut),
7283
- onReconnectSuccess: V(this, Dt),
7284
- onReconnectStop: V(this, Ct)
7285
- })), this.state = "connecting", await V(this, kt).connect(), this.state = "connected", V(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 当前广播事件", V(this, yt)), u(V(this, kt));
7280
+ onMessage: Q(this, Bt),
7281
+ checkReconnect: Q(this, qt),
7282
+ getHeartbeatMsg: Q(this, Ut),
7283
+ onReconnectSuccess: Q(this, Dt),
7284
+ onReconnectStop: Q(this, Ct)
7285
+ })), this.state = "connecting", await Q(this, vt).connect(), this.state = "connected", Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 当前广播事件", Q(this, _t)), u(Q(this, vt));
7286
7286
  }));
7287
7287
  /**
7288
7288
  * 关闭
7289
7289
  */
7290
7290
  Z(this, "close", async () => {
7291
7291
  var u;
7292
- V(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: cws is close.");
7293
- const I = Object.keys(V(this, dt));
7292
+ Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: cws is close.");
7293
+ const I = Object.keys(Q(this, yt));
7294
7294
  for (const E of I) {
7295
- const { destructionTimer: _ } = V(this, dt)[E];
7295
+ const { destructionTimer: _ } = Q(this, yt)[E];
7296
7296
  clearTimeout(_);
7297
7297
  }
7298
- vt(this, dt, {}), await ((u = V(this, kt)) == null ? void 0 : u.close()), vt(this, kt, void 0), this.state = "closed";
7298
+ wt(this, yt, {}), await ((u = Q(this, vt)) == null ? void 0 : u.close()), wt(this, vt, void 0), this.state = "closed";
7299
7299
  });
7300
7300
  /**
7301
7301
  * 发送消息
@@ -7308,14 +7308,14 @@ class CallsWebSocket {
7308
7308
  event: k,
7309
7309
  sn: +`${n}${F(1e3, 9999)}`,
7310
7310
  time: n,
7311
- valid: V(this, ut).timeout,
7311
+ valid: Q(this, ut).timeout,
7312
7312
  version: 1,
7313
7313
  compress: !1,
7314
7314
  ...e
7315
7315
  });
7316
- V(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff9700;padding:16px 0;", "------->quickvo: 发送消息↑", O), ignoreEvent.includes(k) || V(this, Et).call(this, "req", O)), u && V(this, Mt).call(this, O, { resolve: E, reject: _ });
7316
+ Q(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff9700;padding:16px 0;", "------->quickvo: 发送消息↑", O), ignoreEvent.includes(k) || Q(this, Et).call(this, "req", O)), u && Q(this, Mt).call(this, O, { resolve: E, reject: _ });
7317
7317
  const $ = com.quick.voice.proto.CommonReq.encode(O).finish();
7318
- (N = V(this, kt)) == null || N.sendMessage($);
7318
+ (N = Q(this, vt)) == null || N.sendMessage($);
7319
7319
  }));
7320
7320
  /**
7321
7321
  * 触发广播事件
@@ -7323,7 +7323,7 @@ class CallsWebSocket {
7323
7323
  * @param result 事件响应值
7324
7324
  */
7325
7325
  Z(this, "emitNotify", async (I, u) => {
7326
- const E = V(this, yt)[I] || [];
7326
+ const E = Q(this, _t)[I] || [];
7327
7327
  for (const _ of E) {
7328
7328
  const { callback: k = async () => {
7329
7329
  } } = _;
@@ -7338,8 +7338,8 @@ class CallsWebSocket {
7338
7338
  */
7339
7339
  Z(this, "addNotify", (I, u = !1) => {
7340
7340
  const { event: E, sn: _ = ht(32) } = I;
7341
- V(this, yt)[E] || (V(this, yt)[E] = []);
7342
- const k = V(this, yt)[E], e = k.findIndex((n) => n.sn === _);
7341
+ Q(this, _t)[E] || (Q(this, _t)[E] = []);
7342
+ const k = Q(this, _t)[E], e = k.findIndex((n) => n.sn === _);
7343
7343
  return e !== -1 && k.splice(e, 1), u ? k.unshift(I) : k.push(I), _;
7344
7344
  });
7345
7345
  /**
@@ -7347,18 +7347,18 @@ class CallsWebSocket {
7347
7347
  */
7348
7348
  Z(this, "removeNotify", (I = []) => {
7349
7349
  if (I.length === 0)
7350
- vt(this, yt, {});
7350
+ wt(this, _t, {});
7351
7351
  else {
7352
- const u = Object.keys(V(this, yt));
7352
+ const u = Object.keys(Q(this, _t));
7353
7353
  for (const E of u)
7354
- V(this, yt)[E] = V(this, yt)[E].filter((_) => !I.includes(_.sn || ""));
7354
+ Q(this, _t)[E] = Q(this, _t)[E].filter((_) => !I.includes(_.sn || ""));
7355
7355
  }
7356
- V(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 移除广播事件", V(this, yt));
7356
+ Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 移除广播事件", Q(this, _t));
7357
7357
  });
7358
- vt(this, ut, { ...V(this, ut), ...I });
7358
+ wt(this, ut, { ...Q(this, ut), ...I });
7359
7359
  }
7360
7360
  }
7361
- kt = new WeakMap(), ut = new WeakMap(), Rt = new WeakMap(), dt = new WeakMap(), yt = new WeakMap(), qt = new WeakMap(), Dt = new WeakMap(), Ct = new WeakMap(), Ut = new WeakMap(), Et = new WeakMap(), Mt = new WeakMap(), Pt = new WeakMap(), Bt = new WeakMap();
7361
+ vt = new WeakMap(), ut = new WeakMap(), Rt = new WeakMap(), yt = new WeakMap(), _t = new WeakMap(), qt = new WeakMap(), Dt = new WeakMap(), Ct = new WeakMap(), Ut = new WeakMap(), Et = new WeakMap(), Mt = new WeakMap(), Pt = new WeakMap(), Bt = new WeakMap();
7362
7362
  var y = Object.defineProperty, x = (a) => {
7363
7363
  throw TypeError(a);
7364
7364
  }, g = (a, I, u) => I in a ? y(a, I, { enumerable: !0, configurable: !0, writable: !0, value: u }) : a[I] = u, h = (a, I, u) => g(a, typeof I != "symbol" ? I + "" : I, u), b = (a, I, u) => I.has(a) || x("Cannot " + u), o = (a, I, u) => (b(a, I, "read from private field"), u ? u.call(a) : I.get(a)), f = (a, I, u) => I.has(a) ? x("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(a) : I.set(a, u), p = (a, I, u, E) => (b(a, I, "write to private field"), I.set(a, u), u), d, c, l;
@@ -7551,33 +7551,33 @@ class RoomBase {
7551
7551
  * 处理为应用层数据
7552
7552
  */
7553
7553
  Z(this, "usersFilter", (I) => ft(I, ["id", "isSelf", "joinTime", "tracks", "callAction", "callActionStr", "callActionMap", "network", "permissions", "isPublished", "updateStreams"]).sort((_, k) => _.id.localeCompare(k.id, "en")));
7554
- V(this, Lt).call(this);
7554
+ Q(this, Lt).call(this);
7555
7555
  }
7556
7556
  }
7557
7557
  Lt = new WeakMap();
7558
- var $t, bt, wt, _t, jt, Zt, Tt, Ft;
7558
+ var $t, kt, dt, bt, jt, Zt, Tt, Ft;
7559
7559
  class RoomMedias extends RoomBase {
7560
7560
  // 媒体流上下文
7561
7561
  constructor() {
7562
7562
  super();
7563
7563
  at(this, $t, []);
7564
7564
  // 可用媒体设备列表
7565
- at(this, bt, /* @__PURE__ */ new Map());
7565
+ at(this, kt, /* @__PURE__ */ new Map());
7566
7566
  // 媒体流设备管理
7567
- at(this, wt, /* @__PURE__ */ new Map());
7567
+ at(this, dt, /* @__PURE__ */ new Map());
7568
7568
  // 媒体轨道参数管理
7569
- at(this, _t, /* @__PURE__ */ new Map());
7569
+ at(this, bt, /* @__PURE__ */ new Map());
7570
7570
  /**
7571
7571
  * 初始化媒体参数
7572
7572
  */
7573
7573
  at(this, jt, () => {
7574
- V(this, wt).set("microphoneCamera_audio", {}), V(this, wt).set("microphoneCamera_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), V(this, wt).set("screenSharing_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), V(this, wt).set("screenSharing_audio", {});
7574
+ Q(this, dt).set("microphoneCamera_audio", {}), Q(this, dt).set("microphoneCamera_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), Q(this, dt).set("screenSharing_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), Q(this, dt).set("screenSharing_audio", {});
7575
7575
  });
7576
7576
  /**
7577
7577
  * 初始化媒体设备类型
7578
7578
  */
7579
7579
  at(this, Zt, () => {
7580
- V(this, bt).set("audioinput", "default"), V(this, bt).set("videoinput", "default"), V(this, bt).set("audiooutput", "default");
7580
+ Q(this, kt).set("audioinput", "default"), Q(this, kt).set("videoinput", "default"), Q(this, kt).set("audiooutput", "default");
7581
7581
  });
7582
7582
  /**
7583
7583
  * 房间所有用户所有媒体流变化
@@ -7602,14 +7602,14 @@ class RoomMedias extends RoomBase {
7602
7602
  case "audio":
7603
7603
  {
7604
7604
  const $ = new AudioMediaContext(k);
7605
- V(this, _t).set(e, $);
7605
+ Q(this, bt).set(e, $);
7606
7606
  }
7607
7607
  break;
7608
7608
  // 视频媒体处理
7609
7609
  case "video":
7610
7610
  {
7611
7611
  const $ = new VideoMediaContext(k);
7612
- V(this, _t).set(e, $);
7612
+ Q(this, bt).set(e, $);
7613
7613
  }
7614
7614
  break;
7615
7615
  }
@@ -7617,7 +7617,7 @@ class RoomMedias extends RoomBase {
7617
7617
  const $ = this.getUserMediaStreamContext(u, E);
7618
7618
  if ($ && $.kind === "audio")
7619
7619
  try {
7620
- const N = V(this, bt).get("audiooutput");
7620
+ const N = Q(this, kt).get("audiooutput");
7621
7621
  (O = $.audioContext) == null || O.setSinkId(N);
7622
7622
  } catch (N) {
7623
7623
  console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: setSinkId is error", N);
@@ -7629,21 +7629,21 @@ class RoomMedias extends RoomBase {
7629
7629
  */
7630
7630
  Z(this, "getUserMediaStreamContext", (u, E) => {
7631
7631
  const _ = this.getUserMediaKey(u, E);
7632
- return V(this, _t).get(_);
7632
+ return Q(this, bt).get(_);
7633
7633
  });
7634
7634
  /**
7635
7635
  * 获取用户音频媒体流上下文
7636
7636
  */
7637
7637
  Z(this, "getUserAudioMediaStreamContext", (u, E) => {
7638
7638
  const _ = this.getUserMediaKey(u, E);
7639
- return V(this, _t).get(_);
7639
+ return Q(this, bt).get(_);
7640
7640
  });
7641
7641
  /**
7642
7642
  * 删除用户媒体流上下文
7643
7643
  */
7644
7644
  Z(this, "removeUserMediaStreamContext", (u, E) => {
7645
- const _ = this.getUserMediaKey(u, E), k = V(this, _t).get(_);
7646
- k == null || k.stop(), V(this, _t).delete(_);
7645
+ const _ = this.getUserMediaKey(u, E), k = Q(this, bt).get(_);
7646
+ k == null || k.stop(), Q(this, bt).delete(_);
7647
7647
  });
7648
7648
  /**
7649
7649
  * 获取某个用户的某个数据流
@@ -7676,16 +7676,16 @@ class RoomMedias extends RoomBase {
7676
7676
  * 清除所有媒体流使用
7677
7677
  */
7678
7678
  Z(this, "clearUserStreams", () => {
7679
- const u = V(this, _t).values();
7679
+ const u = Q(this, bt).values();
7680
7680
  for (const E of u)
7681
7681
  E.stop();
7682
- vt(this, _t, /* @__PURE__ */ new Map());
7682
+ wt(this, bt, /* @__PURE__ */ new Map());
7683
7683
  });
7684
7684
  /**
7685
7685
  * 设置轨道媒体参数
7686
7686
  */
7687
7687
  Z(this, "setMediaTrackConstraints", async (u, E) => {
7688
- V(this, wt).set(u, E);
7688
+ Q(this, dt).set(u, E);
7689
7689
  const k = this.getUserStream(this.options.userId, u).getTracks();
7690
7690
  if (k.length !== 0)
7691
7691
  for (const e of k) {
@@ -7697,75 +7697,114 @@ class RoomMedias extends RoomBase {
7697
7697
  * 初始化本地流
7698
7698
  */
7699
7699
  Z(this, "initLocalStream", async (u) => {
7700
- const { userId: E } = this.options, _ = V(this, wt).get(u);
7701
- switch (this.removeUserMediaStreamContext(E, u), u) {
7700
+ const { userId: E } = this.options;
7701
+ switch (u) {
7702
7702
  // 麦克风
7703
7703
  case "microphoneCamera_audio":
7704
7704
  {
7705
- const k = V(this, bt).get("audioinput"), e = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: k, ..._ }, video: !1 });
7705
+ this.removeUserMediaStreamContext(E, "microphoneCamera_audio");
7706
+ const _ = Q(this, kt).get("audioinput"), k = Q(this, dt).get("microphoneCamera_audio"), e = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: _, ...k }, video: !1 });
7706
7707
  await this.initUserMediaStreamContext(E, "microphoneCamera_audio", e);
7707
7708
  }
7708
7709
  break;
7709
7710
  // 摄像头
7710
7711
  case "microphoneCamera_video":
7711
7712
  {
7712
- const k = V(this, bt).get("videoinput"), e = await navigator.mediaDevices.getUserMedia({ audio: !1, video: { deviceId: k, ..._ } });
7713
+ this.removeUserMediaStreamContext(E, "microphoneCamera_video");
7714
+ const _ = Q(this, kt).get("videoinput"), k = Q(this, dt).get("microphoneCamera_video"), e = await navigator.mediaDevices.getUserMedia({ audio: !1, video: { deviceId: _, ...k } });
7713
7715
  await this.initUserMediaStreamContext(E, "microphoneCamera_video", e);
7714
7716
  }
7715
7717
  break;
7718
+ // 麦克风 + 摄像头
7719
+ case "microphoneCamera":
7720
+ {
7721
+ this.removeUserMediaStreamContext(E, "microphoneCamera_audio"), this.removeUserMediaStreamContext(E, "microphoneCamera_video");
7722
+ const _ = Q(this, kt).get("audioinput"), k = Q(this, kt).get("videoinput"), e = Q(this, dt).get("microphoneCamera_audio"), n = Q(this, dt).get("microphoneCamera_video"), O = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: _, ...e }, video: { deviceId: k, ...n } });
7723
+ await this.initUserMediaStreamContext(E, "microphoneCamera_audio", O);
7724
+ }
7725
+ break;
7716
7726
  // 屏幕共享 音频
7717
7727
  case "screenSharing_audio":
7718
7728
  {
7719
- const k = await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._ }), e = k.getTracks();
7729
+ this.removeUserMediaStreamContext(E, "screenSharing_audio");
7730
+ const _ = Q(this, dt).get("screenSharing_audio"), e = (await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._ })).getTracks();
7720
7731
  for (const n of e) {
7721
- const { kind: O } = n, $ = new MediaStream();
7722
- $.addTrack(n), k.removeTrack(n), O === "audio" && await this.initUserMediaStreamContext(E, "screenSharing_audio", $), O === "video" && await this.initUserMediaStreamContext(E, "screenSharing_video", $);
7732
+ const { kind: O } = n;
7733
+ if (O === "audio") {
7734
+ const $ = new MediaStream();
7735
+ $.addTrack(n), await this.initUserMediaStreamContext(E, "screenSharing_audio", $);
7736
+ }
7723
7737
  }
7724
7738
  }
7725
7739
  break;
7726
7740
  // 屏幕共享 视频
7727
7741
  case "screenSharing_video":
7728
7742
  {
7729
- const k = await navigator.mediaDevices.getDisplayMedia({ audio: !1, video: !0, ..._ });
7730
- await this.initUserMediaStreamContext(E, "screenSharing_video", k);
7743
+ this.removeUserMediaStreamContext(E, u);
7744
+ const _ = Q(this, dt).get(u), e = (await navigator.mediaDevices.getDisplayMedia({ audio: !1, video: !0, ..._ })).getTracks();
7745
+ for (const n of e) {
7746
+ const { kind: O } = n;
7747
+ if (O === "video") {
7748
+ const $ = new MediaStream();
7749
+ $.addTrack(n), await this.initUserMediaStreamContext(E, "screenSharing_video", $);
7750
+ }
7751
+ }
7752
+ }
7753
+ break;
7754
+ // 屏幕共享 音频+视频
7755
+ case "screenSharing":
7756
+ {
7757
+ this.removeUserMediaStreamContext(E, "screenSharing_audio"), this.removeUserMediaStreamContext(E, "screenSharing_video");
7758
+ const _ = Q(this, dt).get("screenSharing_audio"), k = Q(this, dt).get("screenSharing_video"), n = (await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._, ...k })).getTracks();
7759
+ for (const O of n) {
7760
+ const { kind: $ } = O;
7761
+ if ($ === "audio") {
7762
+ const N = new MediaStream();
7763
+ N.addTrack(O), await this.initUserMediaStreamContext(E, "screenSharing_audio", N);
7764
+ }
7765
+ if ($ === "video") {
7766
+ const N = new MediaStream();
7767
+ N.addTrack(O), await this.initUserMediaStreamContext(E, "screenSharing_video", N);
7768
+ }
7769
+ }
7731
7770
  }
7732
7771
  break;
7733
7772
  }
7734
7773
  {
7735
- const k = this.getUserStreams(E);
7736
- this.cwsIns.emitNotify("onLocalStream", { code: 200, data: k, desc: "local stream is change." }), this.emitNotifyUpdateUsersStreams([{ userId: E, updateStreams: { [u]: !0 } }]);
7774
+ const _ = this.getUserStreams(E);
7775
+ this.cwsIns.emitNotify("onLocalStream", { code: 200, data: _, desc: "local stream is change." }), this.emitNotifyUpdateUsersStreams([{ userId: E, updateStreams: { [u]: !0 } }]);
7737
7776
  }
7738
7777
  });
7739
7778
  /**
7740
7779
  * 获取媒体设备列表
7741
7780
  */
7742
7781
  at(this, Tt, async () => !navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices ? (console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 不支持 enumerateDevices"), []) : (await navigator.mediaDevices.enumerateDevices().then((u) => {
7743
- vt(this, $t, u);
7782
+ wt(this, $t, u);
7744
7783
  }).catch(function(u) {
7745
7784
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: getEnumerateDevices is err", u);
7746
- }), V(this, $t)));
7785
+ }), Q(this, $t)));
7747
7786
  /**
7748
7787
  * 媒体设备发生变化
7749
7788
  */
7750
7789
  at(this, Ft, () => {
7751
7790
  navigator.mediaDevices && (navigator.mediaDevices.ondevicechange = async () => {
7752
- await V(this, Tt).call(this), this.cwsIns.emitNotify("onDevicechange", { code: 200, data: {}, desc: "device is change." });
7753
- }), V(this, Tt).call(this);
7791
+ await Q(this, Tt).call(this), this.cwsIns.emitNotify("onDevicechange", { code: 200, data: {}, desc: "device is change." });
7792
+ }), Q(this, Tt).call(this);
7754
7793
  });
7755
7794
  /**
7756
7795
  * 获取正在使用的媒体设备ID
7757
7796
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7758
7797
  * @returns deviceId 设备ID
7759
7798
  */
7760
- Z(this, "getMediaDeviceKind", (u) => V(this, bt).get(u));
7799
+ Z(this, "getMediaDeviceKind", (u) => Q(this, kt).get(u));
7761
7800
  /**
7762
7801
  * 设置正在使用的媒体设备
7763
7802
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7764
7803
  * @param deviceId 设备ID
7765
7804
  */
7766
7805
  Z(this, "setDeviceKind", async (u, E) => {
7767
- if (V(this, bt).set(u, E), u === "audiooutput") {
7768
- const _ = V(this, _t).values();
7806
+ if (Q(this, kt).set(u, E), u === "audiooutput") {
7807
+ const _ = Q(this, bt).values();
7769
7808
  for (const k of _)
7770
7809
  k.kind === "audio" && "setSinkId" in HTMLMediaElement.prototype && k.audioContext.setSinkId(E);
7771
7810
  }
@@ -7781,7 +7820,7 @@ class RoomMedias extends RoomBase {
7781
7820
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7782
7821
  * @returns MediaDeviceInfo[]
7783
7822
  */
7784
- Z(this, "getEnumerateDevices", async (u) => (await V(this, Tt).call(this), V(this, $t).filter((_) => _.kind === u)));
7823
+ Z(this, "getEnumerateDevices", async (u) => (await Q(this, Tt).call(this), Q(this, $t).filter((_) => _.kind === u)));
7785
7824
  /**
7786
7825
  * 获取可用音频输入设备
7787
7826
  * @returns MediaDeviceInfo[]
@@ -7797,10 +7836,10 @@ class RoomMedias extends RoomBase {
7797
7836
  * @returns MediaDeviceInfo[]
7798
7837
  */
7799
7838
  Z(this, "getEnumerateVideoinputDevices", () => this.getEnumerateDevices("videoinput"));
7800
- V(this, Ft).call(this), V(this, Zt).call(this), V(this, jt).call(this);
7839
+ Q(this, Ft).call(this), Q(this, Zt).call(this), Q(this, jt).call(this);
7801
7840
  }
7802
7841
  }
7803
- $t = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), _t = new WeakMap(), jt = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Ft = new WeakMap();
7842
+ $t = new WeakMap(), kt = new WeakMap(), dt = new WeakMap(), bt = new WeakMap(), jt = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Ft = new WeakMap();
7804
7843
  class RoomUsers extends RoomMedias {
7805
7844
  constructor() {
7806
7845
  super();
@@ -8127,28 +8166,28 @@ class RoomPeer extends RoomUsers {
8127
8166
  // 网络抖动
8128
8167
  });
8129
8168
  Z(this, "initPeer", () => {
8130
- this.peerIns = new RTCPeerConnection({ bundlePolicy: "max-bundle" }), this.transceiverMap = /* @__PURE__ */ new Map(), V(this, zt).call(this), V(this, Wt).call(this);
8169
+ this.peerIns = new RTCPeerConnection({ bundlePolicy: "max-bundle" }), this.transceiverMap = /* @__PURE__ */ new Map(), Q(this, zt).call(this), Q(this, Wt).call(this);
8131
8170
  });
8132
8171
  // 初始化假数据流
8133
8172
  at(this, Ht, () => {
8134
8173
  for (const u of mediaType_keys)
8135
8174
  switch (u) {
8136
8175
  case "microphoneCamera_audio":
8137
- V(this, St).set("microphoneCamera_audio", createMutedAudioStream());
8176
+ Q(this, St).set("microphoneCamera_audio", createMutedAudioStream());
8138
8177
  break;
8139
8178
  case "microphoneCamera_video":
8140
- V(this, St).set("microphoneCamera_video", createFakeVideoStream());
8179
+ Q(this, St).set("microphoneCamera_video", createFakeVideoStream());
8141
8180
  break;
8142
8181
  case "screenSharing_audio":
8143
- V(this, St).set("screenSharing_audio", createMutedAudioStream());
8182
+ Q(this, St).set("screenSharing_audio", createMutedAudioStream());
8144
8183
  break;
8145
8184
  case "screenSharing_video":
8146
- V(this, St).set("screenSharing_video", createFakeVideoStream());
8185
+ Q(this, St).set("screenSharing_video", createFakeVideoStream());
8147
8186
  break;
8148
8187
  }
8149
8188
  });
8150
8189
  // 获取假数据流
8151
- at(this, xt, (u) => V(this, St).get(u));
8190
+ at(this, xt, (u) => Q(this, St).get(u));
8152
8191
  /**
8153
8192
  * 替换发射器媒体流
8154
8193
  */
@@ -8160,7 +8199,7 @@ class RoomPeer extends RoomUsers {
8160
8199
  let n;
8161
8200
  if (e) {
8162
8201
  const { sender: O } = e;
8163
- E ? n = this.getUserStream(_, k) : n = V(this, xt).call(this, k);
8202
+ E ? n = this.getUserStream(_, k) : n = Q(this, xt).call(this, k);
8164
8203
  const [$] = n.getTracks();
8165
8204
  O.replaceTrack($);
8166
8205
  }
@@ -8189,7 +8228,7 @@ class RoomPeer extends RoomUsers {
8189
8228
  const E = [];
8190
8229
  for (const _ of u) {
8191
8230
  if (this.transceiverMap.has(_)) continue;
8192
- const k = V(this, xt).call(this, _), [e] = k.getTracks(), n = this.peerIns.addTransceiver(e, { direction: "sendonly" });
8231
+ const k = Q(this, xt).call(this, _), [e] = k.getTracks(), n = this.peerIns.addTransceiver(e, { direction: "sendonly" });
8193
8232
  this.transceiverMap.set(_, n), E.push(_);
8194
8233
  }
8195
8234
  if (u.length === 0 || E.length) {
@@ -8242,8 +8281,8 @@ class RoomPeer extends RoomUsers {
8242
8281
  const { userId: q, mediaType: P } = D;
8243
8282
  if (!q || !P) continue;
8244
8283
  $.has(q) || $.set(q, { userId: q, tracks: [], updateStreams: {} });
8245
- const Q = $.get(q);
8246
- Q.tracks.push(D), Q.updateStreams[P] = !0;
8284
+ const V = $.get(q);
8285
+ V.tracks.push(D), V.updateStreams[P] = !0;
8247
8286
  }
8248
8287
  const N = [...$.values()];
8249
8288
  for (const D of N) {
@@ -8252,7 +8291,7 @@ class RoomPeer extends RoomUsers {
8252
8291
  }
8253
8292
  await this.emitNotifyUpdateUsersStreams(N), this.peerIns.removeEventListener("track", O), _(!0);
8254
8293
  }, O = async ($) => {
8255
- const { streams: N, transceiver: D } = $, [q] = N, { mid: P, receiver: j } = D, { track: Q } = j, { id: J, kind: z } = Q, Y = k.find((nt) => nt.mid === `${P}`);
8294
+ const { streams: N, transceiver: D } = $, [q] = N, { mid: P, receiver: j } = D, { track: V } = j, { id: J, kind: z } = V, Y = k.find((nt) => nt.mid === `${P}`);
8256
8295
  if (!Y) return;
8257
8296
  const { userId: et, mediaType: tt } = Y;
8258
8297
  if (!(!et || !tt)) {
@@ -8437,7 +8476,7 @@ class RoomPeer extends RoomUsers {
8437
8476
  lt && (e = lt), it && (n = it), st && (N += st), ct && (D += ct), rt && q.push((rt * 100).toFixed(2)), ot && P.push(ot.toFixed(2));
8438
8477
  }
8439
8478
  P.sort().reverse(), q.sort().reverse();
8440
- const j = N - O, Q = D - $, J = j === 0 ? "0.00" : (Q / j).toFixed(2), [z = "0"] = q, [Y = "0"] = P, et = { inboundBytes: e, outboundBytes: n, lostRate: J, roundTripTime: z, jitter: Y };
8479
+ const j = N - O, V = D - $, J = j === 0 ? "0.00" : (V / j).toFixed(2), [z = "0"] = q, [Y = "0"] = P, et = { inboundBytes: e, outboundBytes: n, lostRate: J, roundTripTime: z, jitter: Y };
8441
8480
  this.peerNetwork = et;
8442
8481
  const tt = (nt, lt, it) => {
8443
8482
  const st = Number(nt), ct = Number(lt), ot = Number(it);
@@ -8461,7 +8500,7 @@ class RoomPeer extends RoomUsers {
8461
8500
  */
8462
8501
  at(this, Wt, () => {
8463
8502
  const u = async () => {
8464
- this.peerIns.connectionState !== "connected" || !this.options.roomId || V(this, Jt).call(this);
8503
+ this.peerIns.connectionState !== "connected" || !this.options.roomId || Q(this, Jt).call(this);
8465
8504
  };
8466
8505
  this.getPeerStatsTimer = setInterval(u, 1 * 1e3);
8467
8506
  });
@@ -8469,7 +8508,7 @@ class RoomPeer extends RoomUsers {
8469
8508
  * 停止网络报告分析
8470
8509
  */
8471
8510
  Z(this, "stopGetPeerStats", () => clearInterval(this.getPeerStatsTimer));
8472
- V(this, Ht).call(this);
8511
+ Q(this, Ht).call(this);
8473
8512
  }
8474
8513
  }
8475
8514
  St = new WeakMap(), Ht = new WeakMap(), xt = new WeakMap(), zt = new WeakMap(), Jt = new WeakMap(), Wt = new WeakMap();
@@ -8488,19 +8527,21 @@ class RoomCalls extends RoomPeer {
8488
8527
  */
8489
8528
  Z(this, "setLocalStream", (u, E) => new Promise(async (_, k) => {
8490
8529
  try {
8491
- this.setLocalStreamActiveMap.set(u, E);
8492
8530
  const { userId: e } = this.options;
8493
- if (E ? await this.initLocalStream(u) : this.removeUserMediaStreamContext(e, u), u === "screenSharing_audio" || u === "screenSharing_video") {
8494
- {
8495
- const $ = this.getUserStream(e, "screenSharing_audio").getTracks();
8496
- for (const N of $)
8497
- N.onended = () => this.stopPublish(["screenSharing_audio", "screenSharing_video"]);
8498
- }
8499
- {
8500
- const $ = this.getUserStream(e, "screenSharing_video").getTracks();
8501
- for (const N of $)
8502
- N.onended = () => this.stopPublish(["screenSharing_audio", "screenSharing_video"]);
8531
+ for (const O of u)
8532
+ if (this.setLocalStreamActiveMap.set(O, E), E === !1) {
8533
+ this.removeUserMediaStreamContext(e, O);
8534
+ continue;
8503
8535
  }
8536
+ if (u.includes("microphoneCamera_audio") && u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera"), u.includes("microphoneCamera_audio") && await this.initLocalStream("microphoneCamera_audio"), u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera_video"), u.includes("screenSharing_audio") && u.includes("screenSharing_video") && await this.initLocalStream("screenSharing"), u.includes("screenSharing_audio") && !u.includes("screenSharing_video") && await this.initLocalStream("screenSharing_audio"), u.includes("screenSharing_video") && !u.includes("screenSharing_audio") && await this.initLocalStream("screenSharing_video"), u.includes("screenSharing_audio")) {
8537
+ const $ = this.getUserStream(e, "screenSharing_audio").getTracks();
8538
+ for (const N of $)
8539
+ N.onended = () => this.stopPublish(["screenSharing_audio"]);
8540
+ }
8541
+ if (u.includes("screenSharing_video")) {
8542
+ const $ = this.getUserStream(e, "screenSharing_video").getTracks();
8543
+ for (const N of $)
8544
+ N.onended = () => this.stopPublish(["screenSharing_video"]);
8504
8545
  }
8505
8546
  const n = this.getUserStreams(e);
8506
8547
  _(n);
@@ -8527,6 +8568,21 @@ class RoomCalls extends RoomPeer {
8527
8568
  };
8528
8569
  u === "audioinput" && await n("microphoneCamera_audio"), u === "videoinput" && await n("microphoneCamera_video");
8529
8570
  });
8571
+ /**
8572
+ * 设置正在使用的媒体设备
8573
+ * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
8574
+ * @param deviceId 设备ID
8575
+ */
8576
+ Z(this, "changeScreenSharing", async (u) => {
8577
+ const E = await this.getCaller(), { tracks: _ = [], callActionMap: k } = E;
8578
+ try {
8579
+ await this.setLocalStream(u, !0), console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->Breathe: 123");
8580
+ for (const e of u)
8581
+ _.find((O) => O.mediaType === e && k[e]) && await this.replaceSenderStream([e], !0);
8582
+ } catch (e) {
8583
+ console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: changeScreenSharing is error.", e);
8584
+ }
8585
+ });
8530
8586
  /**
8531
8587
  * 添加广播事件
8532
8588
  * @param notify Notify
@@ -8568,8 +8624,8 @@ class RoomCalls extends RoomPeer {
8568
8624
  }).then(async (D) => {
8569
8625
  const { code: q = 0, desc: P = "服务器繁忙", data: j } = D;
8570
8626
  if (q !== 200) return _(P);
8571
- const { roomId: Q = "", roomUsers: J = [] } = j;
8572
- if (Q !== O) return _("加入的房间不匹配");
8627
+ const { roomId: V = "", roomUsers: J = [] } = j;
8628
+ if (V !== O) return _("加入的房间不匹配");
8573
8629
  this.createSession(), await this.updateUsers(J), e();
8574
8630
  });
8575
8631
  } catch (O) {
@@ -8632,27 +8688,25 @@ class RoomCalls extends RoomPeer {
8632
8688
  Z(this, "publish", (u) => new Promise(async (E, _) => {
8633
8689
  const k = async () => {
8634
8690
  try {
8635
- u.includes("screenSharing_audio") && !u.includes("screenSharing_video") && (u = [...u, "screenSharing_video"]), await this.replaceSenderStream(u, !1), await this.createTrack(u);
8636
- const e = await this.getCaller(), n = [];
8691
+ await this.replaceSenderStream(u, !1), await this.createTrack(u);
8692
+ const e = await this.getCaller();
8693
+ try {
8694
+ await this.setLocalStream(u, !0);
8695
+ } catch {
8696
+ }
8697
+ const n = [];
8637
8698
  for (const D of u)
8638
- if (this.getUserStream(e.id, D).getTracks().length === 0)
8639
- try {
8640
- await this.setLocalStream(D, !0);
8641
- } catch (j) {
8642
- n.push(D), console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: setLocalStream is error.", j);
8643
- }
8699
+ this.getUserStream(e.id, D).getTracks().length === 0 && n.push(D);
8644
8700
  const O = this.getSenderTracks(u), $ = [...e.tracks, ...O];
8645
8701
  await this.updateUsertracks(e.id, $, !0);
8646
8702
  const N = await this.getCallAction($);
8647
- await V(this, It).call(this, N), await this.replaceSenderStream(u, !0), V(this, Kt).call(this, u), await this.inactiveTracks(n, !1);
8703
+ await Q(this, It).call(this, N), await this.replaceSenderStream(u, !0), Q(this, Kt).call(this, u), n.length !== 0 && await this.inactiveTracks(n, !1);
8648
8704
  {
8649
8705
  await this.emitNotifyUpdateUsers();
8650
8706
  const D = await this.getCaller();
8651
8707
  E(D);
8652
8708
  }
8653
8709
  } catch (e) {
8654
- for (const n of u)
8655
- await this.setLocalStream(n, !1);
8656
8710
  _(`publish is error: ${e.message || e}`);
8657
8711
  }
8658
8712
  };
@@ -8679,7 +8733,7 @@ class RoomCalls extends RoomPeer {
8679
8733
  await this.replaceSenderStream(u, !0), await this.removeSenders(u), await this.closeUserTracks(e.id, n, !0);
8680
8734
  {
8681
8735
  const $ = await this.getCallAction(e.tracks);
8682
- await V(this, It).call(this, $);
8736
+ await Q(this, It).call(this, $);
8683
8737
  }
8684
8738
  await this.createOffer(), await this.cwsIns.sendMessage({
8685
8739
  event: "closeTrack",
@@ -8710,8 +8764,8 @@ class RoomCalls extends RoomPeer {
8710
8764
  for (const q of n) {
8711
8765
  const { isSelf: P, tracks: j = [] } = q;
8712
8766
  if (!P) {
8713
- const Q = j.filter(({ trackName: J, mid: z = "" }) => z !== "" && (u.includes(J) || u.length === 0));
8714
- Q.length !== 0 && O.push({ ...q, tracks: Q });
8767
+ const V = j.filter(({ trackName: J, mid: z = "" }) => z !== "" && (u.includes(J) || u.length === 0));
8768
+ V.length !== 0 && O.push({ ...q, tracks: V });
8715
8769
  }
8716
8770
  }
8717
8771
  const $ = async () => {
@@ -8721,7 +8775,7 @@ class RoomCalls extends RoomPeer {
8721
8775
  if (O.length === 0) return $();
8722
8776
  const N = [];
8723
8777
  for (const q of O) {
8724
- const { id: P, tracks: j } = q, Q = ft(j, ["type", "trackName"]), J = { id: P, tracks: Q };
8778
+ const { id: P, tracks: j } = q, V = ft(j, ["type", "trackName"]), J = { id: P, tracks: V };
8725
8779
  N.push(J);
8726
8780
  }
8727
8781
  const D = async () => {
@@ -8729,11 +8783,11 @@ class RoomCalls extends RoomPeer {
8729
8783
  event: "subscribe",
8730
8784
  data: { users: N }
8731
8785
  }).then(async (q) => {
8732
- const { code: P = 0, data: j, desc: Q } = q;
8786
+ const { code: P = 0, data: j, desc: V } = q;
8733
8787
  if (P !== 200) {
8734
8788
  if (E > 0)
8735
8789
  return await new Promise((Y) => setTimeout(() => Y(!0), 300)), E = E - 1, D();
8736
- throw this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: subscribe is error. count 0", { trackNames: u }), new Error(Q);
8790
+ throw this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: subscribe is error. count 0", { trackNames: u }), new Error(V);
8737
8791
  }
8738
8792
  const { remoteSdp: J, users: z = [] } = j;
8739
8793
  this.onSubscribeUserTracks(z).then(async () => {
@@ -8761,8 +8815,8 @@ class RoomCalls extends RoomPeer {
8761
8815
  for (const $ of e) {
8762
8816
  const { tracks: N = [] } = $;
8763
8817
  for (const D of N) {
8764
- const { type: q, mid: P, trackName: j, mediaType: Q, msid: J } = D;
8765
- if (!(!Q || !J) && (u.length === 0 || u.includes(j))) {
8818
+ const { type: q, mid: P, trackName: j, mediaType: V, msid: J } = D;
8819
+ if (!(!V || !J) && (u.length === 0 || u.includes(j))) {
8766
8820
  const z = { type: q, mid: P, trackName: J };
8767
8821
  n.push(z), await this.closeUserTracks($.id, [D]);
8768
8822
  }
@@ -8806,7 +8860,7 @@ class RoomCalls extends RoomPeer {
8806
8860
  }
8807
8861
  }
8808
8862
  const O = await this.getCallAction(n);
8809
- await V(this, It).call(this, O), await this.emitNotifyUpdateUsers(), _(!0);
8863
+ await Q(this, It).call(this, O), await this.emitNotifyUpdateUsers(), _(!0);
8810
8864
  }));
8811
8865
  /**
8812
8866
  * 远端调试
@@ -8918,8 +8972,8 @@ class RoomCalls extends RoomPeer {
8918
8972
  /**
8919
8973
  * 提前建连
8920
8974
  */
8921
- Z(this, "earlyConnect", () => {
8922
- this.isEarly = !0, this.createWs(), this.createSession(), this.createTrack(["microphoneCamera_audio", "microphoneCamera_video"]);
8975
+ Z(this, "earlyConnect", (u = []) => {
8976
+ this.isEarly = !0, this.createWs(), this.createSession(), u.length === 0 && (u = ["microphoneCamera_audio", "microphoneCamera_video"]), this.createTrack(u);
8923
8977
  });
8924
8978
  this.setRoomState("ready");
8925
8979
  }
@@ -9037,13 +9091,13 @@ class QuickVO extends Room {
9037
9091
  */
9038
9092
  Z(this, "addRequestAnimationFrame", async (u, E) => {
9039
9093
  {
9040
- const k = V(this, gt).get(u);
9094
+ const k = Q(this, gt).get(u);
9041
9095
  k && cancelAnimationFrame(k);
9042
9096
  }
9043
9097
  const _ = (k = Date.now()) => {
9044
9098
  E(k);
9045
9099
  const e = requestAnimationFrame(_);
9046
- V(this, gt).set(u, e);
9100
+ Q(this, gt).set(u, e);
9047
9101
  };
9048
9102
  _();
9049
9103
  });
@@ -9052,10 +9106,10 @@ class QuickVO extends Room {
9052
9106
  * @param keys string[] = []
9053
9107
  */
9054
9108
  Z(this, "clearRequestAnimationFrame", async (u = []) => {
9055
- u.length === 0 && (u = [...V(this, gt).keys()]);
9109
+ u.length === 0 && (u = [...Q(this, gt).keys()]);
9056
9110
  const E = [];
9057
9111
  for (const _ of u) {
9058
- const k = V(this, gt).get(_);
9112
+ const k = Q(this, gt).get(_);
9059
9113
  k && (cancelAnimationFrame(k), E.push(k));
9060
9114
  }
9061
9115
  return E;
@@ -9067,7 +9121,7 @@ class QuickVO extends Room {
9067
9121
  Z(this, "destroy", async () => {
9068
9122
  this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 销毁SDK"), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams(), this.cwsIns.clearEvents(), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {}, desc: "sdk is destroy." }), await this.cwsIns.close();
9069
9123
  });
9070
- this.setOptions(u), this.initCwsCall(), V(this, Qt).call(this), V(this, Vt).call(this), V(this, Yt).call(this), V(this, Gt).call(this);
9124
+ this.setOptions(u), this.initCwsCall(), Q(this, Qt).call(this), Q(this, Vt).call(this), Q(this, Yt).call(this), Q(this, Gt).call(this);
9071
9125
  }
9072
9126
  }
9073
9127
  gt = new WeakMap(), Gt = new WeakMap(), Qt = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap();