quickvo-sdk-js 0.2.3 → 0.2.5

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
@@ -587,9 +587,9 @@ function requireParser() {
587
587
  var Z = F[0], H = F.slice(2);
588
588
  Z === "m" && (M.push({ rtp: [], fmtp: [] }), L = M[M.length - 1]);
589
589
  for (var z = 0; z < (R[Z] || []).length; z += 1) {
590
- var Y = R[Z][z];
591
- if (Y.reg.test(H))
592
- return U(Y, L, H);
590
+ var V = R[Z][z];
591
+ if (V.reg.test(H))
592
+ return U(V, L, H);
593
593
  }
594
594
  }), A.media = M, A;
595
595
  };
@@ -798,7 +798,7 @@ class AudioMediaContext {
798
798
  class VideoMediaContext {
799
799
  constructor(D) {
800
800
  K(this, "kind", "video");
801
- K(this, "stream");
801
+ K(this, "stream", new MediaStream());
802
802
  /**
803
803
  * 停止
804
804
  */
@@ -819,7 +819,7 @@ class VideoMediaContext {
819
819
  * 获取数据流
820
820
  */
821
821
  K(this, "getStream", () => this.stream);
822
- this.stream = D;
822
+ this.stream.addTrack(D);
823
823
  }
824
824
  }
825
825
  const enum_roomState = {
@@ -947,16 +947,16 @@ function requireBase64() {
947
947
  U[$[R] = R < 26 ? R + 65 : R < 52 ? R + 71 : R < 62 ? R - 4 : R - 59 | 43] = R++;
948
948
  D.encode = function(o, A, M) {
949
949
  for (var L = null, F = [], Z = 0, H = 0, z; A < M; ) {
950
- var Y = o[A++];
950
+ var V = o[A++];
951
951
  switch (H) {
952
952
  case 0:
953
- F[Z++] = $[Y >> 2], z = (Y & 3) << 4, H = 1;
953
+ F[Z++] = $[V >> 2], z = (V & 3) << 4, H = 1;
954
954
  break;
955
955
  case 1:
956
- F[Z++] = $[z | Y >> 4], z = (Y & 15) << 2, H = 2;
956
+ F[Z++] = $[z | V >> 4], z = (V & 15) << 2, H = 2;
957
957
  break;
958
958
  case 2:
959
- F[Z++] = $[z | Y >> 6], F[Z++] = $[Y & 63], H = 0;
959
+ F[Z++] = $[z | V >> 6], F[Z++] = $[V & 63], H = 0;
960
960
  break;
961
961
  }
962
962
  Z > 8191 && ((L || (L = [])).push(String.fromCharCode.apply(String, F)), Z = 0);
@@ -1033,11 +1033,11 @@ function requireFloat() {
1033
1033
  function _(N) {
1034
1034
  return typeof Float32Array < "u" ? function() {
1035
1035
  var e = new Float32Array([-0]), o = new Uint8Array(e.buffer), A = o[3] === 128;
1036
- function M(H, z, Y) {
1037
- e[0] = H, z[Y] = o[0], z[Y + 1] = o[1], z[Y + 2] = o[2], z[Y + 3] = o[3];
1036
+ function M(H, z, V) {
1037
+ e[0] = H, z[V] = o[0], z[V + 1] = o[1], z[V + 2] = o[2], z[V + 3] = o[3];
1038
1038
  }
1039
- function L(H, z, Y) {
1040
- e[0] = H, z[Y] = o[3], z[Y + 1] = o[2], z[Y + 2] = o[1], z[Y + 3] = o[0];
1039
+ function L(H, z, V) {
1040
+ e[0] = H, z[V] = o[3], z[V + 1] = o[2], z[V + 2] = o[1], z[V + 3] = o[0];
1041
1041
  }
1042
1042
  N.writeFloatLE = A ? M : L, N.writeFloatBE = A ? L : M;
1043
1043
  function F(H, z) {
@@ -1077,11 +1077,11 @@ function requireFloat() {
1077
1077
  N.readFloatLE = o.bind(null, U), N.readFloatBE = o.bind(null, R);
1078
1078
  }(), typeof Float64Array < "u" ? function() {
1079
1079
  var e = new Float64Array([-0]), o = new Uint8Array(e.buffer), A = o[7] === 128;
1080
- function M(H, z, Y) {
1081
- e[0] = H, z[Y] = o[0], z[Y + 1] = o[1], z[Y + 2] = o[2], z[Y + 3] = o[3], z[Y + 4] = o[4], z[Y + 5] = o[5], z[Y + 6] = o[6], z[Y + 7] = o[7];
1080
+ function M(H, z, V) {
1081
+ e[0] = H, z[V] = o[0], z[V + 1] = o[1], z[V + 2] = o[2], z[V + 3] = o[3], z[V + 4] = o[4], z[V + 5] = o[5], z[V + 6] = o[6], z[V + 7] = o[7];
1082
1082
  }
1083
- function L(H, z, Y) {
1084
- e[0] = H, z[Y] = o[7], z[Y + 1] = o[6], z[Y + 2] = o[5], z[Y + 3] = o[4], z[Y + 4] = o[3], z[Y + 5] = o[2], z[Y + 6] = o[1], z[Y + 7] = o[0];
1083
+ function L(H, z, V) {
1084
+ e[0] = H, z[V] = o[7], z[V + 1] = o[6], z[V + 2] = o[5], z[V + 3] = o[4], z[V + 4] = o[3], z[V + 5] = o[2], z[V + 6] = o[1], z[V + 7] = o[0];
1085
1085
  }
1086
1086
  N.writeDoubleLE = A ? M : L, N.writeDoubleBE = A ? L : M;
1087
1087
  function F(H, z) {
@@ -1107,19 +1107,19 @@ function requireFloat() {
1107
1107
  else if (F > 17976931348623157e292)
1108
1108
  A(0, Z, H + M), A((z << 31 | 2146435072) >>> 0, Z, H + L);
1109
1109
  else {
1110
- var Y;
1110
+ var V;
1111
1111
  if (F < 22250738585072014e-324)
1112
- Y = F / 5e-324, A(Y >>> 0, Z, H + M), A((z << 31 | Y / 4294967296) >>> 0, Z, H + L);
1112
+ V = F / 5e-324, A(V >>> 0, Z, H + M), A((z << 31 | V / 4294967296) >>> 0, Z, H + L);
1113
1113
  else {
1114
1114
  var W = Math.floor(Math.log(F) / Math.LN2);
1115
- W === 1024 && (W = 1023), Y = F * Math.pow(2, -W), A(Y * 4503599627370496 >>> 0, Z, H + M), A((z << 31 | W + 1023 << 20 | Y * 1048576 & 1048575) >>> 0, Z, H + L);
1115
+ W === 1024 && (W = 1023), V = F * Math.pow(2, -W), A(V * 4503599627370496 >>> 0, Z, H + M), A((z << 31 | W + 1023 << 20 | V * 1048576 & 1048575) >>> 0, Z, H + L);
1116
1116
  }
1117
1117
  }
1118
1118
  }
1119
1119
  N.writeDoubleLE = e.bind(null, D, 0, 4), N.writeDoubleBE = e.bind(null, $, 4, 0);
1120
1120
  function o(A, M, L, F, Z) {
1121
- var H = A(F, Z + M), z = A(F, Z + L), Y = (z >> 31) * 2 + 1, W = z >>> 20 & 2047, J = 4294967296 * (z & 1048575) + H;
1122
- return W === 2047 ? J ? NaN : Y * (1 / 0) : W === 0 ? Y * 5e-324 * J : Y * Math.pow(2, W - 1075) * (J + 4503599627370496);
1121
+ var H = A(F, Z + M), z = A(F, Z + L), V = (z >> 31) * 2 + 1, W = z >>> 20 & 2047, J = 4294967296 * (z & 1048575) + H;
1122
+ return W === 2047 ? J ? NaN : V * (1 / 0) : W === 0 ? V * 5e-324 * J : V * Math.pow(2, W - 1075) * (J + 4503599627370496);
1123
1123
  }
1124
1124
  N.readDoubleLE = o.bind(null, U, 0, 4), N.readDoubleBE = o.bind(null, R, 4, 0);
1125
1125
  }(), N;
@@ -1392,8 +1392,8 @@ function requireWriter() {
1392
1392
  if (hasRequiredWriter) return writer;
1393
1393
  hasRequiredWriter = 1, writer = A;
1394
1394
  var _ = requireMinimal$1(), D, $ = _.LongBits, U = _.base64, R = _.utf8;
1395
- function N(W, J, V) {
1396
- this.fn = W, this.len = J, this.next = void 0, this.val = V;
1395
+ function N(W, J, Y) {
1396
+ this.fn = W, this.len = J, this.next = void 0, this.val = Y;
1397
1397
  }
1398
1398
  function e() {
1399
1399
  }
@@ -1414,16 +1414,16 @@ function requireWriter() {
1414
1414
  };
1415
1415
  A.create = M(), A.alloc = function(J) {
1416
1416
  return new _.Array(J);
1417
- }, _.Array !== Array && (A.alloc = _.pool(A.alloc, _.Array.prototype.subarray)), A.prototype._push = function(J, V, tt) {
1418
- return this.tail = this.tail.next = new N(J, V, tt), this.len += V, this;
1417
+ }, _.Array !== Array && (A.alloc = _.pool(A.alloc, _.Array.prototype.subarray)), A.prototype._push = function(J, Y, tt) {
1418
+ return this.tail = this.tail.next = new N(J, Y, tt), this.len += Y, this;
1419
1419
  };
1420
- function L(W, J, V) {
1421
- J[V] = W & 255;
1420
+ function L(W, J, Y) {
1421
+ J[Y] = W & 255;
1422
1422
  }
1423
- function F(W, J, V) {
1423
+ function F(W, J, Y) {
1424
1424
  for (; W > 127; )
1425
- J[V++] = W & 127 | 128, W >>>= 7;
1426
- J[V] = W;
1425
+ J[Y++] = W & 127 | 128, W >>>= 7;
1426
+ J[Y] = W;
1427
1427
  }
1428
1428
  function Z(W, J) {
1429
1429
  this.len = W, this.next = void 0, this.val = J;
@@ -1438,64 +1438,64 @@ function requireWriter() {
1438
1438
  }, A.prototype.sint32 = function(J) {
1439
1439
  return this.uint32((J << 1 ^ J >> 31) >>> 0);
1440
1440
  };
1441
- function H(W, J, V) {
1441
+ function H(W, J, Y) {
1442
1442
  for (; W.hi; )
1443
- J[V++] = W.lo & 127 | 128, W.lo = (W.lo >>> 7 | W.hi << 25) >>> 0, W.hi >>>= 7;
1443
+ J[Y++] = W.lo & 127 | 128, W.lo = (W.lo >>> 7 | W.hi << 25) >>> 0, W.hi >>>= 7;
1444
1444
  for (; W.lo > 127; )
1445
- J[V++] = W.lo & 127 | 128, W.lo = W.lo >>> 7;
1446
- J[V++] = W.lo;
1445
+ J[Y++] = W.lo & 127 | 128, W.lo = W.lo >>> 7;
1446
+ J[Y++] = W.lo;
1447
1447
  }
1448
1448
  A.prototype.uint64 = function(J) {
1449
- var V = $.from(J);
1450
- return this._push(H, V.length(), V);
1449
+ var Y = $.from(J);
1450
+ return this._push(H, Y.length(), Y);
1451
1451
  }, A.prototype.int64 = A.prototype.uint64, A.prototype.sint64 = function(J) {
1452
- var V = $.from(J).zzEncode();
1453
- return this._push(H, V.length(), V);
1452
+ var Y = $.from(J).zzEncode();
1453
+ return this._push(H, Y.length(), Y);
1454
1454
  }, A.prototype.bool = function(J) {
1455
1455
  return this._push(L, 1, J ? 1 : 0);
1456
1456
  };
1457
- function z(W, J, V) {
1458
- J[V] = W & 255, J[V + 1] = W >>> 8 & 255, J[V + 2] = W >>> 16 & 255, J[V + 3] = W >>> 24;
1457
+ function z(W, J, Y) {
1458
+ J[Y] = W & 255, J[Y + 1] = W >>> 8 & 255, J[Y + 2] = W >>> 16 & 255, J[Y + 3] = W >>> 24;
1459
1459
  }
1460
1460
  A.prototype.fixed32 = function(J) {
1461
1461
  return this._push(z, 4, J >>> 0);
1462
1462
  }, A.prototype.sfixed32 = A.prototype.fixed32, A.prototype.fixed64 = function(J) {
1463
- var V = $.from(J);
1464
- return this._push(z, 4, V.lo)._push(z, 4, V.hi);
1463
+ var Y = $.from(J);
1464
+ return this._push(z, 4, Y.lo)._push(z, 4, Y.hi);
1465
1465
  }, A.prototype.sfixed64 = A.prototype.fixed64, A.prototype.float = function(J) {
1466
1466
  return this._push(_.float.writeFloatLE, 4, J);
1467
1467
  }, A.prototype.double = function(J) {
1468
1468
  return this._push(_.float.writeDoubleLE, 8, J);
1469
1469
  };
1470
- var Y = _.Array.prototype.set ? function(J, V, tt) {
1471
- V.set(J, tt);
1472
- } : function(J, V, tt) {
1470
+ var V = _.Array.prototype.set ? function(J, Y, tt) {
1471
+ Y.set(J, tt);
1472
+ } : function(J, Y, tt) {
1473
1473
  for (var X = 0; X < J.length; ++X)
1474
- V[tt + X] = J[X];
1474
+ Y[tt + X] = J[X];
1475
1475
  };
1476
1476
  return A.prototype.bytes = function(J) {
1477
- var V = J.length >>> 0;
1478
- if (!V)
1477
+ var Y = J.length >>> 0;
1478
+ if (!Y)
1479
1479
  return this._push(L, 1, 0);
1480
1480
  if (_.isString(J)) {
1481
- var tt = A.alloc(V = U.length(J));
1481
+ var tt = A.alloc(Y = U.length(J));
1482
1482
  U.decode(J, tt, 0), J = tt;
1483
1483
  }
1484
- return this.uint32(V)._push(Y, V, J);
1484
+ return this.uint32(Y)._push(V, Y, J);
1485
1485
  }, A.prototype.string = function(J) {
1486
- var V = R.length(J);
1487
- return V ? this.uint32(V)._push(R.write, V, J) : this._push(L, 1, 0);
1486
+ var Y = R.length(J);
1487
+ return Y ? this.uint32(Y)._push(R.write, Y, J) : this._push(L, 1, 0);
1488
1488
  }, A.prototype.fork = function() {
1489
1489
  return this.states = new o(this), this.head = this.tail = new N(e, 0, 0), this.len = 0, this;
1490
1490
  }, A.prototype.reset = function() {
1491
1491
  return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new N(e, 0, 0), this.len = 0), this;
1492
1492
  }, A.prototype.ldelim = function() {
1493
- var J = this.head, V = this.tail, tt = this.len;
1494
- return this.reset().uint32(tt), tt && (this.tail.next = J.next, this.tail = V, this.len += tt), this;
1493
+ var J = this.head, Y = this.tail, tt = this.len;
1494
+ return this.reset().uint32(tt), tt && (this.tail.next = J.next, this.tail = Y, this.len += tt), this;
1495
1495
  }, A.prototype.finish = function() {
1496
- for (var J = this.head.next, V = this.constructor.alloc(this.len), tt = 0; J; )
1497
- J.fn(J.val, V, tt), tt += J.len, J = J.next;
1498
- return V;
1496
+ for (var J = this.head.next, Y = this.constructor.alloc(this.len), tt = 0; J; )
1497
+ J.fn(J.val, Y, tt), tt += J.len, J = J.next;
1498
+ return Y;
1499
1499
  }, A._configure = function(W) {
1500
1500
  D = W, A.create = M(), D._configure();
1501
1501
  }, writer;
@@ -1553,8 +1553,8 @@ function requireReader() {
1553
1553
  throw Error("illegal buffer");
1554
1554
  }, o = function() {
1555
1555
  return _.Buffer ? function(H) {
1556
- return (N.create = function(Y) {
1557
- return _.Buffer.isBuffer(Y) ? new D(Y) : e(Y);
1556
+ return (N.create = function(V) {
1557
+ return _.Buffer.isBuffer(V) ? new D(V) : e(V);
1558
1558
  })(H);
1559
1559
  } : e;
1560
1560
  };
@@ -1641,8 +1641,8 @@ function requireReader() {
1641
1641
  if (this.pos += Z, Array.isArray(this.buf))
1642
1642
  return this.buf.slice(H, z);
1643
1643
  if (H === z) {
1644
- var Y = _.Buffer;
1645
- return Y ? Y.alloc(0) : new this.buf.constructor(0);
1644
+ var V = _.Buffer;
1645
+ return V ? V.alloc(0) : new this.buf.constructor(0);
1646
1646
  }
1647
1647
  return this._slice.call(this.buf, H, z);
1648
1648
  }, N.prototype.string = function() {
@@ -4372,6 +4372,69 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
4372
4372
  }, R.getTypeUrl = function(e) {
4373
4373
  return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.ToggleLiveRoomRsq";
4374
4374
  }, R;
4375
+ }(), U.CDNPlayAddressNotify = function() {
4376
+ function R(N) {
4377
+ if (N)
4378
+ for (let e = Object.keys(N), o = 0; o < e.length; ++o)
4379
+ N[e[o]] != null && (this[e[o]] = N[e[o]]);
4380
+ }
4381
+ return R.prototype.roomId = "", R.prototype.m3u8 = "", R.prototype.rtmp = "", R.create = function(e) {
4382
+ return new R(e);
4383
+ }, R.encode = function(e, o) {
4384
+ return o || (o = $Writer.create()), e.roomId != null && Object.hasOwnProperty.call(e, "roomId") && o.uint32(
4385
+ /* id 1, wireType 2 =*/
4386
+ 10
4387
+ ).string(e.roomId), e.m3u8 != null && Object.hasOwnProperty.call(e, "m3u8") && o.uint32(
4388
+ /* id 2, wireType 2 =*/
4389
+ 18
4390
+ ).string(e.m3u8), e.rtmp != null && Object.hasOwnProperty.call(e, "rtmp") && o.uint32(
4391
+ /* id 3, wireType 2 =*/
4392
+ 26
4393
+ ).string(e.rtmp), o;
4394
+ }, R.encodeDelimited = function(e, o) {
4395
+ return this.encode(e, o).ldelim();
4396
+ }, R.decode = function(e, o) {
4397
+ e instanceof $Reader || (e = $Reader.create(e));
4398
+ let A = o === void 0 ? e.len : e.pos + o, M = new $root.com.quick.voice.proto.CDNPlayAddressNotify();
4399
+ for (; e.pos < A; ) {
4400
+ let L = e.uint32();
4401
+ switch (L >>> 3) {
4402
+ case 1: {
4403
+ M.roomId = e.string();
4404
+ break;
4405
+ }
4406
+ case 2: {
4407
+ M.m3u8 = e.string();
4408
+ break;
4409
+ }
4410
+ case 3: {
4411
+ M.rtmp = e.string();
4412
+ break;
4413
+ }
4414
+ default:
4415
+ e.skipType(L & 7);
4416
+ break;
4417
+ }
4418
+ }
4419
+ return M;
4420
+ }, R.decodeDelimited = function(e) {
4421
+ return e instanceof $Reader || (e = new $Reader(e)), this.decode(e, e.uint32());
4422
+ }, R.verify = function(e) {
4423
+ return typeof e != "object" || e === null ? "object expected" : e.roomId != null && e.hasOwnProperty("roomId") && !$util.isString(e.roomId) ? "roomId: string expected" : e.m3u8 != null && e.hasOwnProperty("m3u8") && !$util.isString(e.m3u8) ? "m3u8: string expected" : e.rtmp != null && e.hasOwnProperty("rtmp") && !$util.isString(e.rtmp) ? "rtmp: string expected" : null;
4424
+ }, R.fromObject = function(e) {
4425
+ if (e instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)
4426
+ return e;
4427
+ let o = new $root.com.quick.voice.proto.CDNPlayAddressNotify();
4428
+ return e.roomId != null && (o.roomId = String(e.roomId)), e.m3u8 != null && (o.m3u8 = String(e.m3u8)), e.rtmp != null && (o.rtmp = String(e.rtmp)), o;
4429
+ }, R.toObject = function(e, o) {
4430
+ o || (o = {});
4431
+ let A = {};
4432
+ return o.defaults && (A.roomId = "", A.m3u8 = "", A.rtmp = ""), e.roomId != null && e.hasOwnProperty("roomId") && (A.roomId = e.roomId), e.m3u8 != null && e.hasOwnProperty("m3u8") && (A.m3u8 = e.m3u8), e.rtmp != null && e.hasOwnProperty("rtmp") && (A.rtmp = e.rtmp), A;
4433
+ }, R.prototype.toJSON = function() {
4434
+ return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
4435
+ }, R.getTypeUrl = function(e) {
4436
+ return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.CDNPlayAddressNotify";
4437
+ }, R;
4375
4438
  }(), U.TrackType = function() {
4376
4439
  const R = {}, N = Object.create(R);
4377
4440
  return N[R[0] = "Microphone"] = 0, N[R[1] = "Camera"] = 1, N[R[2] = "Screen"] = 2, N[R[3] = "SystemVoice"] = 3, N;
@@ -4546,10 +4609,11 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
4546
4609
  healthCheck: "心跳检测",
4547
4610
  onNetQuality: "网络质量回调",
4548
4611
  onLogin: "登录回调",
4549
- onLocalStream: "更新本地媒体流",
4612
+ onLocalStream: "本地媒体流发生变化",
4613
+ onDevicechange: "媒体设备发生变化",
4550
4614
  onRoomUser: "房间用户变化",
4551
- onRoomUserStreams: "房间用户媒体流变化",
4552
4615
  onRoomUsers: "房间所有用户所有变化",
4616
+ onRoomUsersStreams: "房间某些用户媒体流变化",
4553
4617
  onRoomState: "房间状态变化",
4554
4618
  onJoinRoom: "加入房间回调",
4555
4619
  onQuitRoom: "退出房间回调",
@@ -4621,17 +4685,17 @@ const d_code = (_) => _ < 256 ? _dist_code[_] : _dist_code[256 + (_ >>> 7)], put
4621
4685
  _.bi_valid === 16 ? (put_short(_, _.bi_buf), _.bi_buf = 0, _.bi_valid = 0) : _.bi_valid >= 8 && (_.pending_buf[_.pending++] = _.bi_buf & 255, _.bi_buf >>= 8, _.bi_valid -= 8);
4622
4686
  }, gen_bitlen = (_, D) => {
4623
4687
  const $ = D.dyn_tree, U = D.max_code, R = D.stat_desc.static_tree, N = D.stat_desc.has_stree, e = D.stat_desc.extra_bits, o = D.stat_desc.extra_base, A = D.stat_desc.max_length;
4624
- let M, L, F, Z, H, z, Y = 0;
4688
+ let M, L, F, Z, H, z, V = 0;
4625
4689
  for (Z = 0; Z <= MAX_BITS$1; Z++)
4626
4690
  _.bl_count[Z] = 0;
4627
4691
  for ($[_.heap[_.heap_max] * 2 + 1] = 0, M = _.heap_max + 1; M < HEAP_SIZE$1; M++)
4628
- L = _.heap[M], Z = $[$[L * 2 + 1] * 2 + 1] + 1, Z > A && (Z = A, Y++), $[L * 2 + 1] = Z, !(L > U) && (_.bl_count[Z]++, H = 0, L >= o && (H = e[L - o]), z = $[L * 2], _.opt_len += z * (Z + H), N && (_.static_len += z * (R[L * 2 + 1] + H)));
4629
- if (Y !== 0) {
4692
+ L = _.heap[M], Z = $[$[L * 2 + 1] * 2 + 1] + 1, Z > A && (Z = A, V++), $[L * 2 + 1] = Z, !(L > U) && (_.bl_count[Z]++, H = 0, L >= o && (H = e[L - o]), z = $[L * 2], _.opt_len += z * (Z + H), N && (_.static_len += z * (R[L * 2 + 1] + H)));
4693
+ if (V !== 0) {
4630
4694
  do {
4631
4695
  for (Z = A - 1; _.bl_count[Z] === 0; )
4632
4696
  Z--;
4633
- _.bl_count[Z]--, _.bl_count[Z + 1] += 2, _.bl_count[A]--, Y -= 2;
4634
- } while (Y > 0);
4697
+ _.bl_count[Z]--, _.bl_count[Z + 1] += 2, _.bl_count[A]--, V -= 2;
4698
+ } while (V > 0);
4635
4699
  for (Z = A; Z !== 0; Z--)
4636
4700
  for (L = _.bl_count[Z]; L !== 0; )
4637
4701
  F = _.heap[--M], !(F > U) && ($[F * 2 + 1] !== Z && (_.opt_len += (Z - $[F * 2 + 1]) * $[F * 2], $[F * 2 + 1] = Z), L--);
@@ -5416,18 +5480,18 @@ var Deflate_1$1 = Deflate$1, deflate_2 = deflate$1, deflateRaw_1$1 = deflateRaw$
5416
5480
  };
5417
5481
  const BAD$1 = 16209, TYPE$1 = 16191;
5418
5482
  var inffast = function _(D, $) {
5419
- let U, R, N, e, o, A, M, L, F, Z, H, z, Y, W, J, V, tt, X, nt, lt, et, at, ct, ot;
5483
+ let U, R, N, e, o, A, M, L, F, Z, H, z, V, W, J, Y, tt, X, nt, lt, et, at, ct, ot;
5420
5484
  const rt = D.state;
5421
- U = D.next_in, ct = D.input, R = U + (D.avail_in - 5), N = D.next_out, ot = D.output, e = N - ($ - D.avail_out), o = N + (D.avail_out - 257), A = rt.dmax, M = rt.wsize, L = rt.whave, F = rt.wnext, Z = rt.window, H = rt.hold, z = rt.bits, Y = rt.lencode, W = rt.distcode, J = (1 << rt.lenbits) - 1, V = (1 << rt.distbits) - 1;
5485
+ U = D.next_in, ct = D.input, R = U + (D.avail_in - 5), N = D.next_out, ot = D.output, e = N - ($ - D.avail_out), o = N + (D.avail_out - 257), A = rt.dmax, M = rt.wsize, L = rt.whave, F = rt.wnext, Z = rt.window, H = rt.hold, z = rt.bits, V = rt.lencode, W = rt.distcode, J = (1 << rt.lenbits) - 1, Y = (1 << rt.distbits) - 1;
5422
5486
  t:
5423
5487
  do {
5424
- z < 15 && (H += ct[U++] << z, z += 8, H += ct[U++] << z, z += 8), tt = Y[H & J];
5488
+ z < 15 && (H += ct[U++] << z, z += 8, H += ct[U++] << z, z += 8), tt = V[H & J];
5425
5489
  e:
5426
5490
  for (; ; ) {
5427
5491
  if (X = tt >>> 24, H >>>= X, z -= X, X = tt >>> 16 & 255, X === 0)
5428
5492
  ot[N++] = tt & 65535;
5429
5493
  else if (X & 16) {
5430
- nt = tt & 65535, X &= 15, X && (z < X && (H += ct[U++] << z, z += 8), nt += H & (1 << X) - 1, H >>>= X, z -= X), z < 15 && (H += ct[U++] << z, z += 8, H += ct[U++] << z, z += 8), tt = W[H & V];
5494
+ nt = tt & 65535, X &= 15, X && (z < X && (H += ct[U++] << z, z += 8), nt += H & (1 << X) - 1, H >>>= X, z -= X), z < 15 && (H += ct[U++] << z, z += 8, H += ct[U++] << z, z += 8), tt = W[H & Y];
5431
5495
  i:
5432
5496
  for (; ; ) {
5433
5497
  if (X = tt >>> 24, H >>>= X, z -= X, X = tt >>> 16 & 255, X & 16) {
@@ -5489,7 +5553,7 @@ var inffast = function _(D, $) {
5489
5553
  break;
5490
5554
  }
5491
5555
  } else if ((X & 64) === 0) {
5492
- tt = Y[(tt & 65535) + (H & (1 << X) - 1)];
5556
+ tt = V[(tt & 65535) + (H & (1 << X) - 1)];
5493
5557
  continue e;
5494
5558
  } else if (X & 32) {
5495
5559
  rt.mode = TYPE$1;
@@ -5639,7 +5703,7 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
5639
5703
  64
5640
5704
  ]), inflate_table = (_, D, $, U, R, N, e, o) => {
5641
5705
  const A = o.bits;
5642
- let M = 0, L = 0, F = 0, Z = 0, H = 0, z = 0, Y = 0, W = 0, J = 0, V = 0, tt, X, nt, lt, et, at = null, ct;
5706
+ let M = 0, L = 0, F = 0, Z = 0, H = 0, z = 0, V = 0, W = 0, J = 0, Y = 0, tt, X, nt, lt, et, at = null, ct;
5643
5707
  const ot = new Uint16Array(MAXBITS + 1), rt = new Uint16Array(MAXBITS + 1);
5644
5708
  let St = null, Gt, Nt, At;
5645
5709
  for (M = 0; M <= MAXBITS; M++)
@@ -5661,29 +5725,29 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
5661
5725
  rt[M + 1] = rt[M] + ot[M];
5662
5726
  for (L = 0; L < U; L++)
5663
5727
  D[$ + L] !== 0 && (e[rt[D[$ + L]]++] = L);
5664
- if (_ === CODES$1 ? (at = St = e, ct = 20) : _ === LENS$1 ? (at = lbase, St = lext, ct = 257) : (at = dbase, St = dext, ct = 0), V = 0, L = 0, M = F, et = N, z = H, Y = 0, nt = -1, J = 1 << H, lt = J - 1, _ === LENS$1 && J > ENOUGH_LENS$1 || _ === DISTS$1 && J > ENOUGH_DISTS$1)
5728
+ if (_ === CODES$1 ? (at = St = e, ct = 20) : _ === LENS$1 ? (at = lbase, St = lext, ct = 257) : (at = dbase, St = dext, ct = 0), Y = 0, L = 0, M = F, et = N, z = H, V = 0, nt = -1, J = 1 << H, lt = J - 1, _ === LENS$1 && J > ENOUGH_LENS$1 || _ === DISTS$1 && J > ENOUGH_DISTS$1)
5665
5729
  return 1;
5666
5730
  for (; ; ) {
5667
- Gt = M - Y, e[L] + 1 < ct ? (Nt = 0, At = e[L]) : e[L] >= ct ? (Nt = St[e[L] - ct], At = at[e[L] - ct]) : (Nt = 96, At = 0), tt = 1 << M - Y, X = 1 << z, F = X;
5731
+ Gt = M - V, e[L] + 1 < ct ? (Nt = 0, At = e[L]) : e[L] >= ct ? (Nt = St[e[L] - ct], At = at[e[L] - ct]) : (Nt = 96, At = 0), tt = 1 << M - V, X = 1 << z, F = X;
5668
5732
  do
5669
- X -= tt, R[et + (V >> Y) + X] = Gt << 24 | Nt << 16 | At | 0;
5733
+ X -= tt, R[et + (Y >> V) + X] = Gt << 24 | Nt << 16 | At | 0;
5670
5734
  while (X !== 0);
5671
- for (tt = 1 << M - 1; V & tt; )
5735
+ for (tt = 1 << M - 1; Y & tt; )
5672
5736
  tt >>= 1;
5673
- if (tt !== 0 ? (V &= tt - 1, V += tt) : V = 0, L++, --ot[M] === 0) {
5737
+ if (tt !== 0 ? (Y &= tt - 1, Y += tt) : Y = 0, L++, --ot[M] === 0) {
5674
5738
  if (M === Z)
5675
5739
  break;
5676
5740
  M = D[$ + e[L]];
5677
5741
  }
5678
- if (M > H && (V & lt) !== nt) {
5679
- for (Y === 0 && (Y = H), et += F, z = M - Y, W = 1 << z; z + Y < Z && (W -= ot[z + Y], !(W <= 0)); )
5742
+ if (M > H && (Y & lt) !== nt) {
5743
+ for (V === 0 && (V = H), et += F, z = M - V, W = 1 << z; z + V < Z && (W -= ot[z + V], !(W <= 0)); )
5680
5744
  z++, W <<= 1;
5681
5745
  if (J += 1 << z, _ === LENS$1 && J > ENOUGH_LENS$1 || _ === DISTS$1 && J > ENOUGH_DISTS$1)
5682
5746
  return 1;
5683
- nt = V & lt, R[nt] = H << 24 | z << 16 | et - N | 0;
5747
+ nt = Y & lt, R[nt] = H << 24 | z << 16 | et - N | 0;
5684
5748
  }
5685
5749
  }
5686
- return V !== 0 && (R[et + V] = M - Y << 24 | 64 << 16 | 0), o.bits = H, 0;
5750
+ return Y !== 0 && (R[et + Y] = M - V << 24 | 64 << 16 | 0), o.bits = H, 0;
5687
5751
  };
5688
5752
  var inftrees = inflate_table;
5689
5753
  const CODES = 0, LENS = 1, DISTS = 2, {
@@ -5754,7 +5818,7 @@ const fixedtables = (_) => {
5754
5818
  const N = _.state;
5755
5819
  return N.window === null && (N.wsize = 1 << N.wbits, N.wnext = 0, N.whave = 0, N.window = new Uint8Array(N.wsize)), U >= N.wsize ? (N.window.set(D.subarray($ - N.wsize, $), 0), N.wnext = 0, N.whave = N.wsize) : (R = N.wsize - N.wnext, R > U && (R = U), N.window.set(D.subarray($ - U, $ - U + R), N.wnext), U -= R, U ? (N.window.set(D.subarray($ - U, $), 0), N.wnext = U, N.whave = N.wsize) : (N.wnext += R, N.wnext === N.wsize && (N.wnext = 0), N.whave < N.wsize && (N.whave += R))), 0;
5756
5820
  }, inflate$2 = (_, D) => {
5757
- let $, U, R, N, e, o, A, M, L, F, Z, H, z, Y, W = 0, J, V, tt, X, nt, lt, et, at;
5821
+ let $, U, R, N, e, o, A, M, L, F, Z, H, z, V, W = 0, J, Y, tt, X, nt, lt, et, at;
5758
5822
  const ct = new Uint8Array(4);
5759
5823
  let ot, rt;
5760
5824
  const St = (
@@ -5995,7 +6059,7 @@ const fixedtables = (_) => {
5995
6059
  /* falls through */
5996
6060
  case CODELENS:
5997
6061
  for (; $.have < $.nlen + $.ndist; ) {
5998
- for (; W = $.lencode[M & (1 << $.lenbits) - 1], J = W >>> 24, V = W >>> 16 & 255, tt = W & 65535, !(J <= L); ) {
6062
+ for (; W = $.lencode[M & (1 << $.lenbits) - 1], J = W >>> 24, Y = W >>> 16 & 255, tt = W & 65535, !(J <= L); ) {
5999
6063
  if (o === 0)
6000
6064
  break t;
6001
6065
  o--, M += U[N++] << L, L += 8;
@@ -6062,32 +6126,32 @@ const fixedtables = (_) => {
6062
6126
  _.next_out = e, _.avail_out = A, _.next_in = N, _.avail_in = o, $.hold = M, $.bits = L, inffast(_, Z), e = _.next_out, R = _.output, A = _.avail_out, N = _.next_in, U = _.input, o = _.avail_in, M = $.hold, L = $.bits, $.mode === TYPE && ($.back = -1);
6063
6127
  break;
6064
6128
  }
6065
- for ($.back = 0; W = $.lencode[M & (1 << $.lenbits) - 1], J = W >>> 24, V = W >>> 16 & 255, tt = W & 65535, !(J <= L); ) {
6129
+ for ($.back = 0; W = $.lencode[M & (1 << $.lenbits) - 1], J = W >>> 24, Y = W >>> 16 & 255, tt = W & 65535, !(J <= L); ) {
6066
6130
  if (o === 0)
6067
6131
  break t;
6068
6132
  o--, M += U[N++] << L, L += 8;
6069
6133
  }
6070
- if (V && (V & 240) === 0) {
6071
- for (X = J, nt = V, lt = tt; W = $.lencode[lt + ((M & (1 << X + nt) - 1) >> X)], J = W >>> 24, V = W >>> 16 & 255, tt = W & 65535, !(X + J <= L); ) {
6134
+ if (Y && (Y & 240) === 0) {
6135
+ for (X = J, nt = Y, lt = tt; W = $.lencode[lt + ((M & (1 << X + nt) - 1) >> X)], J = W >>> 24, Y = W >>> 16 & 255, tt = W & 65535, !(X + J <= L); ) {
6072
6136
  if (o === 0)
6073
6137
  break t;
6074
6138
  o--, M += U[N++] << L, L += 8;
6075
6139
  }
6076
6140
  M >>>= X, L -= X, $.back += X;
6077
6141
  }
6078
- if (M >>>= J, L -= J, $.back += J, $.length = tt, V === 0) {
6142
+ if (M >>>= J, L -= J, $.back += J, $.length = tt, Y === 0) {
6079
6143
  $.mode = LIT;
6080
6144
  break;
6081
6145
  }
6082
- if (V & 32) {
6146
+ if (Y & 32) {
6083
6147
  $.back = -1, $.mode = TYPE;
6084
6148
  break;
6085
6149
  }
6086
- if (V & 64) {
6150
+ if (Y & 64) {
6087
6151
  _.msg = "invalid literal/length code", $.mode = BAD;
6088
6152
  break;
6089
6153
  }
6090
- $.extra = V & 15, $.mode = LENEXT;
6154
+ $.extra = Y & 15, $.mode = LENEXT;
6091
6155
  /* falls through */
6092
6156
  case LENEXT:
6093
6157
  if ($.extra) {
@@ -6101,24 +6165,24 @@ const fixedtables = (_) => {
6101
6165
  $.was = $.length, $.mode = DIST;
6102
6166
  /* falls through */
6103
6167
  case DIST:
6104
- for (; W = $.distcode[M & (1 << $.distbits) - 1], J = W >>> 24, V = W >>> 16 & 255, tt = W & 65535, !(J <= L); ) {
6168
+ for (; W = $.distcode[M & (1 << $.distbits) - 1], J = W >>> 24, Y = W >>> 16 & 255, tt = W & 65535, !(J <= L); ) {
6105
6169
  if (o === 0)
6106
6170
  break t;
6107
6171
  o--, M += U[N++] << L, L += 8;
6108
6172
  }
6109
- if ((V & 240) === 0) {
6110
- for (X = J, nt = V, lt = tt; W = $.distcode[lt + ((M & (1 << X + nt) - 1) >> X)], J = W >>> 24, V = W >>> 16 & 255, tt = W & 65535, !(X + J <= L); ) {
6173
+ if ((Y & 240) === 0) {
6174
+ for (X = J, nt = Y, lt = tt; W = $.distcode[lt + ((M & (1 << X + nt) - 1) >> X)], J = W >>> 24, Y = W >>> 16 & 255, tt = W & 65535, !(X + J <= L); ) {
6111
6175
  if (o === 0)
6112
6176
  break t;
6113
6177
  o--, M += U[N++] << L, L += 8;
6114
6178
  }
6115
6179
  M >>>= X, L -= X, $.back += X;
6116
6180
  }
6117
- if (M >>>= J, L -= J, $.back += J, V & 64) {
6181
+ if (M >>>= J, L -= J, $.back += J, Y & 64) {
6118
6182
  _.msg = "invalid distance code", $.mode = BAD;
6119
6183
  break;
6120
6184
  }
6121
- $.offset = tt, $.extra = V & 15, $.mode = DISTEXT;
6185
+ $.offset = tt, $.extra = Y & 15, $.mode = DISTEXT;
6122
6186
  /* falls through */
6123
6187
  case DISTEXT:
6124
6188
  if ($.extra) {
@@ -6143,12 +6207,12 @@ const fixedtables = (_) => {
6143
6207
  _.msg = "invalid distance too far back", $.mode = BAD;
6144
6208
  break;
6145
6209
  }
6146
- H > $.wnext ? (H -= $.wnext, z = $.wsize - H) : z = $.wnext - H, H > $.length && (H = $.length), Y = $.window;
6210
+ H > $.wnext ? (H -= $.wnext, z = $.wsize - H) : z = $.wnext - H, H > $.length && (H = $.length), V = $.window;
6147
6211
  } else
6148
- Y = R, z = e - $.offset, H = $.length;
6212
+ V = R, z = e - $.offset, H = $.length;
6149
6213
  H > A && (H = A), A -= H, $.length -= H;
6150
6214
  do
6151
- R[e++] = Y[z++];
6215
+ R[e++] = V[z++];
6152
6216
  while (--H);
6153
6217
  $.length === 0 && ($.mode = LEN);
6154
6218
  break;
@@ -6462,8 +6526,8 @@ class CallsWebSocket {
6462
6526
  try {
6463
6527
  const { time: U, event: R, data: N = {}, data_original: e = {}, data_remote: o, ...A } = $, M = E(U, "YYYY-MM-DD hh:mm:ss", { offset: 480 });
6464
6528
  let L = {};
6465
- const F = (V = {}) => {
6466
- const tt = JSON.parse(JSON.stringify(V)), X = Object.keys(tt);
6529
+ const F = (Y = {}) => {
6530
+ const tt = JSON.parse(JSON.stringify(Y)), X = Object.keys(tt);
6467
6531
  for (const nt of X)
6468
6532
  (nt.includes("sdp") || nt.includes("Sdp")) && (tt[nt] = "");
6469
6533
  return tt;
@@ -6479,7 +6543,7 @@ class CallsWebSocket {
6479
6543
  }
6480
6544
  let H = "#quickvo.logs";
6481
6545
  ignoreEvent.includes(R) && (H = "#quickvo.ignoreEvents");
6482
- const z = { "#action": Z, timeStr: M, event: R, data: L, time: U, ...A }, Y = localStorage.getItem(H) || JSON.stringify([]), W = JSON.parse(Y), J = [z, ...W].slice(0, 500);
6546
+ const z = { "#action": Z, timeStr: M, event: R, data: L, time: U, ...A }, V = localStorage.getItem(H) || JSON.stringify([]), W = JSON.parse(V), J = [z, ...W].slice(0, 500);
6483
6547
  localStorage.setItem(H, JSON.stringify(J));
6484
6548
  } catch (U) {
6485
6549
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: updataLogs is error", U);
@@ -6588,7 +6652,7 @@ class CallsWebSocket {
6588
6652
  /**
6589
6653
  * 触发广播事件
6590
6654
  * @param event 事件名称
6591
- * @param data 事件响应值
6655
+ * @param result 事件响应值
6592
6656
  */
6593
6657
  K(this, "emitNotify", async (D, $) => {
6594
6658
  const U = G(this, ht)[D] || [];
@@ -6703,7 +6767,7 @@ class RoomBase {
6703
6767
  K(this, "setRoomState", (D) => {
6704
6768
  this.state = D;
6705
6769
  const $ = enum_roomState[D], U = { state: D, stateStr: $ };
6706
- this.cwsIns.emitNotify("onRoomState", { code: 200, data: U });
6770
+ this.cwsIns.emitNotify("onRoomState", { code: 200, data: U, desc: "room state is change." });
6707
6771
  });
6708
6772
  /**
6709
6773
  * 设置属性
@@ -6788,7 +6852,7 @@ class RoomBase {
6788
6852
  K(this, "usersFilter", (D) => mt(D, ["id", "isSelf", "joinTime", "tracks", "callAction", "callActionStr", "callActionMap", "network", "updateStreams", "permissions", "isPublished"]).sort((R, N) => R.id.localeCompare(N.id, "en")));
6789
6853
  }
6790
6854
  }
6791
- var wt, vt, kt, Pt, Bt, Tt, Lt;
6855
+ var wt, vt, kt, Pt, Bt, It, Lt;
6792
6856
  class RoomMedias extends RoomBase {
6793
6857
  // 媒体流上下文
6794
6858
  constructor() {
@@ -6812,6 +6876,12 @@ class RoomMedias extends RoomBase {
6812
6876
  st(this, Bt, () => {
6813
6877
  G(this, wt).set("audioinput", "default"), G(this, wt).set("videoinput", "default"), G(this, wt).set("audiooutput", "default");
6814
6878
  });
6879
+ /**
6880
+ * 房间所有用户所有媒体流变化
6881
+ */
6882
+ K(this, "emitNotifyUpdateUsersStreams", async ($) => {
6883
+ this.prohibitNotify || this.cwsIns.emitNotify("onRoomUsersStreams", { code: 200, data: $, desc: "users streams is change." });
6884
+ });
6815
6885
  /**
6816
6886
  * 初始化用户媒体上下文
6817
6887
  */
@@ -6835,7 +6905,7 @@ class RoomMedias extends RoomBase {
6835
6905
  // 视频媒体处理
6836
6906
  case "video":
6837
6907
  {
6838
- const M = new VideoMediaContext(R);
6908
+ const M = new VideoMediaContext(N);
6839
6909
  G(this, kt).set(e, M);
6840
6910
  }
6841
6911
  break;
@@ -6962,16 +7032,12 @@ class RoomMedias extends RoomBase {
6962
7032
  }
6963
7033
  break;
6964
7034
  }
6965
- {
6966
- const N = this.userMap.get(U);
6967
- if (!N) return;
6968
- N.updateStreams[$] = !0, this.cwsIns.emitNotify("onRoomUserStreams", { code: 200, data: { user: N } });
6969
- }
7035
+ this.emitNotifyUpdateUsersStreams([{ userId: U, updateStreams: { [$]: !0 } }]);
6970
7036
  });
6971
7037
  /**
6972
7038
  * 获取媒体设备列表
6973
7039
  */
6974
- st(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(($) => {
7040
+ st(this, It, 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(($) => {
6975
7041
  this.mediaDevices = $;
6976
7042
  }).catch(function($) {
6977
7043
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: getEnumerateDevices is err", $);
@@ -6980,9 +7046,9 @@ class RoomMedias extends RoomBase {
6980
7046
  * 媒体设备发生变化
6981
7047
  */
6982
7048
  st(this, Lt, () => {
6983
- navigator.mediaDevices.ondevicechange = () => {
6984
- G(this, Tt).call(this);
6985
- }, G(this, Tt).call(this);
7049
+ navigator.mediaDevices.ondevicechange = async () => {
7050
+ await G(this, It).call(this), this.cwsIns.emitNotify("onDevicechange", { code: 200, data: {}, desc: "device is change." });
7051
+ }, G(this, It).call(this);
6986
7052
  });
6987
7053
  /**
6988
7054
  * 获取正在使用的媒体设备ID
@@ -7041,7 +7107,7 @@ class RoomMedias extends RoomBase {
7041
7107
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7042
7108
  * @returns MediaDeviceInfo[]
7043
7109
  */
7044
- K(this, "getEnumerateDevices", async ($) => (await G(this, Tt).call(this), this.mediaDevices.filter((R) => R.kind === $)));
7110
+ K(this, "getEnumerateDevices", async ($) => (await G(this, It).call(this), this.mediaDevices.filter((R) => R.kind === $)));
7045
7111
  /**
7046
7112
  * 获取可用音频输入设备
7047
7113
  * @returns MediaDeviceInfo[]
@@ -7060,7 +7126,7 @@ class RoomMedias extends RoomBase {
7060
7126
  G(this, Lt).call(this), G(this, Bt).call(this), G(this, Pt).call(this);
7061
7127
  }
7062
7128
  }
7063
- wt = new WeakMap(), vt = new WeakMap(), kt = new WeakMap(), Pt = new WeakMap(), Bt = new WeakMap(), Tt = new WeakMap(), Lt = new WeakMap();
7129
+ wt = new WeakMap(), vt = new WeakMap(), kt = new WeakMap(), Pt = new WeakMap(), Bt = new WeakMap(), It = new WeakMap(), Lt = new WeakMap();
7064
7130
  class RoomUsers extends RoomMedias {
7065
7131
  constructor() {
7066
7132
  super();
@@ -7244,7 +7310,7 @@ class RoomUsers extends RoomMedias {
7244
7310
  screenSharing_video: !1,
7245
7311
  screenSharing_audio: !1
7246
7312
  };
7247
- e[U] = R, N.updateStreams = e, console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->Breathe: user.${U}`, R, N.updateStreams);
7313
+ e[U] = R, N.updateStreams = e;
7248
7314
  });
7249
7315
  /**
7250
7316
  * 更新用户轨道
@@ -7319,24 +7385,26 @@ class RoomUsers extends RoomMedias {
7319
7385
  }
7320
7386
  });
7321
7387
  /**
7322
- * 广播用户变化
7388
+ * 广播用户状态变化
7389
+ * 当某个用户发送了变化则通过该回调进行通知
7323
7390
  */
7324
7391
  K(this, "emitNotifyUpdateUser", async ($) => {
7325
7392
  if (this.prohibitNotify) return;
7326
7393
  const U = await this.getUsers([$]), [R] = this.usersFilter(U);
7327
- this.cwsIns.emitNotify("onRoomUser", { code: 200, data: R });
7394
+ this.cwsIns.emitNotify("onRoomUser", { code: 200, data: R, desc: "user info is change." });
7328
7395
  });
7329
7396
  /**
7330
- * 房间所有用户所有变化
7397
+ * 广播全部用户状态变变化
7398
+ * 只要房间任意一个用户变化 都会通过该回调返回一个完整的用户列表
7331
7399
  */
7332
7400
  K(this, "emitNotifyUpdateUsers", async () => {
7333
7401
  if (this.prohibitNotify) return;
7334
7402
  const $ = await this.getUsers(), U = this.usersFilter($);
7335
- this.cwsIns.emitNotify("onRoomUsers", { code: 200, data: U });
7403
+ this.cwsIns.emitNotify("onRoomUsers", { code: 200, data: U, desc: "all users info is change." });
7336
7404
  });
7337
7405
  }
7338
7406
  }
7339
- var Zt, Ft, Ht, jt;
7407
+ var Zt, Ft, jt, Ht;
7340
7408
  class RoomPeer extends RoomUsers {
7341
7409
  constructor() {
7342
7410
  super();
@@ -7356,7 +7424,7 @@ class RoomPeer extends RoomUsers {
7356
7424
  K(this, "initPeer", () => {
7357
7425
  this.peerIns = new RTCPeerConnection({ bundlePolicy: "max-bundle" }), this.peerIns.ontrack = async ($) => {
7358
7426
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->Breathe: e", $);
7359
- }, G(this, Zt).call(this), G(this, jt).call(this);
7427
+ }, G(this, Zt).call(this), G(this, Ht).call(this);
7360
7428
  });
7361
7429
  /**
7362
7430
  * 初始化发射器
@@ -7414,28 +7482,36 @@ class RoomPeer extends RoomUsers {
7414
7482
  {
7415
7483
  let e = [];
7416
7484
  const o = async () => {
7417
- clearTimeout(U);
7418
- const M = Object.groupBy(e, ({ userId: F = "" }) => F), L = Object.keys(M);
7485
+ clearTimeout(U), this.prohibitNotify = !1;
7486
+ const M = /* @__PURE__ */ new Map();
7487
+ for (const F of e) {
7488
+ const { userId: Z, mediaType: H } = F;
7489
+ if (!Z || !H) continue;
7490
+ M.has(Z) || M.set(Z, { userId: Z, tracks: [], updateStreams: {} });
7491
+ const V = M.get(Z);
7492
+ V.tracks.push(F), V.updateStreams[H] = !0;
7493
+ }
7494
+ const L = [...M.values()];
7419
7495
  for (const F of L) {
7420
- const Z = M[F];
7421
- await this.updateUsertracks(F, Z, !0);
7496
+ const { userId: Z, tracks: H } = F;
7497
+ await this.updateUsertracks(Z, H, !0);
7422
7498
  }
7423
- this.peerIns.removeEventListener("track", A), R(!0);
7499
+ await this.emitNotifyUpdateUsersStreams(L), this.peerIns.removeEventListener("track", A), R(!0);
7424
7500
  }, A = async (M) => {
7425
7501
  await this.connectionICE();
7426
- const { streams: L, transceiver: F } = M, [Z] = L, { mid: H, receiver: z } = F, { track: Y } = z, { id: W, kind: J } = Y, V = N.find((nt) => nt.mid === `${H}`);
7427
- if (!V) return;
7428
- const { userId: tt, mediaType: X } = V;
7502
+ const { streams: L, transceiver: F } = M, [Z] = L, { mid: H, receiver: z } = F, { track: V } = z, { id: W, kind: J } = V, Y = N.find((nt) => nt.mid === `${H}`);
7503
+ if (!Y) return;
7504
+ const { userId: tt, mediaType: X } = Y;
7429
7505
  if (!(!tt || !X)) {
7430
7506
  if (await this.initUserMediaStreamContext(tt, X, Z), J === "audio") {
7431
7507
  const nt = this.getUserMediaStreamContext(tt, X);
7432
7508
  (nt == null ? void 0 : nt.kind) === "audio" && nt.setMute(!1);
7433
7509
  }
7434
7510
  {
7435
- const nt = { ...V, mid: H, msid: W };
7511
+ const nt = { ...Y, mid: H, msid: W };
7436
7512
  e.push(nt);
7437
7513
  }
7438
- this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#00b60f;", `------->Breathe: await subscribe ${e.length}/${N.length}`, { mediaType: X, mid: H, userTrack: V, e: M }), N.length === e.length && o();
7514
+ this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#00b60f;", `------->Breathe: await subscribe ${e.length}/${N.length}`, { mediaType: X, mid: H, userTrack: Y, e: M }), N.length === e.length && o();
7439
7515
  }
7440
7516
  };
7441
7517
  this.peerIns.addEventListener("track", A), U = setTimeout(() => o(), 5 * 1e3);
@@ -7448,7 +7524,7 @@ class RoomPeer extends RoomUsers {
7448
7524
  st(this, Zt, async () => {
7449
7525
  let $ = 0;
7450
7526
  const U = () => {
7451
- this.setRoomState("disconnected"), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {} });
7527
+ this.setRoomState("disconnected"), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {}, desc: "sdk is destroy." });
7452
7528
  };
7453
7529
  this.peerIns.onconnectionstatechange = async () => {
7454
7530
  const R = this.peerIns.connectionState;
@@ -7595,25 +7671,25 @@ class RoomPeer extends RoomUsers {
7595
7671
  try {
7596
7672
  let U = 0, R = 0, N = 0, e = 0, o = [], A = [];
7597
7673
  for (const J of this.reports) {
7598
- const { packetsSent: V, packetsLost: tt } = J;
7599
- V && (U += V), tt && (R += tt);
7674
+ const { packetsSent: Y, packetsLost: tt } = J;
7675
+ Y && (U += Y), tt && (R += tt);
7600
7676
  }
7601
7677
  for (const J of $) {
7602
- const { packetsSent: V, packetsLost: tt, jitter: X, roundTripTime: nt } = J;
7603
- V && (N += V), tt && (e += tt), X && A.push(X.toFixed(2)), nt && o.push((nt * 100).toFixed(2));
7678
+ const { packetsSent: Y, packetsLost: tt, jitter: X, roundTripTime: nt } = J;
7679
+ Y && (N += Y), tt && (e += tt), X && A.push(X.toFixed(2)), nt && o.push((nt * 100).toFixed(2));
7604
7680
  }
7605
7681
  this.reports = $, A.sort().reverse(), o.sort().reverse();
7606
7682
  const M = N - U, L = e - R;
7607
7683
  if (M === 0) return;
7608
7684
  const F = (L / M).toFixed(2), [Z = "0"] = o, [H = "0"] = A, z = { lostRate: F, roundTripTime: Z, jitter: H };
7609
- JSON.stringify(z) !== JSON.stringify(this.peerNetwork) && this.cwsIns.emitNotify("onRoomNetwork", { code: 200, data: z }), this.peerNetwork = z;
7610
- const W = (J, V, tt) => {
7611
- const X = Number(J), nt = Number(V), lt = Number(tt);
7685
+ JSON.stringify(z) !== JSON.stringify(this.peerNetwork) && this.cwsIns.emitNotify("onRoomNetwork", { code: 200, data: z, desc: "room network is change." }), this.peerNetwork = z;
7686
+ const W = (J, Y, tt) => {
7687
+ const X = Number(J), nt = Number(Y), lt = Number(tt);
7612
7688
  let et = "0";
7613
7689
  return X < 0.03 && nt < 100 && lt < 0.05 ? et = "5" : X < 0.06 && nt < 160 && lt < 0.1 ? et = "4" : X < 0.1 && nt < 250 && lt < 0.15 ? et = "3" : X < 0.15 && nt < 400 && lt < 0.2 ? et = "2" : et = "1", Number(et);
7614
7690
  };
7615
7691
  {
7616
- const J = W(F, Z, H), V = await this.getCaller(), { network: tt } = V, X = { egress: J, ingress: J }, nt = JSON.stringify(tt) !== JSON.stringify(X);
7692
+ const J = W(F, Z, H), Y = await this.getCaller(), { network: tt } = Y, X = { egress: J, ingress: J }, nt = JSON.stringify(tt) !== JSON.stringify(X);
7617
7693
  if (await this.updateUserNetwork(this.options.userId, X), nt) {
7618
7694
  this.emitNotifyUpdateUsers();
7619
7695
  const { userId: lt, roomId: et } = this.options;
@@ -7631,7 +7707,7 @@ class RoomPeer extends RoomUsers {
7631
7707
  /**
7632
7708
  * 获取轨道分析数据
7633
7709
  */
7634
- st(this, Ht, async ($) => {
7710
+ st(this, jt, async ($) => {
7635
7711
  const U = ["inbound-rtp", "remote-inbound-rtp", "outbound-rtp"];
7636
7712
  return new Promise(async (R) => {
7637
7713
  let N = [];
@@ -7647,10 +7723,10 @@ class RoomPeer extends RoomUsers {
7647
7723
  /**
7648
7724
  * 获取连接的所有轨道分析数据
7649
7725
  */
7650
- st(this, jt, () => {
7726
+ st(this, Ht, () => {
7651
7727
  const $ = async () => {
7652
7728
  if (this.peerIns.connectionState !== "connected") return;
7653
- const U = await G(this, Ht).call(this);
7729
+ const U = await G(this, jt).call(this);
7654
7730
  G(this, Ft).call(this, U);
7655
7731
  };
7656
7732
  this.getPeerStatsTimer = setInterval($, 1 * 1e3);
@@ -7661,14 +7737,14 @@ class RoomPeer extends RoomUsers {
7661
7737
  K(this, "stopGetPeerStats", () => clearInterval(this.getPeerStatsTimer));
7662
7738
  }
7663
7739
  }
7664
- Zt = new WeakMap(), Ft = new WeakMap(), Ht = new WeakMap(), jt = new WeakMap();
7665
- var gt, It, zt;
7740
+ Zt = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), Ht = new WeakMap();
7741
+ var Ot, Tt, zt;
7666
7742
  class RoomCalls extends RoomPeer {
7667
7743
  constructor() {
7668
7744
  super();
7669
7745
  // sdk服务版本
7670
7746
  K(this, "sdk_service_version", "1.0.3");
7671
- st(this, gt, !0);
7747
+ st(this, Ot, !0);
7672
7748
  /**
7673
7749
  * 设置本地流
7674
7750
  * @param mediaType MediaType
@@ -7685,7 +7761,7 @@ class RoomCalls extends RoomPeer {
7685
7761
  L.onended = () => this.stopPublish(["screenSharing_audio", "screenSharing_video"]);
7686
7762
  }
7687
7763
  const o = this.getUserStreams(e);
7688
- this.cwsIns.emitNotify("onLocalStream", { code: 200, data: o }), R(o);
7764
+ this.cwsIns.emitNotify("onLocalStream", { code: 200, data: o, desc: "local stream is change." }), R(o);
7689
7765
  } catch (e) {
7690
7766
  N(e);
7691
7767
  }
@@ -7714,7 +7790,7 @@ class RoomCalls extends RoomPeer {
7714
7790
  if (M !== 200) return R(L);
7715
7791
  const { roomId: Z = "", roomUsers: H = [] } = F;
7716
7792
  if (Z !== N) return R("加入的房间不匹配");
7717
- G(this, gt) && this.createSession(), await this.updateUsers(H), this.setRoomState("connected"), await this.emitNotifyUpdateUsers();
7793
+ G(this, Ot) && this.createSession(), await this.updateUsers(H), this.setRoomState("connected"), await this.emitNotifyUpdateUsers();
7718
7794
  const z = await this.getUsers();
7719
7795
  U(z);
7720
7796
  });
@@ -7729,7 +7805,7 @@ class RoomCalls extends RoomPeer {
7729
7805
  */
7730
7806
  K(this, "quitRoom", async () => new Promise(async ($) => {
7731
7807
  const { roomId: U, userId: R } = this.options, N = { roomId: U, user: { id: R } };
7732
- this.cwsIns.sendMessage({ event: "quitRoom", data: N }), await new Promise((e) => setTimeout(() => e(!0), 300)), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {} }), $(!0);
7808
+ this.cwsIns.sendMessage({ event: "quitRoom", data: N }), await new Promise((e) => setTimeout(() => e(!0), 300)), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {}, desc: "sdk is destroy." }), $(!0);
7733
7809
  }));
7734
7810
  /**
7735
7811
  * 同步房间信息
@@ -7755,7 +7831,7 @@ class RoomCalls extends RoomPeer {
7755
7831
  * @returns Promise<RoomUser>
7756
7832
  */
7757
7833
  K(this, "publish", async ($, U = 3) => {
7758
- G(this, gt) && await this.connectionICE();
7834
+ G(this, Ot) && await this.connectionICE();
7759
7835
  const R = () => new Promise(async (N, e) => {
7760
7836
  try {
7761
7837
  $.includes("screenSharing_audio") && !$.includes("screenSharing_video") && ($ = [...$, "screenSharing_video"]);
@@ -7763,7 +7839,7 @@ class RoomCalls extends RoomPeer {
7763
7839
  for (const Z of $) {
7764
7840
  this.getUserStream(o.id, Z).getTracks().length === 0 && await this.setLocalStream(Z, !0);
7765
7841
  {
7766
- const Y = this.getUserStream(o.id, Z), [W] = Y.getTracks();
7842
+ const V = this.getUserStream(o.id, Z), [W] = V.getTracks();
7767
7843
  if (!W) continue;
7768
7844
  const J = await this.addSender(Z, W);
7769
7845
  J && A.push(J);
@@ -7774,14 +7850,14 @@ class RoomCalls extends RoomPeer {
7774
7850
  event: "publish",
7775
7851
  data: { sdp: this.getSdp(), tracks: A, callAction: L }
7776
7852
  }).then(async (Z) => {
7777
- const { code: H = 0, desc: z, data: Y } = Z;
7853
+ const { code: H = 0, desc: z, data: V } = Z;
7778
7854
  if (H !== 200) {
7779
7855
  if (U > 0)
7780
7856
  return await new Promise((J) => setTimeout(() => J(!0), 300)), U = U - 1, F();
7781
7857
  throw this.options.debug && console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: publish is error. count 0", { mediaTypes: $ }), new Error(z);
7782
7858
  }
7783
- const { remoteSdp: W } = Y;
7784
- await this.setRemoteDescription({ type: "answer", sdp: W }), await this.connectionICE(), await this.updateUsertracks(o.id, M, !0), await G(this, It).call(this, L), G(this, gt) || this.cwsIns.sendMessage({ event: "pubNotify", data: { roomId: "", user: { id: o.id, tracks: A } } });
7859
+ const { remoteSdp: W } = V;
7860
+ await this.setRemoteDescription({ type: "answer", sdp: W }), await this.connectionICE(), await this.updateUsertracks(o.id, M, !0), await G(this, Tt).call(this, L), G(this, Ot) || this.cwsIns.sendMessage({ event: "pubNotify", data: { roomId: "", user: { id: o.id, tracks: A } } });
7785
7861
  {
7786
7862
  await this.emitNotifyUpdateUsers();
7787
7863
  const J = await this.getCaller();
@@ -7815,7 +7891,7 @@ class RoomCalls extends RoomPeer {
7815
7891
  await this.closeUserTracks(e.id, o, !0);
7816
7892
  {
7817
7893
  const M = await this.getCallAction(e.tracks);
7818
- await G(this, It).call(this, M);
7894
+ await G(this, Tt).call(this, M);
7819
7895
  }
7820
7896
  await this.createOffer(), await this.cwsIns.sendMessage({
7821
7897
  event: "closeTrack",
@@ -7838,7 +7914,7 @@ class RoomCalls extends RoomPeer {
7838
7914
  * @returns Promise<RoomUser[]>
7839
7915
  */
7840
7916
  K(this, "subscribe", async ($ = [], U = 3) => {
7841
- G(this, gt) && await this.connectionICE();
7917
+ G(this, Ot) && await this.connectionICE();
7842
7918
  const R = () => new Promise(async (N, e) => {
7843
7919
  try {
7844
7920
  this.prohibitNotify = !0;
@@ -7847,8 +7923,8 @@ class RoomCalls extends RoomPeer {
7847
7923
  for (const Z of o) {
7848
7924
  const { isSelf: H, tracks: z = [] } = Z;
7849
7925
  if (!H) {
7850
- const Y = z.filter(({ trackName: W, mid: J = "" }) => J !== "" && ($.includes(W) || $.length === 0));
7851
- Y.length !== 0 && A.push({ ...Z, tracks: Y });
7926
+ const V = z.filter(({ trackName: W, mid: J = "" }) => J !== "" && ($.includes(W) || $.length === 0));
7927
+ V.length !== 0 && A.push({ ...Z, tracks: V });
7852
7928
  }
7853
7929
  }
7854
7930
  const M = async () => {
@@ -7859,7 +7935,7 @@ class RoomCalls extends RoomPeer {
7859
7935
  if (A.length === 0) return M();
7860
7936
  const L = [];
7861
7937
  for (const Z of A) {
7862
- const { id: H, tracks: z } = Z, Y = mt(z, ["type", "trackName"]), W = { id: H, tracks: Y };
7938
+ const { id: H, tracks: z } = Z, V = mt(z, ["type", "trackName"]), W = { id: H, tracks: V };
7863
7939
  L.push(W);
7864
7940
  }
7865
7941
  const F = async () => {
@@ -7867,11 +7943,11 @@ class RoomCalls extends RoomPeer {
7867
7943
  event: "subscribe",
7868
7944
  data: { users: L }
7869
7945
  }).then(async (Z) => {
7870
- const { code: H = 0, data: z, desc: Y } = Z;
7946
+ const { code: H = 0, data: z, desc: V } = Z;
7871
7947
  if (H !== 200) {
7872
7948
  if (U > 0)
7873
- return await new Promise((V) => setTimeout(() => V(!0), 300)), U = U - 1, F();
7874
- 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: $ }), new Error(Y);
7949
+ return await new Promise((Y) => setTimeout(() => Y(!0), 300)), U = U - 1, F();
7950
+ 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: $ }), new Error(V);
7875
7951
  }
7876
7952
  const { remoteSdp: W, users: J = [] } = z;
7877
7953
  this.onSubscribeUserTracks(J).then(() => M()), await this.setRemoteDescription({ type: "offer", sdp: W }), await this.renegotiate();
@@ -7896,9 +7972,9 @@ class RoomCalls extends RoomPeer {
7896
7972
  for (const A of e) {
7897
7973
  const { tracks: M = [] } = A;
7898
7974
  for (const L of M) {
7899
- const { type: F, mid: Z, trackName: H, mediaType: z, msid: Y } = L;
7900
- if (!(!z || !Y) && ($.length === 0 || $.includes(H))) {
7901
- const W = { type: F, mid: Z, trackName: Y };
7975
+ const { type: F, mid: Z, trackName: H, mediaType: z, msid: V } = L;
7976
+ if (!(!z || !V) && ($.length === 0 || $.includes(H))) {
7977
+ const W = { type: F, mid: Z, trackName: V };
7902
7978
  o.push(W), await this.closeUserTracks(A.id, [L]);
7903
7979
  }
7904
7980
  }
@@ -7938,7 +8014,7 @@ class RoomCalls extends RoomPeer {
7938
8014
  }
7939
8015
  }
7940
8016
  const A = await this.getCallAction(o);
7941
- await G(this, It).call(this, A), await this.emitNotifyUpdateUsers();
8017
+ await G(this, Tt).call(this, A), await this.emitNotifyUpdateUsers();
7942
8018
  };
7943
8019
  return this.asyncQueue.add(R, { key: "inactiveTracks" });
7944
8020
  });
@@ -7956,7 +8032,7 @@ class RoomCalls extends RoomPeer {
7956
8032
  /**
7957
8033
  * 更新自己通话状态
7958
8034
  */
7959
- st(this, It, async ($) => new Promise(async (U, R) => {
8035
+ st(this, Tt, async ($) => new Promise(async (U, R) => {
7960
8036
  const { roomId: N, userId: e } = this.options, o = { roomId: N, user: { id: e, callAction: $ } };
7961
8037
  await this.cwsIns.sendMessage({ event: "updateCall", data: o }).then(async (A) => {
7962
8038
  const { code: M = 0 } = A;
@@ -8008,17 +8084,17 @@ class RoomCalls extends RoomPeer {
8008
8084
  this.setRoomState("ready");
8009
8085
  }
8010
8086
  }
8011
- gt = new WeakMap(), It = new WeakMap(), zt = new WeakMap();
8087
+ Ot = new WeakMap(), Tt = new WeakMap(), zt = new WeakMap();
8012
8088
  class Room extends RoomCalls {
8013
8089
  constructor() {
8014
8090
  super();
8015
8091
  }
8016
8092
  }
8017
- var Ot, Jt, Kt, Wt;
8093
+ var gt, Jt, Kt, Wt;
8018
8094
  class QuickVO extends Room {
8019
8095
  constructor($) {
8020
8096
  super();
8021
- st(this, Ot, /* @__PURE__ */ new Map());
8097
+ st(this, gt, /* @__PURE__ */ new Map());
8022
8098
  /**
8023
8099
  * 添加内部监听事件
8024
8100
  */
@@ -8079,26 +8155,26 @@ class QuickVO extends Room {
8079
8155
  const { type: Z } = F, H = mediaType_keys[Z], z = M[H];
8080
8156
  if (Z === 0) {
8081
8157
  const { microphoneCamera_audio: W } = A, J = W.getTracks();
8082
- for (const V of J)
8083
- V.enabled = z;
8158
+ for (const Y of J)
8159
+ Y.enabled = z;
8084
8160
  }
8085
8161
  if (Z === 1) {
8086
8162
  const { microphoneCamera_video: W } = A, J = W.getTracks();
8087
- for (const V of J)
8088
- V.enabled = z;
8163
+ for (const Y of J)
8164
+ Y.enabled = z;
8089
8165
  }
8090
8166
  if (Z === 2) {
8091
8167
  const { screenSharing_video: W } = A, J = W.getTracks();
8092
- for (const V of J)
8093
- V.enabled = z;
8168
+ for (const Y of J)
8169
+ Y.enabled = z;
8094
8170
  }
8095
8171
  if (Z === 3) {
8096
8172
  const { screenSharing_audio: W } = A, J = W.getTracks();
8097
- for (const V of J)
8098
- V.enabled = z;
8173
+ for (const Y of J)
8174
+ Y.enabled = z;
8099
8175
  }
8100
- const Y = { ...F, enabled: z };
8101
- L.push(Y);
8176
+ const V = { ...F, enabled: z };
8177
+ L.push(V);
8102
8178
  }
8103
8179
  await this.updateUsertracks(R, L, !0), await this.updateUserCallAction(R, N), this.emitNotifyUpdateUsers();
8104
8180
  };
@@ -8136,13 +8212,13 @@ class QuickVO extends Room {
8136
8212
  */
8137
8213
  K(this, "addRequestAnimationFrame", async ($, U) => {
8138
8214
  {
8139
- const N = G(this, Ot).get($);
8215
+ const N = G(this, gt).get($);
8140
8216
  N && cancelAnimationFrame(N);
8141
8217
  }
8142
8218
  const R = (N = Date.now()) => {
8143
8219
  U(N);
8144
8220
  const e = requestAnimationFrame(R);
8145
- G(this, Ot).set($, e);
8221
+ G(this, gt).set($, e);
8146
8222
  };
8147
8223
  R();
8148
8224
  });
@@ -8151,10 +8227,10 @@ class QuickVO extends Room {
8151
8227
  * @param keys string[] = []
8152
8228
  */
8153
8229
  K(this, "clearRequestAnimationFrame", async ($ = []) => {
8154
- $.length === 0 && ($ = [...G(this, Ot).keys()]);
8230
+ $.length === 0 && ($ = [...G(this, gt).keys()]);
8155
8231
  const U = [];
8156
8232
  for (const R of $) {
8157
- const N = G(this, Ot).get(R);
8233
+ const N = G(this, gt).get(R);
8158
8234
  N && (cancelAnimationFrame(N), U.push(N));
8159
8235
  }
8160
8236
  return U;
@@ -8169,7 +8245,7 @@ class QuickVO extends Room {
8169
8245
  this.setOptions($), this.initCwsCall(), G(this, Kt).call(this), G(this, Wt).call(this), G(this, Jt).call(this);
8170
8246
  }
8171
8247
  }
8172
- Ot = new WeakMap(), Jt = new WeakMap(), Kt = new WeakMap(), Wt = new WeakMap();
8248
+ gt = new WeakMap(), Jt = new WeakMap(), Kt = new WeakMap(), Wt = new WeakMap();
8173
8249
  export {
8174
8250
  QuickVO,
8175
8251
  ignoreEvent