@vindral/web-sdk 4.1.7-2-g5b3cced4 → 4.1.7-3-g006eed9c

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.
@@ -39,7 +39,7 @@ var Ci = (s) => {
39
39
  l = dm(g, t, u = {}, s[3], P), g && (l.static = w, l.private = b, p = l.access = { has: b ? (B) => lm(n, B) : (B) => t in B }, g ^ 3 && (p.get = b ? (B) => (g ^ 1 ? a : A)(B, n, g ^ 4 ? o : E.get) : (B) => B[t]), g > 2 && (p.set = b ? (B, X) => m(B, n, X, g ^ 4 ? o : E.set) : (B, X) => B[t] = X)), h = (0, i[U])(g ? g < 4 ? b ? o : E[k] : g > 4 ? void 0 : { get: E.get, set: E.set } : n, l), u._ = 1, g ^ 4 || h === void 0 ? er(h) && (g > 4 ? I.unshift(h) : g ? b ? o = h : E[k] = h : n = h) : typeof h != "object" || h === null ? Bt("Object expected") : (er(c = h.get) && (E.get = c), er(c = h.set) && (E.set = c), er(c = h.init) && I.unshift(c));
40
40
  return g || Zt(s, n), E && Hc(n, t, E), b ? g ^ 4 ? o : E : n;
41
41
  }, r = (s, e, t) => Ya(s, typeof e != "symbol" ? e + "" : e, t), Qc = (s, e, t) => e.has(s) || Bt("Cannot " + t), lm = (s, e) => Object(e) !== e ? Bt('Cannot use the "in" operator on this value') : s.has(e), a = (s, e, t) => (Qc(s, e, "read from private field"), t ? t.call(s) : e.get(s)), d = (s, e, t) => e.has(s) ? Bt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), m = (s, e, t, i) => (Qc(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), A = (s, e, t) => (Qc(s, e, "access private method"), t);
42
- var Ve = (s, e, t, i) => ({
42
+ var Ge = (s, e, t, i) => ({
43
43
  set _(n) {
44
44
  m(s, e, n, t);
45
45
  },
@@ -92,7 +92,7 @@ var f = (s, e, t) => new Promise((i, n) => {
92
92
  throw o;
93
93
  }, "return" in e && i("return"), n;
94
94
  }, $ = (s, e, t) => (e = s[lt("asyncIterator")]) ? e.call(s) : (s = s[lt("iterator")](), e = {}, t = (i, n) => (n = s[i]) && (e[i] = (o) => new Promise((c, h, u) => (o = n.call(s, o), u = o.done, Promise.resolve(o.value).then((l) => c({ value: l, done: u }), h)))), t("next"), t("return"), e);
95
- var Ge = (s, e, t) => {
95
+ var je = (s, e, t) => {
96
96
  if (e != null) {
97
97
  typeof e != "object" && typeof e != "function" && Bt("Object expected");
98
98
  var i, n;
@@ -105,7 +105,7 @@ var Ge = (s, e, t) => {
105
105
  }), s.push([t, i, e]);
106
106
  } else t && s.push([t]);
107
107
  return e;
108
- }, je = (s, e, t) => {
108
+ }, We = (s, e, t) => {
109
109
  var i = typeof SuppressedError == "function" ? SuppressedError : function(c, h, u, l) {
110
110
  return l = Error(u), l.name = "SuppressedError", l.error = c, l.suppressed = h, l;
111
111
  }, n = (c) => e = t ? new i(c, e, "An error was suppressed during disposal") : (t = !0, c), o = (c) => {
@@ -309,12 +309,12 @@ class Ed {
309
309
  r(this, "peekBit", () => this.getBit(a(this, ft), a(this, Ke)));
310
310
  r(this, "readBit", () => {
311
311
  const e = this.peekBit();
312
- return Ve(this, Ke)._++, e;
312
+ return Ge(this, Ke)._++, e;
313
313
  });
314
314
  r(this, "readBits", (e) => {
315
315
  let t = 0;
316
316
  for (let i = 0; i < e; i++)
317
- t = t << 1 | (this.getBit(a(this, ft), Ve(this, Ke)._++) ? 1 : 0);
317
+ t = t << 1 | (this.getBit(a(this, ft), Ge(this, Ke)._++) ? 1 : 0);
318
318
  return t;
319
319
  });
320
320
  r(this, "remainingBits", () => a(this, ft).byteLength * 8 - a(this, Ke));
@@ -324,11 +324,11 @@ class Ed {
324
324
  });
325
325
  r(this, "readUnsignedExpGolomb", () => {
326
326
  let e = 0;
327
- for (; this.getBit(a(this, ft), Ve(this, Ke)._++) === 0; )
327
+ for (; this.getBit(a(this, ft), Ge(this, Ke)._++) === 0; )
328
328
  e++;
329
329
  let t = 1 << e;
330
330
  for (let i = e - 1; i >= 0; i--)
331
- t |= this.getBit(a(this, ft), Ve(this, Ke)._++) << i;
331
+ t |= this.getBit(a(this, ft), Ge(this, Ke)._++) << i;
332
332
  return t - 1;
333
333
  });
334
334
  // Safety: We assume that base has enough elements
@@ -736,12 +736,12 @@ class Lm {
736
736
  }
737
737
  }
738
738
  _i = new WeakMap(), Ni = new WeakMap();
739
- var We, et;
739
+ var ze, et;
740
740
  class ke {
741
741
  constructor(e) {
742
- d(this, We);
742
+ d(this, ze);
743
743
  d(this, et);
744
- m(this, We, e), m(this, et, new z());
744
+ m(this, ze, e), m(this, et, new z());
745
745
  }
746
746
  isClosed() {
747
747
  var e;
@@ -751,29 +751,29 @@ class ke {
751
751
  * Return only the current value
752
752
  */
753
753
  current() {
754
- return a(this, We);
754
+ return a(this, ze);
755
755
  }
756
756
  /**
757
757
  * Return the current value and a promise for the next value
758
758
  */
759
759
  value() {
760
760
  var e;
761
- return [a(this, We), (e = a(this, et)) == null ? void 0 : e.promise];
761
+ return [a(this, ze), (e = a(this, et)) == null ? void 0 : e.promise];
762
762
  }
763
763
  update(e) {
764
764
  var t;
765
765
  if (!((t = a(this, et)) != null && t.pending))
766
766
  throw new Error("ObservableValue is closed");
767
- m(this, We, e instanceof Function ? e(a(this, We)) : e), a(this, et).resolve(a(this, We)), m(this, et, new z());
767
+ m(this, ze, e instanceof Function ? e(a(this, ze)) : e), a(this, et).resolve(a(this, ze)), m(this, et, new z());
768
768
  }
769
769
  close() {
770
770
  var e;
771
- (e = a(this, et)) == null || e.resolve(a(this, We)), m(this, et, void 0);
771
+ (e = a(this, et)) == null || e.resolve(a(this, ze)), m(this, et, void 0);
772
772
  }
773
773
  waitFor(e) {
774
774
  return f(this, null, function* () {
775
- if (e(a(this, We)))
776
- return a(this, We);
775
+ if (e(a(this, ze)))
776
+ return a(this, ze);
777
777
  for (; ; ) {
778
778
  const [t, i] = this.value();
779
779
  if (!i)
@@ -795,7 +795,7 @@ class ke {
795
795
  });
796
796
  }
797
797
  }
798
- We = new WeakMap(), et = new WeakMap();
798
+ ze = new WeakMap(), et = new WeakMap();
799
799
  const Iu = (s, e) => {
800
800
  const t = S({}, s);
801
801
  return typeof t != "object" || e.forEach((i) => {
@@ -2320,13 +2320,13 @@ const du = class du {
2320
2320
  return ((e = a(this, H).moof.traf.trun) == null ? void 0 : e.samplesCount) || 0;
2321
2321
  }
2322
2322
  sample(e) {
2323
- var v, k, I, P, E, U, B, X, Q, Fe, ie, Je, ut, Re, y;
2323
+ var v, k, I, P, E, U, B, X, Q, _e, ie, Je, ut, Re, y;
2324
2324
  const t = (v = a(this, Be).init().moov.traks[0]) == null ? void 0 : v.mdia.minf.stbl.stsd.codec, i = ((k = a(this, H).moof.traf.trun) == null ? void 0 : k.samplesCount) || 0, n = (I = a(this, H).moof.traf.tfdt) == null ? void 0 : I.baseMediaDecodeTime;
2325
2325
  if (e >= i || typeof n == "undefined" || !t)
2326
2326
  return;
2327
2327
  const o = this.compositionTimeOffset(e), c = ((P = a(this, H).moof.traf.trun) == null ? void 0 : P.sampleDurations[e]) || 0, h = ((E = a(this, H).moof.traf.trun) == null ? void 0 : E.sampleDurations.slice(0, e).reduce((T, F) => T + F, 0)) || 0, u = n + h, l = ((U = a(this, Be).init().moov.traks[0]) == null ? void 0 : U.mdia.mdhd.timescale) || 1e3, p = ((B = a(this, H).moof.traf.trun) == null ? void 0 : B.sampleSizes[e]) || a(this, H).mdat.data.byteLength, g = ((X = a(this, H).moof.traf.trun) == null ? void 0 : X.sampleSizes.slice(0, e).reduce((T, F) => T + F, 0)) || 0, w = a(this, H).mdat.data.subarray(g, g + p), b = ((Q = a(this, H).moof.traf.trun) == null ? void 0 : Q.is_sync_sample(e)) || !1;
2328
2328
  if (this.mediaType() === "video") {
2329
- const T = ((Fe = a(this, Be).init().moov.traks[0]) == null ? void 0 : Fe.tkhd.width) || 0, F = ((ie = a(this, Be).init().moov.traks[0]) == null ? void 0 : ie.tkhd.height) || 0;
2329
+ const T = ((_e = a(this, Be).init().moov.traks[0]) == null ? void 0 : _e.tkhd.width) || 0, F = ((ie = a(this, Be).init().moov.traks[0]) == null ? void 0 : ie.tkhd.height) || 0;
2330
2330
  return {
2331
2331
  type: "video",
2332
2332
  codec: t,
@@ -2850,18 +2850,18 @@ const re = (s, e, t) => {
2850
2850
  const Z = s.readBits(5) + 1;
2851
2851
  for (let Me = 0; Me < Z; Me++) {
2852
2852
  const J = s.readBits(12), ce = s.readBits(5);
2853
- let _e = 0;
2854
- if (ce > 7 && (_e = s.readBit()), c)
2853
+ let Ne = 0;
2854
+ if (ce > 7 && (Ne = s.readBit()), c)
2855
2855
  throw new Error("decoderModelInfoPresentFlag==1");
2856
- u && s.readBit() !== 0 && s.readBits(4), g.push({ tier: _e, operatingPointIdc: J, seqLevelIdx: ce });
2856
+ u && s.readBit() !== 0 && s.readBits(4), g.push({ tier: Ne, operatingPointIdc: J, seqLevelIdx: ce });
2857
2857
  }
2858
2858
  }
2859
2859
  const w = s.readBits(4) + 1, b = s.readBits(4) + 1, v = s.readBits(w) + 1, k = s.readBits(b) + 1;
2860
2860
  let I = !1;
2861
2861
  n ? I = !1 : I = s.readBit() !== 0, I && (l = s.readBits(4) + 2, p = s.readBits(3) + 1);
2862
2862
  const P = s.readBit() !== 0, E = s.readBit() !== 0, U = s.readBit() !== 0;
2863
- let B = !1, X = !1, Q = !1, Fe = !1, ie = !1, Je = !1, ut = !1, Re = Nu, y = $c, T = 0;
2864
- n || (B = s.readBit() !== 0, X = s.readBit() !== 0, Q = s.readBit() !== 0, Fe = s.readBit() !== 0, ie = s.readBit() !== 0, ie && (Je = s.readBit() !== 0, ut = s.readBit() !== 0), s.readBit() !== 0 ? Re = Nu : Re = s.readBit(), Re > 0 ? s.readBit() > 0 ? y = $c : y = s.readBit() : y = $c, ie ? T = s.readBits(3) : T = 0);
2863
+ let B = !1, X = !1, Q = !1, _e = !1, ie = !1, Je = !1, ut = !1, Re = Nu, y = $c, T = 0;
2864
+ n || (B = s.readBit() !== 0, X = s.readBit() !== 0, Q = s.readBit() !== 0, _e = s.readBit() !== 0, ie = s.readBit() !== 0, ie && (Je = s.readBit() !== 0, ut = s.readBit() !== 0), s.readBit() !== 0 ? Re = Nu : Re = s.readBit(), Re > 0 ? s.readBit() > 0 ? y = $c : y = s.readBit() : y = $c, ie ? T = s.readBits(3) : T = 0);
2865
2865
  const F = s.readBit() !== 0, G = s.readBit() !== 0, L = s.readBit() !== 0;
2866
2866
  return {
2867
2867
  seqProfile: e,
@@ -2890,7 +2890,7 @@ const re = (s, e, t) => {
2890
2890
  enableInterintraCompound: B,
2891
2891
  enableMaskedCompound: X,
2892
2892
  enableWarpedMotion: Q,
2893
- enableDualFilter: Fe,
2893
+ enableDualFilter: _e,
2894
2894
  enableOrderHint: ie,
2895
2895
  enableJntComp: Je,
2896
2896
  enableRefFrameMvs: ut,
@@ -3094,11 +3094,11 @@ class Gu {
3094
3094
  skipEmptyLines() {
3095
3095
  let e = 0;
3096
3096
  for (; a(this, ni)[a(this, Dt)] === ""; )
3097
- Ve(this, Dt)._++, e++;
3097
+ Ge(this, Dt)._++, e++;
3098
3098
  return e;
3099
3099
  }
3100
3100
  readLine() {
3101
- return a(this, ni)[Ve(this, Dt)._++];
3101
+ return a(this, ni)[Ge(this, Dt)._++];
3102
3102
  }
3103
3103
  takeUntilEmptyLine() {
3104
3104
  const e = [];
@@ -3574,7 +3574,7 @@ class Ag {
3574
3574
  return { done: !0, value: void 0 };
3575
3575
  const e = a(this, Xr) === 0 ? a(this, Ys) : yield a(this, gt).readBigVarInt(), t = yield a(this, gt).readBigVarInt(), i = yield a(this, gt).readVarInt();
3576
3576
  let n = 0, o = new Uint8Array();
3577
- return i > 0 ? o = yield a(this, gt).read(i) : n = yield a(this, gt).readVarInt(), Yd(n), (n === Ee.EndOfTrackAndGroup || n === Ee.EndOfGroup) && a(this, en).resolve(n), Ve(this, Xr)._++, {
3577
+ return i > 0 ? o = yield a(this, gt).read(i) : n = yield a(this, gt).readVarInt(), Yd(n), (n === Ee.EndOfTrackAndGroup || n === Ee.EndOfGroup) && a(this, en).resolve(n), Ge(this, Xr)._++, {
3578
3578
  done: !1,
3579
3579
  value: {
3580
3580
  subscribeId: a(this, Ks),
@@ -4762,17 +4762,17 @@ class eA {
4762
4762
  }
4763
4763
  }
4764
4764
  we = new WeakMap(), oa = new WeakMap();
4765
- var ca, ze, ha, ua, pn, da, nc, Ul;
4765
+ var ca, He, ha, ua, pn, da, nc, Ul;
4766
4766
  class tA {
4767
4767
  constructor(e, t, i, n) {
4768
4768
  d(this, nc);
4769
4769
  d(this, ca);
4770
- d(this, ze);
4770
+ d(this, He);
4771
4771
  d(this, ha);
4772
4772
  d(this, ua);
4773
4773
  d(this, pn);
4774
4774
  d(this, da);
4775
- m(this, ca, t), m(this, ze, e), m(this, ha, i), m(this, ua, n), m(this, da, ge.get().createContext(`SubscriptionWriter:${e.subscribe.name}`));
4775
+ m(this, ca, t), m(this, He, e), m(this, ha, i), m(this, ua, n), m(this, da, ge.get().createContext(`SubscriptionWriter:${e.subscribe.name}`));
4776
4776
  }
4777
4777
  finalInfo() {
4778
4778
  return a(this, pn);
@@ -4781,24 +4781,24 @@ class tA {
4781
4781
  return f(this, null, function* () {
4782
4782
  yield Promise.race([
4783
4783
  A(this, nc, Ul).call(this).catch((e) => a(this, da).error("error writing subscription", e)),
4784
- a(this, ze).unsubscribed(),
4785
- a(this, ze).done(),
4786
- a(this, ze).expiryNotification().catch(D)
4784
+ a(this, He).unsubscribed(),
4785
+ a(this, He).done(),
4786
+ a(this, He).expiryNotification().catch(D)
4787
4787
  ]);
4788
4788
  });
4789
4789
  }
4790
4790
  done(e, t) {
4791
4791
  return f(this, null, function* () {
4792
- if (a(this, ze).isUnsubscribed())
4792
+ if (a(this, He).isUnsubscribed())
4793
4793
  return;
4794
4794
  const i = {
4795
4795
  type: C.SubscribeDone,
4796
- id: a(this, ze).subscribe.id,
4796
+ id: a(this, He).subscribe.id,
4797
4797
  errorCode: e,
4798
4798
  reason: t,
4799
4799
  finalInfo: a(this, pn)
4800
4800
  };
4801
- a(this, ze).onDone(i), yield a(this, ua).push(i);
4801
+ a(this, He).onDone(i), yield a(this, ua).push(i);
4802
4802
  });
4803
4803
  }
4804
4804
  [Rt()]() {
@@ -4808,25 +4808,25 @@ class tA {
4808
4808
  return this.done(vh.TrackEnded, "Track ended");
4809
4809
  }
4810
4810
  }
4811
- ca = new WeakMap(), ze = new WeakMap(), ha = new WeakMap(), ua = new WeakMap(), pn = new WeakMap(), da = new WeakMap(), nc = new WeakSet(), Ul = function() {
4811
+ ca = new WeakMap(), He = new WeakMap(), ha = new WeakMap(), ua = new WeakMap(), pn = new WeakMap(), da = new WeakMap(), nc = new WeakSet(), Ul = function() {
4812
4812
  return f(this, null, function* () {
4813
4813
  try {
4814
4814
  for (var c = $(a(this, ca)), h, u, l; h = !(u = yield c.next()).done; h = !1) {
4815
4815
  const p = u.value;
4816
4816
  var e = [];
4817
4817
  try {
4818
- const g = a(this, ze).range();
4818
+ const g = a(this, He).range();
4819
4819
  if (g && (g.startGroup > p.id || g.endGroup && g.endGroup < p.id))
4820
4820
  break;
4821
4821
  const w = yield a(this, ha).openSendStream();
4822
4822
  const b = new eA(w);
4823
- const v = Ge(e, new iA(b, p.consume(), a(this, ze)), !0);
4823
+ const v = je(e, new iA(b, p.consume(), a(this, He)), !0);
4824
4824
  yield v.run();
4825
4825
  m(this, pn, v.finalGroup());
4826
4826
  } catch (t) {
4827
4827
  var i = t, n = !0;
4828
4828
  } finally {
4829
- var o = je(e, i, n);
4829
+ var o = We(e, i, n);
4830
4830
  o && (yield o);
4831
4831
  }
4832
4832
  }
@@ -5145,7 +5145,7 @@ class Pl {
5145
5145
  var h = k.value;
5146
5146
  var u = [];
5147
5147
  try {
5148
- const P = Ge(u, h, !0);
5148
+ const P = je(u, h, !0);
5149
5149
  try {
5150
5150
  for (var i = $(P.groups()), n, o, c; n = !(o = yield new q(i.next())).done; n = !1) {
5151
5151
  const E = o.value;
@@ -5169,7 +5169,7 @@ class Pl {
5169
5169
  } catch (l) {
5170
5170
  var p = l, g = !0;
5171
5171
  } finally {
5172
- var w = je(u, p, g);
5172
+ var w = We(u, p, g);
5173
5173
  w && (yield new q(w));
5174
5174
  }
5175
5175
  }
@@ -5463,59 +5463,59 @@ Ms = Ci(null), nt = new WeakMap(), ga = new WeakMap(), is = new WeakMap(), En =
5463
5463
  this.close();
5464
5464
  }, co = ye(Ms, 17, "#runOutgoingMessages", Ad, ue, co), ho = ye(Ms, 17, "#runControl", gd, ue, ho), uo = ye(Ms, 17, "#runObjects", pd, ue, uo), or = ye(Ms, 17, "#dispose", fd, ue, or), Zt(Ms, ou);
5465
5465
  const oA = 128;
5466
- var He, Aa, ss, In, wa, be, xi, Li;
5466
+ var Qe, Aa, ss, In, wa, be, xi, Li;
5467
5467
  class cA {
5468
5468
  constructor(e, t, i) {
5469
5469
  d(this, be);
5470
- d(this, He);
5470
+ d(this, Qe);
5471
5471
  d(this, Aa);
5472
5472
  d(this, ss, !0);
5473
5473
  d(this, In, !1);
5474
5474
  d(this, wa);
5475
- m(this, He, e), m(this, Aa, t), m(this, wa, i);
5475
+ m(this, Qe, e), m(this, Aa, t), m(this, wa, i);
5476
5476
  }
5477
5477
  writeUnsigned8(e) {
5478
5478
  return f(this, null, function* () {
5479
- return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, He).writeUnsigned8(e);
5479
+ return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, Qe).writeUnsigned8(e);
5480
5480
  });
5481
5481
  }
5482
5482
  writeVarInt(e) {
5483
5483
  return f(this, null, function* () {
5484
- return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, He).writeVarInt(e);
5484
+ return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, Qe).writeVarInt(e);
5485
5485
  });
5486
5486
  }
5487
5487
  writeBigVarInt(e) {
5488
5488
  return f(this, null, function* () {
5489
- return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, He).writeBigVarInt(e);
5489
+ return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, Qe).writeBigVarInt(e);
5490
5490
  });
5491
5491
  }
5492
5492
  write(e) {
5493
5493
  return f(this, null, function* () {
5494
- return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, He).write(e);
5494
+ return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, Qe).write(e);
5495
5495
  });
5496
5496
  }
5497
5497
  writeString(e) {
5498
5498
  return f(this, null, function* () {
5499
- return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, He).writeString(e);
5499
+ return A(this, be, xi).call(this), yield A(this, be, Li).call(this), a(this, Qe).writeString(e);
5500
5500
  });
5501
5501
  }
5502
5502
  flush() {
5503
5503
  return f(this, null, function* () {
5504
- A(this, be, xi).call(this), m(this, ss, !0), yield a(this, He).flush();
5504
+ A(this, be, xi).call(this), m(this, ss, !0), yield a(this, Qe).flush();
5505
5505
  });
5506
5506
  }
5507
5507
  close() {
5508
5508
  return f(this, null, function* () {
5509
- a(this, In) || (m(this, ss, !0), yield A(this, be, Li).call(this, !1), yield a(this, He).flush(), m(this, In, !0), a(this, wa).call(this));
5509
+ a(this, In) || (m(this, ss, !0), yield A(this, be, Li).call(this, !1), yield a(this, Qe).flush(), m(this, In, !0), a(this, wa).call(this));
5510
5510
  });
5511
5511
  }
5512
5512
  }
5513
- He = new WeakMap(), Aa = new WeakMap(), ss = new WeakMap(), In = new WeakMap(), wa = new WeakMap(), be = new WeakSet(), xi = function() {
5513
+ Qe = new WeakMap(), Aa = new WeakMap(), ss = new WeakMap(), In = new WeakMap(), wa = new WeakMap(), be = new WeakSet(), xi = function() {
5514
5514
  if (a(this, In))
5515
5515
  throw new Error("Stream is closed");
5516
5516
  }, Li = function(e = !0) {
5517
5517
  if (a(this, ss))
5518
- return m(this, ss, !1), a(this, He).writeUnsigned8(a(this, Aa) | (e ? oA : 0));
5518
+ return m(this, ss, !1), a(this, Qe).writeUnsigned8(a(this, Aa) | (e ? oA : 0));
5519
5519
  };
5520
5520
  var di, Nt, Cn, ns, Vt, Rn, Bn, rc, Ll;
5521
5521
  class hA {
@@ -5674,7 +5674,7 @@ Gt = new WeakMap(), jt = new WeakMap(), li = new WeakMap(), ba = new WeakMap(),
5674
5674
  return;
5675
5675
  }
5676
5676
  const n = new Lo(new Uint8Array(), t);
5677
- yield a(this, li).push(tl(n, a(this, ya))), Ve(this, ya)._++;
5677
+ yield a(this, li).push(tl(n, a(this, ya))), Ge(this, ya)._++;
5678
5678
  }
5679
5679
  });
5680
5680
  };
@@ -5794,7 +5794,7 @@ function pA(s) {
5794
5794
  const e = new TextDecoder().decode(s);
5795
5795
  return JSON.parse(e);
5796
5796
  }
5797
- var De, St, rs, Qe, va, cc, Ta, Eh;
5797
+ var De, St, rs, Xe, va, cc, Ta, Eh;
5798
5798
  const lu = class lu {
5799
5799
  constructor(e, t) {
5800
5800
  d(this, Ta);
@@ -5804,15 +5804,15 @@ const lu = class lu {
5804
5804
  // We keep track of the most recent groups to ensure we haven't missed any due to re-ordering before we close subscriptions
5805
5805
  d(this, rs, new ee(100));
5806
5806
  // This contains the unconsumed groups if this track has an absolute range
5807
- d(this, Qe);
5807
+ d(this, Xe);
5808
5808
  d(this, va);
5809
5809
  d(this, cc, (e) => f(this, null, function* () {
5810
5810
  if (!e)
5811
5811
  return a(this, De).close();
5812
- if (a(this, Qe))
5812
+ if (a(this, Xe))
5813
5813
  return;
5814
5814
  const t = a(this, rs).items().reduce((i, n) => i < n ? i : n, e);
5815
- m(this, Qe, A(this, Ta, Eh).call(this, t, e)), a(this, Qe).size === 0 && (yield a(this, De).close());
5815
+ m(this, Xe, A(this, Ta, Eh).call(this, t, e)), a(this, Xe).size === 0 && (yield a(this, De).close());
5816
5816
  }));
5817
5817
  m(this, De, e), m(this, St, t), e.done().then((i) => f(this, null, function* () {
5818
5818
  var n;
@@ -5837,7 +5837,7 @@ const lu = class lu {
5837
5837
  // The subscription needs renewal if it is still active and aren't finishing up the unconsumed group IDs.
5838
5838
  // If we are just finishing up the unconsumed group IDs we assume we'll finish up before the expiry.
5839
5839
  needsRenewal() {
5840
- return a(this, De).expiryState() === "active" && a(this, Qe) === void 0;
5840
+ return a(this, De).expiryState() === "active" && a(this, Xe) === void 0;
5841
5841
  }
5842
5842
  /** Set the endGroup as the end of group.
5843
5843
  * This lets the subscription end when the endGroup is reached.
@@ -5848,7 +5848,7 @@ const lu = class lu {
5848
5848
  }
5849
5849
  update(e, t) {
5850
5850
  return f(this, null, function* () {
5851
- return m(this, Qe, A(this, Ta, Eh).call(this, e, t)), a(this, Qe).size === 0 && (yield a(this, De).close()), a(this, De).update(e, t);
5851
+ return m(this, Xe, A(this, Ta, Eh).call(this, e, t)), a(this, Xe).size === 0 && (yield a(this, De).close()), a(this, De).update(e, t);
5852
5852
  });
5853
5853
  }
5854
5854
  unsubscribe() {
@@ -5857,13 +5857,13 @@ const lu = class lu {
5857
5857
  next() {
5858
5858
  return f(this, null, function* () {
5859
5859
  var i;
5860
- if (a(this, Qe) && a(this, Qe).size === 0)
5860
+ if (a(this, Xe) && a(this, Xe).size === 0)
5861
5861
  return { done: !0, value: void 0 };
5862
5862
  const e = yield a(this, va).next();
5863
5863
  if (e.done)
5864
5864
  return e;
5865
5865
  const t = e.value.groupId();
5866
- return (i = a(this, Qe)) == null || i.delete(t), a(this, rs).push(t), a(this, St) || m(this, St, t), m(this, St, a(this, St) < t ? t : a(this, St)), e;
5866
+ return (i = a(this, Xe)) == null || i.delete(t), a(this, rs).push(t), a(this, St) || m(this, St, t), m(this, St, a(this, St) < t ? t : a(this, St)), e;
5867
5867
  });
5868
5868
  }
5869
5869
  return() {
@@ -5873,7 +5873,7 @@ const lu = class lu {
5873
5873
  return this;
5874
5874
  }
5875
5875
  };
5876
- De = new WeakMap(), St = new WeakMap(), rs = new WeakMap(), Qe = new WeakMap(), va = new WeakMap(), cc = new WeakMap(), Ta = new WeakSet(), Eh = function(e, t) {
5876
+ De = new WeakMap(), St = new WeakMap(), rs = new WeakMap(), Xe = new WeakMap(), va = new WeakMap(), cc = new WeakMap(), Ta = new WeakSet(), Eh = function(e, t) {
5877
5877
  const i = /* @__PURE__ */ new Set();
5878
5878
  for (let n = e; n <= t; n++)
5879
5879
  i == null || i.add(n);
@@ -5896,7 +5896,7 @@ const mu = class mu {
5896
5896
  d(this, ka, (e, t) => f(this, null, function* () {
5897
5897
  var g = [];
5898
5898
  try {
5899
- const i = Ge(g, yield a(this, rt).lock());
5899
+ const i = je(g, yield a(this, rt).lock());
5900
5900
  const n = { subscribeId: i.value.subscribeId() };
5901
5901
  if (!i.value.needsRenewal()) {
5902
5902
  a(this, vt).debug("Subscription does not need renewal", n);
@@ -5932,7 +5932,7 @@ const mu = class mu {
5932
5932
  } catch (w) {
5933
5933
  var b = w, v = !0;
5934
5934
  } finally {
5935
- je(g, b, v);
5935
+ We(g, b, v);
5936
5936
  }
5937
5937
  }));
5938
5938
  m(this, rt, new Lm(e)), m(this, as, e), m(this, vt, ge.get().createContext(`Renewable '${e.name()}'`));
@@ -5956,13 +5956,13 @@ const mu = class mu {
5956
5956
  return f(this, null, function* () {
5957
5957
  var n = [];
5958
5958
  try {
5959
- const i = Ge(n, yield a(this, rt).lock());
5959
+ const i = je(n, yield a(this, rt).lock());
5960
5960
  a(this, zt).close();
5961
5961
  return i.value.update(e, t);
5962
5962
  } catch (o) {
5963
5963
  var c = o, h = !0;
5964
5964
  } finally {
5965
- je(n, c, h);
5965
+ We(n, c, h);
5966
5966
  }
5967
5967
  });
5968
5968
  }
@@ -5970,13 +5970,13 @@ const mu = class mu {
5970
5970
  return f(this, null, function* () {
5971
5971
  var i = [];
5972
5972
  try {
5973
- const t = Ge(i, yield a(this, rt).lock());
5973
+ const t = je(i, yield a(this, rt).lock());
5974
5974
  a(this, zt).close();
5975
5975
  return t.value.endOfTrack(e);
5976
5976
  } catch (n) {
5977
5977
  var o = n, c = !0;
5978
5978
  } finally {
5979
- je(i, o, c);
5979
+ We(i, o, c);
5980
5980
  }
5981
5981
  });
5982
5982
  }
@@ -5984,13 +5984,13 @@ const mu = class mu {
5984
5984
  return f(this, null, function* () {
5985
5985
  var t = [];
5986
5986
  try {
5987
- const e = Ge(t, yield a(this, rt).lock());
5987
+ const e = je(t, yield a(this, rt).lock());
5988
5988
  a(this, zt).close();
5989
5989
  return e.value.unsubscribe();
5990
5990
  } catch (i) {
5991
5991
  var n = i, o = !0;
5992
5992
  } finally {
5993
- je(t, n, o);
5993
+ We(t, n, o);
5994
5994
  }
5995
5995
  });
5996
5996
  }
@@ -5998,13 +5998,13 @@ const mu = class mu {
5998
5998
  return f(this, null, function* () {
5999
5999
  var t = [];
6000
6000
  try {
6001
- const e = Ge(t, yield a(this, rt).lock());
6001
+ const e = je(t, yield a(this, rt).lock());
6002
6002
  a(this, zt).close();
6003
6003
  return e.value.return();
6004
6004
  } catch (i) {
6005
6005
  var n = i, o = !0;
6006
6006
  } finally {
6007
- je(t, n, o);
6007
+ We(t, n, o);
6008
6008
  }
6009
6009
  });
6010
6010
  }
@@ -6031,12 +6031,12 @@ const mu = class mu {
6031
6031
  var e = l.value;
6032
6032
  var t = [];
6033
6033
  try {
6034
- const g = Ge(t, e, !0);
6034
+ const g = je(t, e, !0);
6035
6035
  yield* Xc(g);
6036
6036
  } catch (i) {
6037
6037
  var n = i, o = !0;
6038
6038
  } finally {
6039
- var c = je(t, n, o);
6039
+ var c = We(t, n, o);
6040
6040
  c && (yield new q(c));
6041
6041
  }
6042
6042
  }
@@ -6288,7 +6288,7 @@ Ma = new WeakMap(), Tt = new WeakMap(), xa = new WeakMap(), La = new WeakMap(),
6288
6288
  return f(this, null, function* () {
6289
6289
  var o = [];
6290
6290
  try {
6291
- const i = Ge(o, yield e.subscribe(t), !0);
6291
+ const i = je(o, yield e.subscribe(t), !0);
6292
6292
  const n = yield i.objects().next();
6293
6293
  if (n.done)
6294
6294
  throw new Error("No init object");
@@ -6297,7 +6297,7 @@ Ma = new WeakMap(), Tt = new WeakMap(), xa = new WeakMap(), La = new WeakMap(),
6297
6297
  } catch (c) {
6298
6298
  var h = c, u = !0;
6299
6299
  } finally {
6300
- var l = je(o, h, u);
6300
+ var l = We(o, h, u);
6301
6301
  l && (yield l);
6302
6302
  }
6303
6303
  });
@@ -6363,7 +6363,7 @@ lc = new WeakMap(), fi = new WeakMap(), os = new WeakMap(), Da = new WeakMap(),
6363
6363
  var h = k.value;
6364
6364
  var u = [];
6365
6365
  try {
6366
- const P = Ge(u, h, !0);
6366
+ const P = je(u, h, !0);
6367
6367
  try {
6368
6368
  for (var i = $(P), n, o, c; n = !(o = yield i.next()).done; n = !1) {
6369
6369
  const E = o.value;
@@ -6372,7 +6372,7 @@ lc = new WeakMap(), fi = new WeakMap(), os = new WeakMap(), Da = new WeakMap(),
6372
6372
  const U = bA(E.payload);
6373
6373
  a(this, fi).update((B) => {
6374
6374
  var X, Q;
6375
- for (B.push(...U), B.sort((Fe, ie) => Fe.wallclock - ie.wallclock); B[0] && ((Q = (X = B[B.length - 1]) == null ? void 0 : X.wallclock) != null ? Q : 0) - B[0].wallclock > wA; )
6375
+ for (B.push(...U), B.sort((_e, ie) => _e.wallclock - ie.wallclock); B[0] && ((Q = (X = B[B.length - 1]) == null ? void 0 : X.wallclock) != null ? Q : 0) - B[0].wallclock > wA; )
6376
6376
  B.shift();
6377
6377
  return B;
6378
6378
  }), t === a(this, os).resolved && E.groupId > M(0) && E.objectId == M(0) && A(this, Is, Nl).call(this, E.groupId).catch((B) => {
@@ -6392,7 +6392,7 @@ lc = new WeakMap(), fi = new WeakMap(), os = new WeakMap(), Da = new WeakMap(),
6392
6392
  } catch (l) {
6393
6393
  var p = l, g = !0;
6394
6394
  } finally {
6395
- var w = je(u, p, g);
6395
+ var w = We(u, p, g);
6396
6396
  w && (yield w);
6397
6397
  }
6398
6398
  }
@@ -6665,7 +6665,7 @@ class cu {
6665
6665
  return f(this, null, function* () {
6666
6666
  var u = [];
6667
6667
  try {
6668
- const n = Ge(u, yield e.subscribeTrack(new Xt().name("drm").build()), !0);
6668
+ const n = je(u, yield e.subscribeTrack(new Xt().name("drm").build()), !0);
6669
6669
  const o = n.objects();
6670
6670
  const c = yield o.next();
6671
6671
  if (c.done)
@@ -6675,7 +6675,7 @@ class cu {
6675
6675
  } catch (l) {
6676
6676
  var p = l, g = !0;
6677
6677
  } finally {
6678
- var w = je(u, p, g);
6678
+ var w = We(u, p, g);
6679
6679
  w && (yield w);
6680
6680
  }
6681
6681
  });
@@ -7016,13 +7016,13 @@ function ih(s, e, t) {
7016
7016
  return i.searchParams.set("sessionId", e.sessionId), i.searchParams.set("clientId", e.clientId), i.searchParams.set("channelId", e.channelId), t && i.searchParams.set("authToken", t), i;
7017
7017
  }
7018
7018
  const BA = 1e4;
7019
- var me, ve, Xe, ms, K, wi, za, Vn, Ha, Gn, Ce, Wl, jn, Qa, Wn, zl, Hl, Ql, Xl, Fh;
7019
+ var me, ve, Oe, ms, K, wi, za, Vn, Ha, Gn, Ce, Wl, jn, Qa, Wn, zl, Hl, Ql, Xl, Fh;
7020
7020
  const wu = class wu {
7021
7021
  constructor(e, t, i, n, o, c, h) {
7022
7022
  d(this, Ce);
7023
7023
  d(this, me);
7024
7024
  d(this, ve);
7025
- d(this, Xe);
7025
+ d(this, Oe);
7026
7026
  d(this, ms, "disconnected");
7027
7027
  d(this, K);
7028
7028
  d(this, wi, /* @__PURE__ */ new Map());
@@ -7056,21 +7056,21 @@ const wu = class wu {
7056
7056
  }
7057
7057
  break;
7058
7058
  case "telemetry":
7059
- vd(new URL("/api/telemetry", a(this, Xe).url().replace("wss://", "https://")), {
7059
+ vd(new URL("/api/telemetry", a(this, Oe).url().replace("wss://", "https://")), {
7060
7060
  body: e.body,
7061
7061
  headers: { "Content-Type": "text/plain" }
7062
7062
  }).catch(D);
7063
7063
  break;
7064
7064
  case "refresh auth":
7065
- a(this, Xe).updateAuthToken(e.token);
7065
+ a(this, Oe).updateAuthToken(e.token);
7066
7066
  break;
7067
7067
  }
7068
7068
  });
7069
7069
  d(this, Wn, !1);
7070
7070
  r(this, "disconnect", (e = "Disconnect Requested") => {
7071
- a(this, ve).info("Disconnecting", e), a(this, Xe).close(), a(this, K).close().catch(D), m(this, Gn, /* @__PURE__ */ new Map()), m(this, ms, "disconnected");
7071
+ a(this, ve).info("Disconnecting", e), a(this, Oe).close(), a(this, K).close().catch(D), m(this, Gn, /* @__PURE__ */ new Map()), m(this, ms, "disconnected");
7072
7072
  });
7073
- m(this, me, e), m(this, ve, t), m(this, Xe, i), m(this, K, n), m(this, wi, o), m(this, za, c), m(this, Vn, h), a(this, me).on("send signal", a(this, Qa)), a(this, me).on("disconnect", this.disconnect), a(this, me).on("text track", a(this, jn)), A(this, Ce, Wl).call(this).catch(D), A(this, Ce, Ql).call(this).catch(D);
7073
+ m(this, me, e), m(this, ve, t), m(this, Oe, i), m(this, K, n), m(this, wi, o), m(this, za, c), m(this, Vn, h), a(this, me).on("send signal", a(this, Qa)), a(this, me).on("disconnect", this.disconnect), a(this, me).on("text track", a(this, jn)), A(this, Ce, Wl).call(this).catch(D), A(this, Ce, Ql).call(this).catch(D);
7074
7074
  }
7075
7075
  get estimatedBandwidth() {
7076
7076
  return a(this, Ha);
@@ -7083,9 +7083,10 @@ const wu = class wu {
7083
7083
  unsuspend() {
7084
7084
  }
7085
7085
  getStatistics() {
7086
+ const t = a(this, Oe).transportType() === "webtransport" ? "moq" : "moq_ws";
7086
7087
  return {
7087
- edgeUrl: a(this, Xe).url(),
7088
- connectionProtocol: "moq"
7088
+ edgeUrl: a(this, Oe).url(),
7089
+ connectionProtocol: t
7089
7090
  };
7090
7091
  }
7091
7092
  static start(e, t, i, n, o) {
@@ -7143,15 +7144,15 @@ const wu = class wu {
7143
7144
  return a(this, ms);
7144
7145
  }
7145
7146
  close() {
7146
- a(this, Xe).close();
7147
+ a(this, Oe).close();
7147
7148
  }
7148
7149
  closed() {
7149
- return Promise.race([a(this, Xe).closed(), a(this, K).closed()]);
7150
+ return Promise.race([a(this, Oe).closed(), a(this, K).closed()]);
7150
7151
  }
7151
7152
  };
7152
- me = new WeakMap(), ve = new WeakMap(), Xe = new WeakMap(), ms = new WeakMap(), K = new WeakMap(), wi = new WeakMap(), za = new WeakMap(), Vn = new WeakMap(), Ha = new WeakMap(), Gn = new WeakMap(), Ce = new WeakSet(), Wl = function() {
7153
+ me = new WeakMap(), ve = new WeakMap(), Oe = new WeakMap(), ms = new WeakMap(), K = new WeakMap(), wi = new WeakMap(), za = new WeakMap(), Vn = new WeakMap(), Ha = new WeakMap(), Gn = new WeakMap(), Ce = new WeakSet(), Wl = function() {
7153
7154
  return f(this, null, function* () {
7154
- a(this, Xe).transportType() === "websocket" && (yield ki(5e3));
7155
+ a(this, Oe).transportType() === "websocket" && (yield ki(5e3));
7155
7156
  try {
7156
7157
  for (var e = $(a(this, K).stats()), t, i, n; t = !(i = yield e.next()).done; t = !1) {
7157
7158
  const { rtt: o, estimatedBandwidth: c } = i.value;
@@ -7222,7 +7223,7 @@ me = new WeakMap(), ve = new WeakMap(), Xe = new WeakMap(), ms = new WeakMap(),
7222
7223
  A(this, Ce, Fh).call(this, a(this, K).referenceClock(), a(this, K).audio),
7223
7224
  A(this, Ce, Fh).call(this, a(this, K).referenceClock(), a(this, K).video),
7224
7225
  A(this, Ce, Xl).call(this, a(this, K).subtitles)
7225
- ]), yield a(this, K).closed(), a(this, Xe).close(), a(this, ve).info("Session closed");
7226
+ ]), yield a(this, K).closed(), a(this, Oe).close(), a(this, ve).info("Session closed");
7226
7227
  } catch (e) {
7227
7228
  a(this, ve).warn("Session error", e);
7228
7229
  }
@@ -7256,7 +7257,7 @@ me = new WeakMap(), ve = new WeakMap(), Xe = new WeakMap(), ms = new WeakMap(),
7256
7257
  const P = Bi(I.track.namespace), E = I.track.trackObject.language, U = mm((h = I.track.trackObject.codec) != null ? h : ""), B = I.track.trackObject.codec, X = U ? ei({ codec: U, codecString: B }) : void 0, Q = !!I.track.trackObject["com.vindral.drm"];
7257
7258
  try {
7258
7259
  for (var u = $(I), l, p, g; l = !(p = yield u.next()).done; l = !1) {
7259
- const [Fe, ie] = p.value;
7260
+ const [_e, ie] = p.value;
7260
7261
  const ut = {
7261
7262
  channelId: i !== "" && (c || ie.mediaType() === "video") && i !== P ? P : void 0,
7262
7263
  language: ie.mediaType() === "audio" && n !== E ? E : void 0,
@@ -7271,7 +7272,7 @@ me = new WeakMap(), ve = new WeakMap(), Xe = new WeakMap(), ms = new WeakMap(),
7271
7272
  mediaType: ie.mediaType(),
7272
7273
  referenceClock: e,
7273
7274
  delta: T,
7274
- groupId: Fe,
7275
+ groupId: _e,
7275
7276
  timestamp: ie.baseMediaDecodeTime() / ie.timescale() * 1e3 + T,
7276
7277
  wallclockTime: Re.getTime()
7277
7278
  }), a(this, me).emit("received signal", {
@@ -7286,7 +7287,7 @@ me = new WeakMap(), ve = new WeakMap(), Xe = new WeakMap(), ms = new WeakMap(),
7286
7287
  a(this, me).emit("received moq data", {
7287
7288
  payload: ie,
7288
7289
  channelId: P,
7289
- groupId: Fe,
7290
+ groupId: _e,
7290
7291
  mimeType: X,
7291
7292
  codec: U,
7292
7293
  switchInfo: ut,
@@ -7829,7 +7830,7 @@ Et = new WeakMap(), kt = new WeakMap(), Qn = new WeakMap(), ps = new WeakMap(),
7829
7830
  var t;
7830
7831
  const e = new FA({ edgeUrl: this.config.options.get("edgeUrl") });
7831
7832
  for (m(this, ps, 0); ; ) {
7832
- Ve(this, ps)._++, Ve(this, yi)._++;
7833
+ Ge(this, ps)._++, Ge(this, yi)._++;
7833
7834
  try {
7834
7835
  const [n, o] = yield Promise.all([a(this, wc).call(this), a(this, bc).call(this)]), c = o / 2;
7835
7836
  if (a(this, Et).clear(), a(this, Et).push(c), !a(this, kt))
@@ -7854,7 +7855,7 @@ Et = new WeakMap(), kt = new WeakMap(), Qn = new WeakMap(), ps = new WeakMap(),
7854
7855
  edgeUrl: h
7855
7856
  }),
7856
7857
  a(this, Et)
7857
- )), e.reset(), Ve(this, gs)._++, m(this, ps, 0), m(this, qn, Date.now()), a(this, Xn) || m(this, Xn, a(this, qn)), yield this.connectionImpl.closed();
7858
+ )), e.reset(), Ge(this, gs)._++, m(this, ps, 0), m(this, qn, Date.now()), a(this, Xn) || m(this, Xn, a(this, qn)), yield this.connectionImpl.closed();
7858
7859
  } catch (n) {
7859
7860
  this.logger.info("Failed to connect", n);
7860
7861
  const o = e.shiftedEdge();
@@ -8091,7 +8092,7 @@ class hu {
8091
8092
  for (const h of i)
8092
8093
  switch (h.type) {
8093
8094
  case "audio": {
8094
- const { OpusDecoderContext: u } = yield import("./BsNAFBQN.js");
8095
+ const { OpusDecoderContext: u } = yield import("./DGIrbwIC.js");
8095
8096
  c.set(h.type, {
8096
8097
  buffer: [],
8097
8098
  decoderContext: yield u.create(48e3, 2),
@@ -8102,7 +8103,7 @@ class hu {
8102
8103
  break;
8103
8104
  }
8104
8105
  case "video": {
8105
- const { H264DecoderWorkerContext: u } = yield import("./CP-Li-sh.js");
8106
+ const { H264DecoderWorkerContext: u } = yield import("./DURPNnoK.js");
8106
8107
  c.set(h.type, {
8107
8108
  buffer: [],
8108
8109
  decoderContext: yield u.create(o),
@@ -11055,7 +11056,7 @@ const ad = (s, e) => s && typeof s == "object" && e in s, mw = (s) => !(typeof s
11055
11056
  throw new Error("missing channelId");
11056
11057
  return !0;
11057
11058
  };
11058
- var ws, Oe, bs;
11059
+ var ws, Fe, bs;
11059
11060
  const Pt = class Pt extends Ei {
11060
11061
  constructor(t) {
11061
11062
  super();
@@ -11084,7 +11085,7 @@ const Pt = class Pt extends Ei {
11084
11085
  r(this, "userAgentInformation", new lw());
11085
11086
  r(this, "encryptedMediaExtensions");
11086
11087
  d(this, ws, 0);
11087
- d(this, Oe, []);
11088
+ d(this, Fe, []);
11088
11089
  r(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map());
11089
11090
  r(this, "sizes", /* @__PURE__ */ new Map());
11090
11091
  r(this, "isSuspended", !0);
@@ -11197,30 +11198,30 @@ const Pt = class Pt extends Ei {
11197
11198
  r(this, "updateTextTracks", (t) => {
11198
11199
  const i = t.filter((n) => n.codec === "webvtt");
11199
11200
  i.forEach((n) => {
11200
- if (!a(this, Oe).find((c) => c.language === n.language)) {
11201
+ if (!a(this, Fe).find((c) => c.language === n.language)) {
11201
11202
  if (this.modules.canvasModule) {
11202
11203
  const c = this.modules.canvasModule.textTracks.addTextTrack(
11203
11204
  n.kind,
11204
11205
  n.label || n.language || "",
11205
11206
  n.language || ""
11206
11207
  );
11207
- a(this, Oe).push(c);
11208
+ a(this, Fe).push(c);
11208
11209
  } else if (this.mediaElement instanceof HTMLVideoElement) {
11209
11210
  const c = this.mediaElement.addTextTrack(
11210
11211
  n.kind,
11211
11212
  n.label || n.language,
11212
11213
  n.language
11213
11214
  );
11214
- a(this, Oe).push(c);
11215
+ a(this, Fe).push(c);
11215
11216
  }
11216
11217
  }
11217
11218
  });
11218
- for (const n of a(this, Oe))
11219
+ for (const n of a(this, Fe))
11219
11220
  i.find((c) => c.language === n.language) ? n.mode === "disabled" && (n.mode = "hidden") : n.mode = "disabled";
11220
11221
  this.emit("text tracks", this.textTracks);
11221
11222
  });
11222
11223
  r(this, "cleanupTextTracks", (t = this.currentTime - 2e4) => {
11223
- a(this, Oe).forEach((i) => {
11224
+ a(this, Fe).forEach((i) => {
11224
11225
  if (i.cues)
11225
11226
  for (const n of i.cues)
11226
11227
  n.endTime * 1e3 < t - 2e3 && i.removeCue(n);
@@ -11412,7 +11413,7 @@ const Pt = class Pt extends Ei {
11412
11413
  const t = this.modules.canvasModule ? this.options.get("iosMediaElementEnabled") : void 0;
11413
11414
  return S({
11414
11415
  uptime: Date.now() - this.createdAt,
11415
- version: "4.1.7-2-g5b3cced4",
11416
+ version: "4.1.7-3-g006eed9c",
11416
11417
  clientId: this.clientId,
11417
11418
  sessionId: this.sessionId,
11418
11419
  channelId: this.channelId,
@@ -11547,11 +11548,11 @@ const Pt = class Pt extends Ei {
11547
11548
  this.playbackSource,
11548
11549
  w,
11549
11550
  this.willUseMediaSource() && !U
11550
- ), X = uu.create(this.logger.createContext("JitterModule")), Q = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), Fe = new URL("/telemetry", Q).toString(), ie = Wo.create(
11551
+ ), X = uu.create(this.logger.createContext("JitterModule")), Q = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), _e = new URL("/telemetry", Q).toString(), ie = Wo.create(
11551
11552
  this.logger.createContext("TelemetryModule"),
11552
11553
  this.emitter,
11553
11554
  {
11554
- url: Fe,
11555
+ url: _e,
11555
11556
  enabled: this.options.get("telemetryEnabled"),
11556
11557
  includeStats: !1,
11557
11558
  interval: 5e3
@@ -11641,14 +11642,14 @@ const Pt = class Pt extends Ei {
11641
11642
  this
11642
11643
  ), this.modules.telemetry.load());
11643
11644
  }), this.emitter.on("adapt level", (y) => {
11644
- var Me, J, ce, _e, Ne;
11645
+ var Me, J, ce, Ne, Ve;
11645
11646
  this.logger.debug("adapt level", { direction: y });
11646
11647
  const T = this.modules.renditions.getRenditionLevels(), F = this.modules.renditions.getRenditionLevel(), G = T.findIndex((se) => se === F), L = T.length - 1;
11647
11648
  let N = G;
11648
11649
  switch (y) {
11649
11650
  case "upgrade":
11650
11651
  {
11651
- const se = Math.min(G + 1, L), dt = T[se], nm = (Me = this.modules.connection.estimatedBandwidth) != null ? Me : Ti(), rm = ((ce = (J = dt == null ? void 0 : dt.audio) == null ? void 0 : J.bitRate) != null ? ce : 0) + ((Ne = (_e = dt == null ? void 0 : dt.video) == null ? void 0 : _e.bitRate) != null ? Ne : 0), am = nm * 2 > rm;
11652
+ const se = Math.min(G + 1, L), dt = T[se], nm = (Me = this.modules.connection.estimatedBandwidth) != null ? Me : Ti(), rm = ((ce = (J = dt == null ? void 0 : dt.audio) == null ? void 0 : J.bitRate) != null ? ce : 0) + ((Ve = (Ne = dt == null ? void 0 : dt.video) == null ? void 0 : Ne.bitRate) != null ? Ve : 0), am = nm * 2 > rm;
11652
11653
  dt && am && this.modules.adaptivity.isQoSOk(dt) && (N = se);
11653
11654
  }
11654
11655
  break;
@@ -11675,7 +11676,7 @@ const Pt = class Pt extends Ei {
11675
11676
  audio: S(S({}, this.targetSubscription.audio), Z == null ? void 0 : Z.audio)
11676
11677
  })), this.emitter.emit("adapted level");
11677
11678
  }), this.emitter.on("text track data", (y) => {
11678
- const T = a(this, Oe).find((N) => N.language === y.language), G = this.modules.sync.getTimeshiftOffset() / 1e3, L = G - a(this, ws);
11679
+ const T = a(this, Fe).find((N) => N.language === y.language), G = this.modules.sync.getTimeshiftOffset() / 1e3, L = G - a(this, ws);
11679
11680
  if (m(this, ws, G), T) {
11680
11681
  if (T.cues)
11681
11682
  for (const N of T.cues)
@@ -11761,26 +11762,26 @@ const Pt = class Pt extends Ei {
11761
11762
  type: "metadata"
11762
11763
  });
11763
11764
  }), this.modules.decoder) {
11764
- const J = (N = L.header().init().moov.traks[0]) == null ? void 0 : N.mdia.minf.stbl.stsd, ce = (Z = J == null ? void 0 : J.avc1) == null ? void 0 : Z.avcC.bytes, _e = (Me = J == null ? void 0 : J.codec) != null ? Me : "h264";
11765
+ const J = (N = L.header().init().moov.traks[0]) == null ? void 0 : N.mdia.minf.stbl.stsd, ce = (Z = J == null ? void 0 : J.avc1) == null ? void 0 : Z.avcC.bytes, Ne = (Me = J == null ? void 0 : J.codec) != null ? Me : "h264";
11765
11766
  if (ce) {
11766
- const Ne = ce.buffer.slice(ce.byteOffset, ce.byteOffset + ce.byteLength);
11767
+ const Ve = ce.buffer.slice(ce.byteOffset, ce.byteOffset + ce.byteLength);
11767
11768
  if (T === "text")
11768
11769
  throw new Error("Subtitles are not supported");
11769
11770
  this.emitter.emit("init segment", {
11770
11771
  initSegment: {
11771
11772
  channelId: F,
11772
11773
  renditionId: G,
11773
- data: Ne,
11774
+ data: Ve,
11774
11775
  timescale: 1e3,
11775
11776
  type: T,
11776
- codec: _e
11777
+ codec: Ne
11777
11778
  },
11778
11779
  mimeType: T
11779
11780
  // mediaType !== mimeType - but the sw decoder doesn't care
11780
11781
  });
11781
11782
  }
11782
- for (let Ne = 0; Ne < L.samplesCount(); Ne++) {
11783
- const se = L.sample(Ne);
11783
+ for (let Ve = 0; Ve < L.samplesCount(); Ve++) {
11784
+ const se = L.sample(Ve);
11784
11785
  se && this.emitter.emit("coded sample", O(S({}, se), {
11785
11786
  renditionId: G,
11786
11787
  channelId: F,
@@ -11802,14 +11803,14 @@ const Pt = class Pt extends Ei {
11802
11803
  if (y.renditionId !== 0) {
11803
11804
  const Z = Am(L);
11804
11805
  if (Z && Z.language !== void 0) {
11805
- const J = new Jd().parse(Z.content || ""), ce = N / 1e3, _e = a(this, Oe).find((se) => se.language === Z.language), Ne = ce - a(this, ws);
11806
- if (m(this, ws, ce), _e) {
11807
- if (_e.cues)
11808
- for (const se of _e.cues)
11809
- se.startTime -= Ne, se.endTime -= Ne;
11806
+ const J = new Jd().parse(Z.content || ""), ce = N / 1e3, Ne = a(this, Fe).find((se) => se.language === Z.language), Ve = ce - a(this, ws);
11807
+ if (m(this, ws, ce), Ne) {
11808
+ if (Ne.cues)
11809
+ for (const se of Ne.cues)
11810
+ se.startTime -= Ve, se.endTime -= Ve;
11810
11811
  for (const se of J) {
11811
11812
  const dt = new VTTCue(se.startTime - ce, se.endTime - ce, se.text);
11812
- _e.addCue(dt);
11813
+ Ne.addCue(dt);
11813
11814
  }
11814
11815
  }
11815
11816
  }
@@ -12062,7 +12063,7 @@ const Pt = class Pt extends Ei {
12062
12063
  * Set the active text track
12063
12064
  */
12064
12065
  set textTrack(t) {
12065
- a(this, Oe).forEach((i) => {
12066
+ a(this, Fe).forEach((i) => {
12066
12067
  i.label === t ? i.mode = "showing" : i.mode = "hidden";
12067
12068
  }), this.emitter.emit("text track", t);
12068
12069
  }
@@ -12070,14 +12071,14 @@ const Pt = class Pt extends Ei {
12070
12071
  * Get the available text tracks
12071
12072
  */
12072
12073
  get textTracks() {
12073
- return a(this, Oe).filter((t) => t.mode !== "disabled").map((t) => t.label);
12074
+ return a(this, Fe).filter((t) => t.mode !== "disabled").map((t) => t.label);
12074
12075
  }
12075
12076
  /**
12076
12077
  * Get the active text track
12077
12078
  */
12078
12079
  get textTrack() {
12079
12080
  var t;
12080
- return (t = a(this, Oe).find((i) => i.mode === "showing")) == null ? void 0 : t.label;
12081
+ return (t = a(this, Fe).find((i) => i.mode === "showing")) == null ? void 0 : t.label;
12081
12082
  }
12082
12083
  /**
12083
12084
  * The current channelId
@@ -12278,7 +12279,7 @@ const Pt = class Pt extends Ei {
12278
12279
  return this.browser.supportsMediaSource && this.options.get("mseEnabled");
12279
12280
  }
12280
12281
  };
12281
- ws = new WeakMap(), Oe = new WeakMap(), bs = new WeakMap(), r(Pt, "MAX_POOL_SIZE", 10), r(Pt, "DISCONNECT_TIMEOUT", 15 * 1e3), r(Pt, "REMOVE_CUE_THRESHOLD", 1e3 * 10);
12282
+ ws = new WeakMap(), Fe = new WeakMap(), bs = new WeakMap(), r(Pt, "MAX_POOL_SIZE", 10), r(Pt, "DISCONNECT_TIMEOUT", 15 * 1e3), r(Pt, "REMOVE_CUE_THRESHOLD", 1e3 * 10);
12282
12283
  let od = Pt;
12283
12284
  export {
12284
12285
  $m as A,