@vindral/web-sdk 4.2.0-5-g7d2f2421 → 4.2.0-6-g76abf9e5

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/legacy.es.js CHANGED
@@ -36,7 +36,7 @@ var qt = (i) => {
36
36
  } }, e));
37
37
  E ? l && E < 4 && yr(n, (E > 2 ? "set " : E > 1 ? "get " : "") + e) : yr(g, e);
38
38
  for (var F = t.length - 1; F >= 0; F--)
39
- r = tc(E, e, B = {}, i[3], k), E && (r.static = d, r.private = l, Q = r.access = { has: l ? (G) => ic(g, G) : (G) => e in G }, E ^ 3 && (Q.get = l ? (G) => (E ^ 1 ? I : u)(G, g, E ^ 4 ? n : S.get) : (G) => G[e]), E > 2 && (Q.set = l ? (G, J) => c(G, g, J, E ^ 4 ? n : S.set) : (G, J) => G[e] = J)), a = (0, t[F])(E ? E < 4 ? l ? n : S[D] : E > 4 ? void 0 : { get: S.get, set: S.set } : g, r), B._ = 1, E ^ 4 || a === void 0 ? Eg(a) && (E > 4 ? p.unshift(a) : E ? l ? n = a : S[D] = a : g = a) : typeof a != "object" || a === null ? Ye("Object expected") : (Eg(o = a.get) && (S.get = o), Eg(o = a.set) && (S.set = o), Eg(o = a.init) && p.unshift(o));
39
+ r = tc(E, e, B = {}, i[3], k), E && (r.static = d, r.private = l, Q = r.access = { has: l ? (G) => ic(g, G) : (G) => e in G }, E ^ 3 && (Q.get = l ? (G) => (E ^ 1 ? I : u)(G, g, E ^ 4 ? n : S.get) : (G) => G[e]), E > 2 && (Q.set = l ? (G, M) => c(G, g, M, E ^ 4 ? n : S.set) : (G, M) => G[e] = M)), a = (0, t[F])(E ? E < 4 ? l ? n : S[D] : E > 4 ? void 0 : { get: S.get, set: S.set } : g, r), B._ = 1, E ^ 4 || a === void 0 ? Eg(a) && (E > 4 ? p.unshift(a) : E ? l ? n = a : S[D] = a : g = a) : typeof a != "object" || a === null ? Ye("Object expected") : (Eg(o = a.get) && (S.get = o), Eg(o = a.set) && (S.set = o), Eg(o = a.init) && p.unshift(o));
40
40
  return E || ot(i, g), S && ya(g, e, S), l ? E ^ 4 ? n : S : g;
41
41
  }, s = (i, A, e) => Dn(i, typeof A != "symbol" ? A + "" : A, e), Fa = (i, A, e) => A.has(i) || Ye("Cannot " + e), ic = (i, A) => Object(A) !== A ? Ye('Cannot use the "in" operator on this value') : i.has(A), I = (i, A, e) => (Fa(i, A, "read from private field"), e ? e.call(i) : A.get(i)), C = (i, A, e) => A.has(i) ? Ye("Cannot add the same private member more than once") : A instanceof WeakSet ? A.add(i) : A.set(i, e), c = (i, A, e, t) => (Fa(i, A, "write to private field"), t ? t.call(i, e) : A.set(i, e), e), u = (i, A, e) => (Fa(i, A, "access private method"), e);
42
42
  var PA = (i, A, e, t) => ({
@@ -187,7 +187,7 @@ class br {
187
187
  return this._borrowedBuffers;
188
188
  }
189
189
  }
190
- const v = () => {
190
+ const J = () => {
191
191
  };
192
192
  class j {
193
193
  constructor() {
@@ -217,7 +217,7 @@ class j {
217
217
  }, this.reject = (t) => {
218
218
  this.pending = !1, e(t);
219
219
  };
220
- }), this.promise.catch(v);
220
+ }), this.promise.catch(J);
221
221
  }
222
222
  static resolved(A) {
223
223
  const e = new j();
@@ -284,7 +284,7 @@ class ha {
284
284
  }
285
285
  abort(A) {
286
286
  var e, t;
287
- (e = I(this, Qe)) == null || e.promise.catch(v), (t = I(this, Qe)) == null || t.reject(A);
287
+ (e = I(this, Qe)) == null || e.promise.catch(J), (t = I(this, Qe)) == null || t.reject(A);
288
288
  }
289
289
  push(A) {
290
290
  return h(this, null, function* () {
@@ -334,7 +334,7 @@ function DA(i, A) {
334
334
  throw new Error(A);
335
335
  }
336
336
  const PC = typeof DataView.prototype.getBigUint64 == "function";
337
- function M(i) {
337
+ function v(i) {
338
338
  return PC ? BigInt(i) : typeof BigInt != "function" ? i : typeof i == "bigint" ? Number(i) : i;
339
339
  }
340
340
  var $g, Fe, Ee;
@@ -874,7 +874,7 @@ class Yc {
874
874
  const A = new j();
875
875
  A.promise.then((t) => {
876
876
  c(this, _t, t);
877
- }).catch(v);
877
+ }).catch(J);
878
878
  const e = I(this, $t).promise.then(() => A);
879
879
  return c(this, $t, A), yield e, new Tc(I(this, _t), A);
880
880
  });
@@ -1011,7 +1011,7 @@ class Pc {
1011
1011
  var A;
1012
1012
  (A = self.navigator.userAgentData) == null || A.getHighEntropyValues(["architecture", "model", "platformVersion", "fullVersionList"]).then((e) => {
1013
1013
  this.highEntropyValues = e;
1014
- }).catch(v);
1014
+ }).catch(J);
1015
1015
  }
1016
1016
  getUserAgentInformation() {
1017
1017
  var n, o, a, B, r, Q;
@@ -1112,9 +1112,9 @@ class qr extends _A {
1112
1112
  * Show the AirPlay picker.
1113
1113
  */
1114
1114
  showPlaybackTargetPicker() {
1115
- this.element.paused && (this.element.play(), this.connectingTimeout = window.setTimeout(() => {
1115
+ "webkitShowPlaybackTargetPicker" in this.element && this.castingAvailable && (this.element.paused && (this.element.play().catch(J), this.connectingTimeout = window.setTimeout(() => {
1116
1116
  this.casting || (this.element.pause(), this.element.src = "", this.element.src = this.hlsUrl);
1117
- }, 3e4)), this.element.webkitShowPlaybackTargetPicker();
1117
+ }, 3e4)), this.element.webkitShowPlaybackTargetPicker());
1118
1118
  }
1119
1119
  /**
1120
1120
  * Returns if AirPlay is supported.
@@ -2521,9 +2521,9 @@ const Hh = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025
2521
2521
  for (let p = 0; p < (o != 3 ? 8 : 12); p++)
2522
2522
  if (n.readBit()) {
2523
2523
  const S = p < 6 ? 16 : 64;
2524
- let F = 0, G = 8, J = 8;
2524
+ let F = 0, G = 8, M = 8;
2525
2525
  for (let T = 0; T < S; T++)
2526
- J != 0 && (F = n.readSignedExpGolomb(), J = (G + F + 256) % 256), G = J == 0 ? G : J;
2526
+ M != 0 && (F = n.readSignedExpGolomb(), M = (G + F + 256) % 256), G = M == 0 ? G : M;
2527
2527
  }
2528
2528
  }
2529
2529
  break;
@@ -2540,8 +2540,8 @@ const Hh = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025
2540
2540
  Q === 0 && n.readBit(), n.readBit();
2541
2541
  let E = B + 1, d = r + 1;
2542
2542
  if (d *= 2 - Q, d *= 16, E *= 16, n.readBit()) {
2543
- const D = o == 1 ? 1 : 0, k = 1 << (o == 1 || o == 2 ? 1 : 0), S = 2 - Q << D, F = n.readUnsignedExpGolomb() * k, G = n.readUnsignedExpGolomb() * k, J = n.readUnsignedExpGolomb() * S, T = n.readUnsignedExpGolomb() * S;
2544
- E -= F + G, d -= J + T;
2543
+ const D = o == 1 ? 1 : 0, k = 1 << (o == 1 || o == 2 ? 1 : 0), S = 2 - Q << D, F = n.readUnsignedExpGolomb() * k, G = n.readUnsignedExpGolomb() * k, M = n.readUnsignedExpGolomb() * S, T = n.readUnsignedExpGolomb() * S;
2544
+ E -= F + G, d -= M + T;
2545
2545
  }
2546
2546
  let l = {
2547
2547
  numerator: 1,
@@ -3429,11 +3429,11 @@ const dr = class dr {
3429
3429
  return ((A = I(this, _).moof.traf.trun) == null ? void 0 : A.samplesCount) || 0;
3430
3430
  }
3431
3431
  sample(A) {
3432
- var D, p, k, S, F, G, J, T, Y, tA, uA, YA, pA, bA, NA, nt;
3432
+ var D, p, k, S, F, G, M, T, Y, tA, uA, YA, pA, bA, NA, nt;
3433
3433
  const e = (D = I(this, VA).init().moov.traks[0]) == null ? void 0 : D.mdia.minf.stbl.stsd.codec, t = ((p = I(this, _).moof.traf.trun) == null ? void 0 : p.samplesCount) || 0, g = (k = I(this, _).moof.traf.tfdt) == null ? void 0 : k.baseMediaDecodeTime;
3434
3434
  if (A >= t || typeof g == "undefined" || !e)
3435
3435
  return;
3436
- const n = this.compositionTimeOffset(A), o = ((S = I(this, _).moof.traf.trun) == null ? void 0 : S.sampleDurations[A]) || 0, a = ((F = I(this, _).moof.traf.trun) == null ? void 0 : F.sampleDurations.slice(0, A).reduce(($A, f) => $A + f, 0)) || 0, B = g + a, r = ((G = I(this, VA).init().moov.traks[0]) == null ? void 0 : G.mdia.mdhd.timescale) || 1e3, Q = ((J = I(this, _).moof.traf.trun) == null ? void 0 : J.sampleSizes[A]) || I(this, _).mdat.data.byteLength, E = ((T = I(this, _).moof.traf.trun) == null ? void 0 : T.sampleSizes.slice(0, A).reduce(($A, f) => $A + f, 0)) || 0, d = I(this, _).mdat.data.subarray(E, E + Q), l = ((Y = I(this, _).moof.traf.trun) == null ? void 0 : Y.is_sync_sample(A)) || !1;
3436
+ const n = this.compositionTimeOffset(A), o = ((S = I(this, _).moof.traf.trun) == null ? void 0 : S.sampleDurations[A]) || 0, a = ((F = I(this, _).moof.traf.trun) == null ? void 0 : F.sampleDurations.slice(0, A).reduce(($A, f) => $A + f, 0)) || 0, B = g + a, r = ((G = I(this, VA).init().moov.traks[0]) == null ? void 0 : G.mdia.mdhd.timescale) || 1e3, Q = ((M = I(this, _).moof.traf.trun) == null ? void 0 : M.sampleSizes[A]) || I(this, _).mdat.data.byteLength, E = ((T = I(this, _).moof.traf.trun) == null ? void 0 : T.sampleSizes.slice(0, A).reduce(($A, f) => $A + f, 0)) || 0, d = I(this, _).mdat.data.subarray(E, E + Q), l = ((Y = I(this, _).moof.traf.trun) == null ? void 0 : Y.is_sync_sample(A)) || !1;
3437
3437
  if (this.mediaType() === "video") {
3438
3438
  const $A = ((tA = I(this, VA).init().moov.traks[0]) == null ? void 0 : tA.tkhd.width) || 0, f = ((uA = I(this, VA).init().moov.traks[0]) == null ? void 0 : uA.tkhd.height) || 0;
3439
3439
  return {
@@ -4000,8 +4000,8 @@ const aA = (i, A, e) => {
4000
4000
  let D = !1;
4001
4001
  t ? D = !1 : D = i.readBit() !== 0, D && (B = i.readBits(4) + 2, r = i.readBits(3) + 1);
4002
4002
  const p = i.readBit() !== 0, k = i.readBit() !== 0, S = i.readBit() !== 0;
4003
- let F = !1, G = !1, J = !1, T = !1, Y = !1, tA = !1, uA = !1, YA = tC, pA = Ja, bA = 0;
4004
- t || (F = i.readBit() !== 0, G = i.readBit() !== 0, J = i.readBit() !== 0, T = i.readBit() !== 0, Y = i.readBit() !== 0, Y && (tA = i.readBit() !== 0, uA = i.readBit() !== 0), i.readBit() !== 0 ? YA = tC : YA = i.readBit(), YA > 0 ? i.readBit() > 0 ? pA = Ja : pA = i.readBit() : pA = Ja, Y ? bA = i.readBits(3) : bA = 0);
4003
+ let F = !1, G = !1, M = !1, T = !1, Y = !1, tA = !1, uA = !1, YA = tC, pA = Ja, bA = 0;
4004
+ t || (F = i.readBit() !== 0, G = i.readBit() !== 0, M = i.readBit() !== 0, T = i.readBit() !== 0, Y = i.readBit() !== 0, Y && (tA = i.readBit() !== 0, uA = i.readBit() !== 0), i.readBit() !== 0 ? YA = tC : YA = i.readBit(), YA > 0 ? i.readBit() > 0 ? pA = Ja : pA = i.readBit() : pA = Ja, Y ? bA = i.readBits(3) : bA = 0);
4005
4005
  const NA = i.readBit() !== 0, nt = i.readBit() !== 0, $A = i.readBit() !== 0;
4006
4006
  return {
4007
4007
  seqProfile: A,
@@ -4029,7 +4029,7 @@ const aA = (i, A, e) => {
4029
4029
  enableIntraEdgeFilter: S,
4030
4030
  enableInterintraCompound: F,
4031
4031
  enableMaskedCompound: G,
4032
- enableWarpedMotion: J,
4032
+ enableWarpedMotion: M,
4033
4033
  enableDualFilter: T,
4034
4034
  enableOrderHint: Y,
4035
4035
  enableJntComp: tA,
@@ -4379,7 +4379,7 @@ class cB extends _A {
4379
4379
  });
4380
4380
  /// This method is used to try to play the media element without throwing an error if it fails.
4381
4381
  s(this, "tryPlay", () => {
4382
- this.element.muted = this._userProvidedMuted, this._play().catch(v);
4382
+ this.element.muted = this._userProvidedMuted, this._play().catch(J);
4383
4383
  });
4384
4384
  /// This method is used to play the media element and will throw an error if it fails.
4385
4385
  s(this, "play", () => {
@@ -4864,7 +4864,7 @@ class Ol {
4864
4864
  subscribeId: I(this, Es),
4865
4865
  trackAlias: I(this, QI),
4866
4866
  groupId: A,
4867
- subGroupId: M(0),
4867
+ subGroupId: v(0),
4868
4868
  objectId: e,
4869
4869
  subscriberPriority: I(this, EI),
4870
4870
  streamId: I(this, hI),
@@ -5142,23 +5142,23 @@ class go {
5142
5142
  const A = I(this, FA)[I(this, cA)], e = (A & 192) >> 6;
5143
5143
  switch (I(this, FA)[I(this, cA)] = A & 63, e) {
5144
5144
  case 0:
5145
- return M(I(this, FA)[PA(this, cA)._++]);
5145
+ return v(I(this, FA)[PA(this, cA)._++]);
5146
5146
  case 1: {
5147
5147
  yield u(this, sA, Wt).call(this, 2);
5148
5148
  const t = I(this, cA);
5149
- return c(this, cA, I(this, cA) + 2), M(zl(I(this, FA), t));
5149
+ return c(this, cA, I(this, cA) + 2), v(zl(I(this, FA), t));
5150
5150
  }
5151
5151
  case 2: {
5152
5152
  yield u(this, sA, Wt).call(this, 4);
5153
5153
  const t = I(this, cA);
5154
- return c(this, cA, I(this, cA) + 4), M(_l(I(this, FA), t));
5154
+ return c(this, cA, I(this, cA) + 4), v(_l(I(this, FA), t));
5155
5155
  }
5156
5156
  case 3: {
5157
5157
  yield u(this, sA, Wt).call(this, 8);
5158
5158
  const t = I(this, cA);
5159
5159
  c(this, cA, I(this, cA) + 8);
5160
5160
  const g = new DataView(I(this, FA).buffer, I(this, FA).byteOffset + t, 8);
5161
- return M(PC ? g.getBigUint64(0) : g.getUint32(0) * 4294967296 + g.getUint32(4));
5161
+ return v(PC ? g.getBigUint64(0) : g.getUint32(0) * 4294967296 + g.getUint32(4));
5162
5162
  }
5163
5163
  default:
5164
5164
  throw new Error("Invalid VarInt size");
@@ -5381,7 +5381,7 @@ function ar(i, A) {
5381
5381
  yield i.writeString(e);
5382
5382
  });
5383
5383
  }
5384
- const Io = M(2);
5384
+ const Io = v(2);
5385
5385
  function Cg(i) {
5386
5386
  return h(this, null, function* () {
5387
5387
  const A = yield i.readVarInt(), e = /* @__PURE__ */ new Map();
@@ -5629,7 +5629,7 @@ function cu(i, A) {
5629
5629
  const hu = {
5630
5630
  Subscriber: 2
5631
5631
  }, no = {
5632
- Role: M(0)
5632
+ Role: v(0)
5633
5633
  }, tE = {
5634
5634
  Draft07: 4278190087
5635
5635
  };
@@ -5818,7 +5818,7 @@ class Du {
5818
5818
  }
5819
5819
  }
5820
5820
  Ds = new WeakMap(), FI = new WeakMap(), kI = new WeakMap();
5821
- M(1025), M(1027), M(1033), M(2048);
5821
+ v(1025), v(1027), v(1033), v(2048);
5822
5822
  class Su extends Error {
5823
5823
  constructor(A, e) {
5824
5824
  super(A), this.errorCode = e;
@@ -5879,7 +5879,7 @@ class nC {
5879
5879
  case L.AnnounceError:
5880
5880
  return pu(I(this, hA));
5881
5881
  }
5882
- return yu(I(this, hA), M(A), e);
5882
+ return yu(I(this, hA), v(A), e);
5883
5883
  });
5884
5884
  }
5885
5885
  }
@@ -6001,14 +6001,14 @@ const is = class is {
6001
6001
  }
6002
6002
  }
6003
6003
  onUpdate(A) {
6004
- c(this, le, { startGroup: A.start.group }), A.end.group > M(0) && (I(this, le).endGroup = A.end.group - M(1));
6004
+ c(this, le, { startGroup: A.start.group }), A.end.group > v(0) && (I(this, le).endGroup = A.end.group - v(1));
6005
6005
  }
6006
6006
  onError(A) {
6007
6007
  const e = new Error(A.reason);
6008
6008
  return I(this, Fs).reject(e), I(this, mt).reject(e), e;
6009
6009
  }
6010
6010
  onDone(A) {
6011
- A.finalInfo && (I(this, le) || c(this, le, { startGroup: M(0) }), I(this, le).endGroup = A.finalInfo.group), I(this, mt).resolve(A);
6011
+ A.finalInfo && (I(this, le) || c(this, le, { startGroup: v(0) }), I(this, le).endGroup = A.finalInfo.group), I(this, mt).resolve(A);
6012
6012
  }
6013
6013
  onUnsubscribe(A) {
6014
6014
  I(this, ai).resolve(A);
@@ -6017,7 +6017,7 @@ const is = class is {
6017
6017
  const e = Math.max(0, Date.now() - I(this, Jo)), t = Number(A.expires);
6018
6018
  if (t > 0) {
6019
6019
  const g = Math.max(is.minGraceTime, Math.min(t / 10, is.maxGraceTime));
6020
- Promise.race([vt(t - g - e), this.done().catch(v)]).then(() => I(this, Bi).resolve(this.expiryState())).catch(v);
6020
+ Promise.race([vt(t - g - e), this.done().catch(J)]).then(() => I(this, Bi).resolve(this.expiryState())).catch(J);
6021
6021
  }
6022
6022
  I(this, Fs).resolve(A);
6023
6023
  }
@@ -6031,7 +6031,7 @@ const is = class is {
6031
6031
  return I(this, le);
6032
6032
  }
6033
6033
  close() {
6034
- I(this, Bi).promise.catch(v), I(this, Bi).reject(new Error("Subscription closed"));
6034
+ I(this, Bi).promise.catch(J), I(this, Bi).reject(new Error("Subscription closed"));
6035
6035
  }
6036
6036
  // Returns whether the subscription is still active - i.e. hasn't received a done or unsubscribe
6037
6037
  expiryState() {
@@ -6093,7 +6093,7 @@ class Uu {
6093
6093
  u(this, Mo, dE).call(this).catch((A) => I(this, JI).error("error writing subscription", A)),
6094
6094
  I(this, se).unsubscribed(),
6095
6095
  I(this, se).done(),
6096
- I(this, se).expiryNotification().catch(v)
6096
+ I(this, se).expiryNotification().catch(J)
6097
6097
  ]);
6098
6098
  });
6099
6099
  }
@@ -6174,7 +6174,7 @@ class bu {
6174
6174
  yield I(this, ri).write({
6175
6175
  subscribeId: I(this, Rs).subscribe.id,
6176
6176
  trackAlias: I(this, Rs).subscribe.trackAlias,
6177
- subGroupId: M(0),
6177
+ subGroupId: v(0),
6178
6178
  subscriberPriority: 0,
6179
6179
  groupId: n.groupId,
6180
6180
  objectId: n.objectId,
@@ -6196,10 +6196,10 @@ class bu {
6196
6196
  });
6197
6197
  }
6198
6198
  [qe()]() {
6199
- return I(this, ri).close().catch(v);
6199
+ return I(this, ri).close().catch(J);
6200
6200
  }
6201
6201
  [Symbol.asyncDispose]() {
6202
- return I(this, ri).close().catch(v);
6202
+ return I(this, ri).close().catch(J);
6203
6203
  }
6204
6204
  }
6205
6205
  ri = new WeakMap(), MI = new WeakMap(), Rs = new WeakMap(), vI = new WeakMap(), Gs = new WeakMap();
@@ -6220,10 +6220,10 @@ class Nu {
6220
6220
  ok(A) {
6221
6221
  return h(this, null, function* () {
6222
6222
  var B, r, Q;
6223
- const e = (B = this.state.range()) == null ? void 0 : B.startGroup, t = A.latest(), g = t == null ? void 0 : t.id, n = (Q = (r = t == null ? void 0 : t.latest()) == null ? void 0 : r.objectId) != null ? Q : M(0), o = A.consume(e != null ? e : g), a = {
6223
+ const e = (B = this.state.range()) == null ? void 0 : B.startGroup, t = A.latest(), g = t == null ? void 0 : t.id, n = (Q = (r = t == null ? void 0 : t.latest()) == null ? void 0 : r.objectId) != null ? Q : v(0), o = A.consume(e != null ? e : g), a = {
6224
6224
  type: L.SubscribeOk,
6225
6225
  id: this.state.subscribe.id,
6226
- expires: M(0),
6226
+ expires: v(0),
6227
6227
  groupOrder: "ascending",
6228
6228
  params: /* @__PURE__ */ new Map(),
6229
6229
  largestInfo: g ? { group: g, object: n } : void 0
@@ -6232,19 +6232,19 @@ class Nu {
6232
6232
  });
6233
6233
  }
6234
6234
  invalidRange() {
6235
- return u(this, wt, Xi).call(this, M(1), "Invalid range");
6235
+ return u(this, wt, Xi).call(this, v(1), "Invalid range");
6236
6236
  }
6237
6237
  retryTrackAlias() {
6238
- return u(this, wt, Xi).call(this, M(2), "Retry track alias");
6238
+ return u(this, wt, Xi).call(this, v(2), "Retry track alias");
6239
6239
  }
6240
6240
  trackDoesNotExist() {
6241
- return u(this, wt, Xi).call(this, M(3), "Track does not exist");
6241
+ return u(this, wt, Xi).call(this, v(3), "Track does not exist");
6242
6242
  }
6243
6243
  unauthorized() {
6244
- return u(this, wt, Xi).call(this, M(4), "Unauthorized");
6244
+ return u(this, wt, Xi).call(this, v(4), "Unauthorized");
6245
6245
  }
6246
6246
  timeout() {
6247
- return u(this, wt, Xi).call(this, M(5), "Timeout");
6247
+ return u(this, wt, Xi).call(this, v(5), "Timeout");
6248
6248
  }
6249
6249
  [qe()]() {
6250
6250
  return this.trackDoesNotExist();
@@ -6407,8 +6407,8 @@ class lE {
6407
6407
  const t = {
6408
6408
  type: L.SubscribeUpdate,
6409
6409
  id: I(this, fA).subscribe.id,
6410
- start: { group: A, object: M(0) },
6411
- end: { group: e + M(1), object: M(0) },
6410
+ start: { group: A, object: v(0) },
6411
+ end: { group: e + v(1), object: v(0) },
6412
6412
  params: /* @__PURE__ */ new Map(),
6413
6413
  subscriberPriority: 0
6414
6414
  };
@@ -6556,12 +6556,12 @@ class bn {
6556
6556
  // The owner session of the subscriber
6557
6557
  C(this, ze);
6558
6558
  // The next subscribe id
6559
- s(this, "nextSubscribeId", M(0));
6559
+ s(this, "nextSubscribeId", v(0));
6560
6560
  // The active subscriptions
6561
6561
  C(this, ZA, new KA(/* @__PURE__ */ new Map()));
6562
6562
  C(this, ci);
6563
6563
  C(this, hi, SA.get().createContext("Subscriber"));
6564
- c(this, ze, A), c(this, ci, e), u(this, He, Nn).call(this).catch(v);
6564
+ c(this, ze, A), c(this, ci, e), u(this, He, Nn).call(this).catch(J);
6565
6565
  }
6566
6566
  subscribe(g, n) {
6567
6567
  return h(this, arguments, function* (A, e, t = /* @__PURE__ */ new Map()) {
@@ -6674,7 +6674,7 @@ class Br {
6674
6674
  s(this, "publisher");
6675
6675
  C(this, Hs);
6676
6676
  const [t, g] = ir(100);
6677
- c(this, ue, A), c(this, di, g), this.subscriber = new bn(this, t), this.publisher = new DB(this, A, t), c(this, KI, u(this, lA, mE).call(this)), c(this, Hs, new KA(e)), this.closed().then(() => this.close()).catch(v);
6677
+ c(this, ue, A), c(this, di, g), this.subscriber = new bn(this, t), this.publisher = new DB(this, A, t), c(this, KI, u(this, lA, mE).call(this)), c(this, Hs, new KA(e)), this.closed().then(() => this.close()).catch(J);
6678
6678
  }
6679
6679
  updateAuthToken(A) {
6680
6680
  I(this, Hs).update(A);
@@ -6866,11 +6866,11 @@ class qu {
6866
6866
  if (t)
6867
6867
  return;
6868
6868
  const [g, n, o] = e;
6869
- if (I(this, $e).has(M(n))) {
6870
- const a = I(this, $e).get(M(n));
6869
+ if (I(this, $e).has(v(n))) {
6870
+ const a = I(this, $e).get(v(n));
6871
6871
  if (!a)
6872
6872
  throw new Error("Stream not found");
6873
- o.length > 0 && (yield a.push(o)), g || (I(this, mi).debug("Closing stream", { streamId: n }), a.close(), I(this, $e).delete(M(n)));
6873
+ o.length > 0 && (yield a.push(o)), g || (I(this, mi).debug("Closing stream", { streamId: n }), a.close(), I(this, $e).delete(v(n)));
6874
6874
  } else {
6875
6875
  let Q;
6876
6876
  I(this, mi).debug("Creating new stream", { streamId: n });
@@ -6882,7 +6882,7 @@ class qu {
6882
6882
  });
6883
6883
  }
6884
6884
  });
6885
- if (I(this, $e).set(M(n), a), g || (I(this, mi).debug("Closing new stream", { streamId: n }), yield r.cancel(), I(this, $e).delete(M(n))), o.length > 0)
6885
+ if (I(this, $e).set(v(n), a), g || (I(this, mi).debug("Closing new stream", { streamId: n }), yield r.cancel(), I(this, $e).delete(v(n))), o.length > 0)
6886
6886
  return yield TQ(new go(o, r), n);
6887
6887
  }
6888
6888
  } finally {
@@ -6893,7 +6893,7 @@ class qu {
6893
6893
  }
6894
6894
  close() {
6895
6895
  var A;
6896
- return I(this, _e).cancel().catch(v), I(this, Ks).cancel("closing").catch(v), (A = I(this, ui)) == null || A.cancel("closing").catch(v), I(this, pt).close();
6896
+ return I(this, _e).cancel().catch(J), I(this, Ks).cancel("closing").catch(J), (A = I(this, ui)) == null || A.cancel("closing").catch(J), I(this, pt).close();
6897
6897
  }
6898
6898
  closed() {
6899
6899
  return Promise.resolve();
@@ -7053,14 +7053,14 @@ class It {
7053
7053
  startGroup(A) {
7054
7054
  return I(this, tt).filterType = {
7055
7055
  type: "absolute-start",
7056
- start: { group: A, object: M(0) }
7056
+ start: { group: A, object: v(0) }
7057
7057
  }, this;
7058
7058
  }
7059
7059
  range(A, e) {
7060
7060
  return I(this, tt).filterType = {
7061
7061
  type: "absolute-range",
7062
- start: { group: A, object: M(0) },
7063
- end: { group: e, object: M(0) }
7062
+ start: { group: A, object: v(0) },
7063
+ end: { group: e, object: v(0) }
7064
7064
  }, this;
7065
7065
  }
7066
7066
  build() {
@@ -7125,7 +7125,7 @@ const lr = class lr {
7125
7125
  c(this, XA, A), c(this, Le, e), A.done().then((t) => h(this, null, function* () {
7126
7126
  var g;
7127
7127
  return I(this, Ko).call(this, (g = t.finalInfo) == null ? void 0 : g.group);
7128
- })).catch(v), c(this, OI, A.groups());
7128
+ })).catch(J), c(this, OI, A.groups());
7129
7129
  }
7130
7130
  static subscribe(A, e) {
7131
7131
  return h(this, null, function* () {
@@ -7222,7 +7222,7 @@ const ur = class ur {
7222
7222
  case "absolute-start":
7223
7223
  case "latest-group":
7224
7224
  case "latest-object":
7225
- o && a.startGroup(n + M(1));
7225
+ o && a.startGroup(n + v(1));
7226
7226
  break;
7227
7227
  }
7228
7228
  const B = a.build();
@@ -7231,8 +7231,8 @@ const ur = class ur {
7231
7231
  A.subscribe(B),
7232
7232
  o ? t.value.update(n, n) : t.value.unsubscribe()
7233
7233
  ]);
7234
- r.done().then(() => u(this, ZI, pB).call(this, r)).catch(v);
7235
- r.expiryNotification().then(() => I(this, XI).call(this, A, B)).catch(v);
7234
+ r.done().then(() => u(this, ZI, pB).call(this, r)).catch(J);
7235
+ r.expiryNotification().then(() => I(this, XI).call(this, A, B)).catch(J);
7236
7236
  const Q = new Bo(r, n);
7237
7237
  t.value = Q;
7238
7238
  yield I(this, it).push(Q);
@@ -7251,10 +7251,10 @@ const ur = class ur {
7251
7251
  return o.done().then(() => {
7252
7252
  var B;
7253
7253
  return u(B = a, ZI, pB).call(B, o);
7254
- }).catch(v), o.expiryNotification().then(() => {
7254
+ }).catch(J), o.expiryNotification().then(() => {
7255
7255
  var B;
7256
7256
  return I(B = a, XI).call(B, A, e);
7257
- }).catch(v), a;
7257
+ }).catch(J), a;
7258
7258
  });
7259
7259
  }
7260
7260
  largestGroupId() {
@@ -7391,7 +7391,7 @@ const Yo = class Yo {
7391
7391
  C(this, jI);
7392
7392
  C(this, zI);
7393
7393
  C(this, _I);
7394
- c(this, jI, A), c(this, Ft, e), c(this, zI, t), c(this, _I, u(this, To, SE).call(this)), this.closed().finally(() => I(this, Ft).close()).catch(v);
7394
+ c(this, jI, A), c(this, Ft, e), c(this, zI, t), c(this, _I, u(this, To, SE).call(this)), this.closed().finally(() => I(this, Ft).close()).catch(J);
7395
7395
  }
7396
7396
  catalog() {
7397
7397
  return I(this, Ft);
@@ -7534,14 +7534,14 @@ const ss = class ss {
7534
7534
  if (e.initTrack) {
7535
7535
  const D = new It().name(e.initTrack).build(), [p, k] = yield Promise.all([
7536
7536
  u(m = ss, Po, pE).call(m, A, D),
7537
- Ht.subscribe(A, Q, { params: n, largestGroupId: g ? g - M(1) : void 0 })
7537
+ Ht.subscribe(A, Q, { params: n, largestGroupId: g ? g - v(1) : void 0 })
7538
7538
  ]), S = new AC(p);
7539
7539
  return new ss(e, A.namespace(), k, S, t);
7540
7540
  }
7541
7541
  DA(e.initData, "no init data found on track");
7542
7542
  const E = OC(e.initData), d = new AC(new Uint8Array(E)), l = yield Ht.subscribe(A, Q, {
7543
7543
  params: n,
7544
- largestGroupId: g ? g - M(1) : void 0
7544
+ largestGroupId: g ? g - v(1) : void 0
7545
7545
  });
7546
7546
  return new ss(e, A.namespace(), l, d, t);
7547
7547
  });
@@ -7622,7 +7622,7 @@ const mr = class mr {
7622
7622
  C(this, In);
7623
7623
  C(this, nn);
7624
7624
  C(this, on);
7625
- c(this, In, A), c(this, nn, t), c(this, Di, e), c(this, on, u(this, Ti, GB).call(this, I(this, Di))), this.closed().finally(() => I(this, kt).close()).catch(v);
7625
+ c(this, In, A), c(this, nn, t), c(this, Di, e), c(this, on, u(this, Ti, GB).call(this, I(this, Di))), this.closed().finally(() => I(this, kt).close()).catch(J);
7626
7626
  }
7627
7627
  closed() {
7628
7628
  return I(this, on);
@@ -7679,11 +7679,11 @@ xo = new WeakMap(), kt = new WeakMap(), Di = new WeakMap(), In = new WeakMap(),
7679
7679
  continue;
7680
7680
  const F = ju(S.payload);
7681
7681
  I(this, kt).update((G) => {
7682
- var J, T;
7683
- for (G.push(...F), G.sort((Y, tA) => Y.wallclock - tA.wallclock); G[0] && ((T = (J = G[G.length - 1]) == null ? void 0 : J.wallclock) != null ? T : 0) - G[0].wallclock > Xu; )
7682
+ var M, T;
7683
+ for (G.push(...F), G.sort((Y, tA) => Y.wallclock - tA.wallclock); G[0] && ((T = (M = G[G.length - 1]) == null ? void 0 : M.wallclock) != null ? T : 0) - G[0].wallclock > Xu; )
7684
7684
  G.shift();
7685
7685
  return G;
7686
- }), e === I(this, Di).resolved && S.groupId > M(0) && S.objectId == M(0) && u(this, Ti, yE).call(this, S.groupId).catch((G) => {
7686
+ }), e === I(this, Di).resolved && S.groupId > v(0) && S.objectId == v(0) && u(this, Ti, yE).call(this, S.groupId).catch((G) => {
7687
7687
  I(this, xo).warn("backfill failed", G);
7688
7688
  });
7689
7689
  }
@@ -7717,7 +7717,7 @@ xo = new WeakMap(), kt = new WeakMap(), Di = new WeakMap(), In = new WeakMap(),
7717
7717
  });
7718
7718
  }, yE = function(A) {
7719
7719
  return h(this, null, function* () {
7720
- const e = A - M(1), t = this.timeline(), g = t[0], n = t[t.length - 1];
7720
+ const e = A - v(1), t = this.timeline(), g = t[0], n = t[t.length - 1];
7721
7721
  if (!g || !n || n.wallclock - g.wallclock > aC)
7722
7722
  return;
7723
7723
  const o = j.fromPromise(
@@ -7884,7 +7884,7 @@ _a = qt(null), Si = new WeakMap(), pi = new WeakMap(), yi = new WeakMap(), Gt =
7884
7884
  });
7885
7885
  }, JA(_a, 9, "start", HC, gs), ot(_a, gs), Kt(_a, 3, gs);
7886
7886
  let ro = gs;
7887
- const _u = M(8);
7887
+ const _u = v(8);
7888
7888
  function $u(i) {
7889
7889
  if (i < 0 || i > 65535)
7890
7890
  throw new RangeError("burstMs must be between 0 and 65535 inclusive");
@@ -8143,7 +8143,7 @@ let Im = (TC = [WA({ context: "Player", enter: "info" })], KC = [WA({ context: "
8143
8143
  s(this, "subtitles", new Ka(I(this, Ut), "subtitles"));
8144
8144
  s(this, "video", new Ka(I(this, fe), "video"));
8145
8145
  s(this, "audio", new Ka(I(this, we), "audio"));
8146
- c(this, Xs, A), c(this, js, bB.start(t)), c(this, ki, t), c(this, kA, new KA(e)), c(this, zs, new gm(e)), c(this, En, Promise.race([t.idleTimeout(), u(this, TA, RE).call(this), I(this, zs).closed()])), I(this, Xs).closed().then(() => this.close()).catch(v);
8146
+ c(this, Xs, A), c(this, js, bB.start(t)), c(this, ki, t), c(this, kA, new KA(e)), c(this, zs, new gm(e)), c(this, En, Promise.race([t.idleTimeout(), u(this, TA, RE).call(this), I(this, zs).closed()])), I(this, Xs).closed().then(() => this.close()).catch(J);
8147
8147
  }
8148
8148
  closed() {
8149
8149
  return I(this, En);
@@ -8220,7 +8220,7 @@ let Im = (TC = [WA({ context: "Player", enter: "info" })], KC = [WA({ context: "
8220
8220
  I(this, zs).update(t), yield I(this, kA).current().close();
8221
8221
  const B = a.toReversed().find((p) => p.wallclock <= g), r = B != null && B.mediaPts ? B.mediaPts - n.timestampOffsetMs() : void 0, d = t.timestampWallclockOffset() - o + n.timestampOffsetMs();
8222
8222
  t.setTimestampOffsetMs(d);
8223
- const l = B != null && B.groupId ? M(B.groupId) : void 0;
8223
+ const l = B != null && B.groupId ? v(B.groupId) : void 0;
8224
8224
  r && ((m = I(this, fe).current()) == null || m.stopAfterTimestampReached(r), (D = I(this, we).current()) == null || D.stopAfterTimestampReached(r)), I(this, kA).update(t), yield Promise.all([
8225
8225
  A.videoTrack ? this.setVideoTrack(A.videoTrack, l) : void 0,
8226
8226
  A.audioTrack ? this.setAudioTrack(A.audioTrack, l) : void 0
@@ -8260,7 +8260,7 @@ let Im = (TC = [WA({ context: "Player", enter: "info" })], KC = [WA({ context: "
8260
8260
  return h(this, null, function* () {
8261
8261
  const n = t == null ? void 0 : t.largestGroupId(), [o, a] = yield Promise.all([
8262
8262
  A.subscribeCmafTrack(e, {
8263
- startGroup: g || (n ? n + M(1) : void 0)
8263
+ startGroup: g || (n ? n + v(1) : void 0)
8264
8264
  }),
8265
8265
  n ? t == null ? void 0 : t.update(n, n) : t == null ? void 0 : t.unsubscribe()
8266
8266
  ]);
@@ -8337,11 +8337,11 @@ const Sr = class Sr {
8337
8337
  C(this, $s, /* @__PURE__ */ new Map());
8338
8338
  C(this, Ag, (A) => {
8339
8339
  if (!A) {
8340
- I(this, IA).setSubtitleTrack(void 0).catch(v);
8340
+ I(this, IA).setSubtitleTrack(void 0).catch(J);
8341
8341
  return;
8342
8342
  }
8343
8343
  const e = I(this, bt).get(Tt(I(this, IA).namespace())), t = e == null ? void 0 : e.getTextTrack(A);
8344
- t && I(this, IA).setSubtitleTrack(t).catch(v);
8344
+ t && I(this, IA).setSubtitleTrack(t).catch(J);
8345
8345
  });
8346
8346
  C(this, ln, (A) => {
8347
8347
  switch (A.type) {
@@ -8364,7 +8364,7 @@ const Sr = class Sr {
8364
8364
  vQ(new URL("/api/telemetry", I(this, jA).url().replace("wss://", "https://")), {
8365
8365
  body: A.body,
8366
8366
  headers: { "Content-Type": "text/plain" }
8367
- }).catch(v);
8367
+ }).catch(J);
8368
8368
  break;
8369
8369
  case "refresh auth":
8370
8370
  I(this, jA).updateAuthToken(A.token);
@@ -8373,9 +8373,9 @@ const Sr = class Sr {
8373
8373
  });
8374
8374
  C(this, eg, !1);
8375
8375
  s(this, "disconnect", (A = "Disconnect Requested") => {
8376
- I(this, vA).info("Disconnecting", A), I(this, jA).close(), I(this, IA).close().catch(v), c(this, $s, /* @__PURE__ */ new Map()), u(this, QA, Dg).call(this, "disconnected");
8376
+ I(this, vA).info("Disconnecting", A), I(this, jA).close(), I(this, IA).close().catch(J), c(this, $s, /* @__PURE__ */ new Map()), u(this, QA, Dg).call(this, "disconnected");
8377
8377
  });
8378
- c(this, dA, A), c(this, vA, e), c(this, jA, t), c(this, IA, g), c(this, bt, n), c(this, hn, o), c(this, _s, a), I(this, dA).on("send signal", I(this, ln)), I(this, dA).on("disconnect", this.disconnect), I(this, dA).on("text track", I(this, Ag)), u(this, QA, GE).call(this).catch(v), u(this, QA, NE).call(this).catch(v);
8378
+ c(this, dA, A), c(this, vA, e), c(this, jA, t), c(this, IA, g), c(this, bt, n), c(this, hn, o), c(this, _s, a), I(this, dA).on("send signal", I(this, ln)), I(this, dA).on("disconnect", this.disconnect), I(this, dA).on("text track", I(this, Ag)), u(this, QA, GE).call(this).catch(J), u(this, QA, NE).call(this).catch(J);
8379
8379
  }
8380
8380
  get estimatedBandwidth() {
8381
8381
  return I(this, dn);
@@ -8396,7 +8396,7 @@ const Sr = class Sr {
8396
8396
  }
8397
8397
  static start(A, e, t, g, n) {
8398
8398
  return h(this, null, function* () {
8399
- var F, G, J, T;
8399
+ var F, G, M, T;
8400
8400
  const o = new Map(
8401
8401
  g.connectInfo.channels.map((Y) => [
8402
8402
  Tt(Y.catalog.namespace),
@@ -8407,7 +8407,7 @@ const Sr = class Sr {
8407
8407
  typeof g.edgeUrl === "string" ? r = Ta(g.edgeUrl, a, B) : (r = Ta(g.edgeUrl.moqUrl || g.edgeUrl.moqWsUrl, a, B), Q = Ta(g.edgeUrl.moqWsUrl, a, B));
8408
8408
  const E = (F = g.connectInfo.channels.find((Y) => Y.channelId === a.channelId)) == null ? void 0 : F.catalog;
8409
8409
  e.debug("Resolved edge url", { edgeUrl: r, edgeWsUrl: Q }), DA(E, "no catalog found");
8410
- const d = (G = o.get(Tt(E.namespace))) == null ? void 0 : G.getVideoTrack(a.video), l = (J = o.get(Tt(E.namespace))) == null ? void 0 : J.getAudioTrack(a.audio), m = yield Pu({
8410
+ const d = (G = o.get(Tt(E.namespace))) == null ? void 0 : G.getVideoTrack(a.video), l = (M = o.get(Tt(E.namespace))) == null ? void 0 : M.getAudioTrack(a.audio), m = yield Pu({
8411
8411
  url: r,
8412
8412
  wsUrl: Q,
8413
8413
  authToken: g.options.get("authenticationToken"),
@@ -8557,7 +8557,7 @@ dA = new WeakMap(), vA = new WeakMap(), jA = new WeakMap(), cn = new WeakMap(),
8557
8557
  try {
8558
8558
  for (var d = iA(e), l, m, D; l = !(m = yield d.next()).done; l = !1) {
8559
8559
  const p = m.value;
8560
- const k = Tt(p.track.namespace), S = p.track.trackObject.language, F = iB((a = p.track.trackObject.codec) != null ? a : ""), G = p.track.trackObject.codec, J = F ? Qt({ codec: F, codecString: G }) : void 0, T = !!p.track.trackObject["com.vindral.drm"];
8560
+ const k = Tt(p.track.namespace), S = p.track.trackObject.language, F = iB((a = p.track.trackObject.codec) != null ? a : ""), G = p.track.trackObject.codec, M = F ? Qt({ codec: F, codecString: G }) : void 0, T = !!p.track.trackObject["com.vindral.drm"];
8561
8561
  try {
8562
8562
  for (var B = iA(p), r, Q, E; r = !(Q = yield B.next()).done; r = !1) {
8563
8563
  const [Y, tA] = Q.value;
@@ -8591,7 +8591,7 @@ dA = new WeakMap(), vA = new WeakMap(), jA = new WeakMap(), cn = new WeakMap(),
8591
8591
  payload: tA,
8592
8592
  channelId: k,
8593
8593
  groupId: Y,
8594
- mimeType: J,
8594
+ mimeType: M,
8595
8595
  codec: F,
8596
8596
  switchInfo: YA,
8597
8597
  // FIXME: We should replace this with something better than hashing the track name
@@ -8708,7 +8708,7 @@ class Bm extends _A {
8708
8708
  var g;
8709
8709
  let t = !1;
8710
8710
  return (g = this.websockets) == null || g.forEach((n) => {
8711
- n.onmessage = v, n.removeEventListener("error", this.onError), n.removeEventListener("close", this.onClose), n.removeEventListener("open", this.onOpen), n.close(1e3, e), t = !0;
8711
+ n.onmessage = J, n.removeEventListener("error", this.onError), n.removeEventListener("close", this.onClose), n.removeEventListener("open", this.onOpen), n.close(1e3, e), t = !0;
8712
8712
  }), this.websockets = [], this.shouldContinueConnecting = !1, this._isConnectInProgress = !1, this.logger.info("Closed websocket", { reason: e }), t;
8713
8713
  });
8714
8714
  s(this, "suspend", () => {
@@ -8958,7 +8958,7 @@ const rm = 65536 * 8, Cm = 0.9, Qm = 40, Em = (i) => {
8958
8958
  type: "ping"
8959
8959
  });
8960
8960
  });
8961
- this.logger = e, this.emitter = A, this.config = t, this.rtts = g, this.emitter.on("send signal", this.sendSignal), this.emitter.on("disconnect", this.close), this.emitter.on("reconnect", this.reconnect), this.disconnected.promise.catch(v), this.transport = this.connectWebSocketTransport();
8961
+ this.logger = e, this.emitter = A, this.config = t, this.rtts = g, this.emitter.on("send signal", this.sendSignal), this.emitter.on("disconnect", this.close), this.emitter.on("reconnect", this.reconnect), this.disconnected.promise.catch(J), this.transport = this.connectWebSocketTransport();
8962
8962
  }
8963
8963
  closed() {
8964
8964
  return this.disconnected.promise;
@@ -9087,7 +9087,7 @@ const Is = class Is {
9087
9087
  const A = Date.now(), e = () => Date.now() - A, t = globalThis.AbortController ? new AbortController() : void 0, g = fetch(new URL("/api/v4/connect/ping", this.config.options.get("url")).toString(), {
9088
9088
  method: "HEAD",
9089
9089
  signal: t == null ? void 0 : t.signal
9090
- }).catch(v);
9090
+ }).catch(J);
9091
9091
  return Promise.race([
9092
9092
  vt(Is.PING_TIMEOUT).then(() => t == null ? void 0 : t.abort()),
9093
9093
  g
@@ -9800,7 +9800,7 @@ const mm = () => window.AudioContext || window.webkitAudioContext, Aa = class Aa
9800
9800
  try {
9801
9801
  return yield Promise.race([this.context.resume(), Ir(1e3, mh())]);
9802
9802
  } catch (e) {
9803
- throw this.suspend().catch(v), e;
9803
+ throw this.suspend().catch(J), e;
9804
9804
  }
9805
9805
  }));
9806
9806
  s(this, "suspend", () => h(this, null, function* () {
@@ -9953,7 +9953,7 @@ const wm = 400, ea = class ea extends _A {
9953
9953
  return (e = this.audio) == null || e.unload(), this.audio = new PB(), this.audio.on("state", (n) => {
9954
9954
  this.logger.info("AudioContext state change", { state: n }), n === "running" && (this._muted = this._userProvidedMuted, this.setGain(this._volume)), !this.ignoreSuspendCalls && this.emit("state change", n);
9955
9955
  }), this.audio.on("stuck", () => {
9956
- this.reInitWhenStuck && (this.logger.info("Re-init audio context"), this.setupContext(), this.resume().catch(v), this.emit("stuck"));
9956
+ this.reInitWhenStuck && (this.logger.info("Re-init audio context"), this.setupContext(), this.resume().catch(J), this.emit("stuck"));
9957
9957
  }), (t = this.gainNode) == null || t.disconnect(), this.gainNode = this.audio.createGain(), this.setGain(this._volume), this.startTime = this.audio.currentTime, (g = this.splitter) == null || g.disconnect(), this.splitter = this.audio.createSplitter(), this.audio;
9958
9958
  });
9959
9959
  s(this, "setGain", (e) => {
@@ -10198,7 +10198,7 @@ const Yt = (i, A) => {
10198
10198
  class fm {
10199
10199
  constructor() {
10200
10200
  s(this, "audio");
10201
- s(this, "unmute", () => this.audio.play().catch(v));
10201
+ s(this, "unmute", () => this.audio.play().catch(J));
10202
10202
  const A = document.createElement("div");
10203
10203
  A.innerHTML = "<audio x-webkit-airplay='deny'></audio>";
10204
10204
  const e = A.children.item(0);
@@ -10303,7 +10303,7 @@ const ia = class ia {
10303
10303
  }
10304
10304
  set muted(A) {
10305
10305
  const e = this.muted;
10306
- this.audioPlayer.muted = A, !A && e && this.activateAudioPlayer().catch(v);
10306
+ this.audioPlayer.muted = A, !A && e && this.activateAudioPlayer().catch(J);
10307
10307
  }
10308
10308
  get currentTime() {
10309
10309
  return this.audioPlayer.currentTime;
@@ -10483,7 +10483,7 @@ const sa = class sa {
10483
10483
  autoplay: !1,
10484
10484
  logger: this.logger.createContext("MediaElement")
10485
10485
  }), this.mediaElement.on("volume state", (E) => {
10486
- this.updateVolumeState(), !E.isMuted && !this.audioPlayer.isContextRunning && this.activateAudioPlayer().catch(v), E.isMuted || (this._userProvidedMuted = !1);
10486
+ this.updateVolumeState(), !E.isMuted && !this.audioPlayer.isContextRunning && this.activateAudioPlayer().catch(J), E.isMuted || (this._userProvidedMuted = !1);
10487
10487
  }), this.mediaElement.on("media element state", (E) => {
10488
10488
  E === "paused" && this.audioPlayer.flushBuffer(), this.emitter.emit("media element state", E);
10489
10489
  }), this.audioPlayer = Co.create(this.logger.createContext("AudioPlayerModule"), g, {
@@ -10516,7 +10516,7 @@ const sa = class sa {
10516
10516
  }
10517
10517
  set muted(A) {
10518
10518
  const e = this.muted;
10519
- this._userProvidedMuted = A, this.mediaElement.muted = A, !A && e && this.activateAudioPlayer().catch(v);
10519
+ this._userProvidedMuted = A, this.mediaElement.muted = A, !A && e && this.activateAudioPlayer().catch(J);
10520
10520
  }
10521
10521
  get currentTime() {
10522
10522
  return this.audioPlayer.currentTime;
@@ -10949,7 +10949,7 @@ const ga = class ga {
10949
10949
  const e = !this.mediaElement.paused, t = [];
10950
10950
  this.trackContexts.forEach((g, n) => {
10951
10951
  g.state === "initialized" && t.push({ type: n, mimeType: g.mimeType, codec: g.codec });
10952
- }), this.sourceOpenStartTime = Date.now(), this.pendingTracksToAddSourceBuffers = t, this.mediaSource.detach(this.mediaElement), this.setTrackContexts(this.trackContexts), this.mediaSource.attach(this.mediaElement), e && this.mediaElement.play().catch(v);
10952
+ }), this.sourceOpenStartTime = Date.now(), this.pendingTracksToAddSourceBuffers = t, this.mediaSource.detach(this.mediaElement), this.setTrackContexts(this.trackContexts), this.mediaSource.attach(this.mediaElement), e && this.mediaElement.play().catch(J);
10953
10953
  });
10954
10954
  s(this, "onMediaElementError", () => {
10955
10955
  const { error: A } = this.mediaElement;
@@ -12791,7 +12791,7 @@ const xe = class xe extends _A {
12791
12791
  const e = this.modules.canvasModule instanceof _i ? !0 : void 0;
12792
12792
  return w({
12793
12793
  uptime: Date.now() - this.createdAt,
12794
- version: "4.2.0-5-g7d2f2421",
12794
+ version: "4.2.0-6-g76abf9e5",
12795
12795
  clientId: this.clientId,
12796
12796
  sessionId: this.sessionId,
12797
12797
  channelId: this.channelId,
@@ -12882,7 +12882,7 @@ const xe = class xe extends _A {
12882
12882
  }
12883
12883
  };
12884
12884
  const p = KB.create(this.emitter), k = this.options.get("poster"), S = k === !0 ? this.getThumbnailUrl() : k || void 0;
12885
- let F, G, J;
12885
+ let F, G, M;
12886
12886
  if (this.willUseMediaSource()) {
12887
12887
  const f = new cB({
12888
12888
  type: this.options.get("media") == "audio" ? "audio" : "video",
@@ -12908,7 +12908,7 @@ const xe = class xe extends _A {
12908
12908
  bufferTime: this.options.get("minBufferTime")
12909
12909
  }
12910
12910
  ), U = f.element();
12911
- this.element = U.element, this.playbackSource = f, J = f;
12911
+ this.element = U.element, this.playbackSource = f, M = f;
12912
12912
  const P = this.browser.platform.isIOS && this.browser.platform.iosVersion <= 15;
12913
12913
  this.options.get("pictureInPictureEnabled") && !P && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (G = ho.create(this.logger.createContext("UnpauseModule"), U, p));
12914
12914
  } else {
@@ -12925,7 +12925,7 @@ const xe = class xe extends _A {
12925
12925
  this.options.get("volume"),
12926
12926
  U,
12927
12927
  this.options.get("minBufferTime")
12928
- ), this.element = f.element(), this.playbackSource = f, J = f, this.options.get("iosWakeLockEnabled") && (this.wakeLock = new yl());
12928
+ ), this.element = f.element(), this.playbackSource = f, M = f, this.options.get("iosWakeLockEnabled") && (this.wakeLock = new yl());
12929
12929
  }
12930
12930
  this.emitter.on("channel reset", this.resetModules), this.emitter.on("no data timeout", this.resetModules), this.emitter.on("media element state", (f) => this.onMediaElementState(f)), this.emitter.on("volume state", (f) => this.emit("volume state", f)), this.options.get("pauseSupportEnabled") || this.emitter.on("exit picture in picture", () => Q.setTimeout(() => this.play(), 0)), this.emitter.on("constraint cap changed", (f) => {
12931
12931
  this.logger.info("new cap set", { cap: f }), this.alignSizeAndBitRate(this.targetSubscription);
@@ -12997,7 +12997,7 @@ const xe = class xe extends _A {
12997
12997
  qualityOfService: m,
12998
12998
  mseModule: F,
12999
12999
  unpause: G,
13000
- canvasModule: J
13000
+ canvasModule: M
13001
13001
  }, this.modules.adaptivity.isEnabled = this.options.get("abrEnabled"), this.emitter.on("page active", (f) => {
13002
13002
  var U;
13003
13003
  f && typeof this.disconnectTimeout == "number" && (this.modules.timer.clearInterval(this.disconnectTimeout), this.disconnectTimeout = void 0), f ? this.playbackSource.isPaused || (this.logger.debug("Unsuspending"), this.unsuspend()) : (this.logger.debug("Suspending"), this.suspend(), this.modules.decoder ? this.options.get("iosBackgroundPlayEnabled") ? (this.modules.decoder.unsuspend(), (U = this.modules.canvasModule) == null || U.unsuspend()) : this.modules.connection.disconnect() : (this.disconnectTimeout && this.modules.timer.clearInterval(this.disconnectTimeout), this.disconnectTimeout = this.modules.timer.setInterval(() => {
@@ -13925,7 +13925,7 @@ class Rw extends Sa {
13925
13925
  };
13926
13926
  A.on("channels", n);
13927
13927
  const o = (a) => A.channelId = a.channel.channelId;
13928
- super({ label: "Channel List", items: [], onItemClick: o, onToggle: v, iconButtonType: "channels" }), this.element.classList.add(Sw), this.hide();
13928
+ super({ label: "Channel List", items: [], onItemClick: o, onToggle: J, iconButtonType: "channels" }), this.element.classList.add(Sw), this.hide();
13929
13929
  }
13930
13930
  }
13931
13931
  const xE = {
@@ -13950,7 +13950,7 @@ class bw extends Sa {
13950
13950
  };
13951
13951
  A.on("languages", e);
13952
13952
  const t = (g) => A.language = g.language;
13953
- super({ label: "Language", items: [], onItemClick: t, onToggle: v, iconButtonType: "languages" }), this.hide();
13953
+ super({ label: "Language", items: [], onItemClick: t, onToggle: J, iconButtonType: "languages" }), this.hide();
13954
13954
  }
13955
13955
  }
13956
13956
  class Nw extends ae {
@@ -14000,7 +14000,7 @@ class Tw extends Sa {
14000
14000
  const t = ({ rendition: g }) => {
14001
14001
  g.audio && (A.maxAudioBitRate = g.audio.bitRate), g.video && (A.maxVideoBitRate = g.video.bitRate, A.maxSize = g.video);
14002
14002
  };
14003
- super({ label: "Rendition Levels", items: [], onItemClick: t, onToggle: v, iconButtonType: "levels" }), this.element.classList.add(Mw);
14003
+ super({ label: "Rendition Levels", items: [], onItemClick: t, onToggle: J, iconButtonType: "levels" }), this.element.classList.add(Mw);
14004
14004
  }
14005
14005
  }
14006
14006
  class Yw extends ae {
@@ -14040,7 +14040,7 @@ class Pw extends Sa {
14040
14040
  };
14041
14041
  A.on("text tracks", e);
14042
14042
  const t = (g) => A.textTrack = g.textTrack;
14043
- super({ label: "Text Tracks", items: [], onItemClick: t, onToggle: v, iconButtonType: "textTracks" }), this.hide();
14043
+ super({ label: "Text Tracks", items: [], onItemClick: t, onToggle: J, iconButtonType: "textTracks" }), this.hide();
14044
14044
  }
14045
14045
  }
14046
14046
  class xw extends ae {
@@ -14122,18 +14122,18 @@ class Ow extends ae {
14122
14122
  thumbnailModule: E ? p : void 0
14123
14123
  }), G = new Tw({ vindral: e });
14124
14124
  this.volumeControls = new xw({ vindral: e }), this.playControls = new Nw({ vindral: e }), this.containerElement = e.mediaElement, a && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), k.attach(this.element);
14125
- const J = [];
14125
+ const M = [];
14126
14126
  if (l) {
14127
14127
  const T = new bw({ vindral: e });
14128
- T.attach(this.element), J.push(T);
14128
+ T.attach(this.element), M.push(T);
14129
14129
  }
14130
14130
  if (m) {
14131
14131
  const T = new Pw({ vindral: e });
14132
- T.attach(this.element), J.push(T);
14132
+ T.attach(this.element), M.push(T);
14133
14133
  }
14134
14134
  G.attach(this.element), F.attach(this.element), S.attach(this.element), this.oneToOneButton.attach(this.element), this.fullscreenButton.attach(this.element), this.items.push(
14135
14135
  k,
14136
- ...J,
14136
+ ...M,
14137
14137
  G,
14138
14138
  F,
14139
14139
  S,
@@ -14566,7 +14566,7 @@ class Uf {
14566
14566
  }), this.core.on("volume state", () => {
14567
14567
  this.bar.updateState();
14568
14568
  }), this.core.on("playback state", (D) => {
14569
- var p, k, S, F, G, J;
14569
+ var p, k, S, F, G, M;
14570
14570
  switch (this.bar.updateState(), D) {
14571
14571
  case "paused":
14572
14572
  this.bumpInteractTime(), (p = this.bufferingOverlay) == null || p.hide(), this.options.controlsEnabled && this.bar.show(), (this.core.media !== "audio" || !this.options.controlsEnabled) && ((k = this.playOverlay) == null || k.show());
@@ -14577,7 +14577,7 @@ class Uf {
14577
14577
  case "buffering": {
14578
14578
  (G = this.bufferingOverlay) == null || G.show();
14579
14579
  const T = this.core.videoBufferedRanges[this.core.videoBufferedRanges.length - 1], Y = !T || T.start > this.core.currentTime;
14580
- (J = this.bufferingOverlay) == null || J.fullscreen(Y);
14580
+ (M = this.bufferingOverlay) == null || M.fullscreen(Y);
14581
14581
  break;
14582
14582
  }
14583
14583
  }
@@ -14793,7 +14793,7 @@ var yf = (function() {
14793
14793
  var y = e.preRun.shift();
14794
14794
  k.unshift(y);
14795
14795
  }
14796
- var J = 0, T = null;
14796
+ var M = 0, T = null;
14797
14797
  e.preloadedImages = {}, e.preloadedAudios = {};
14798
14798
  function Y(y) {
14799
14799
  throw e.onAbort && e.onAbort(y), r(y), d = !0, y = new WebAssembly.RuntimeError("abort(" + y + "). Build with -s ASSERTIONS=1 for more info."), g(y), y;
@@ -14895,7 +14895,7 @@ var yf = (function() {
14895
14895
  } };
14896
14896
  (function() {
14897
14897
  function y(q) {
14898
- e.asm = q.exports, E = e.asm.g, q = E.buffer, e.HEAP8 = new Int8Array(q), e.HEAP16 = new Int16Array(q), e.HEAP32 = D = new Int32Array(q), e.HEAPU8 = m = new Uint8Array(q), e.HEAPU16 = new Uint16Array(q), e.HEAPU32 = new Uint32Array(q), e.HEAPF32 = new Float32Array(q), e.HEAPF64 = new Float64Array(q), p = e.asm.n, S.unshift(e.asm.h), J--, e.monitorRunDependencies && e.monitorRunDependencies(J), J == 0 && T && (q = T, T = null, q());
14898
+ e.asm = q.exports, E = e.asm.g, q = E.buffer, e.HEAP8 = new Int8Array(q), e.HEAP16 = new Int16Array(q), e.HEAP32 = D = new Int32Array(q), e.HEAPU8 = m = new Uint8Array(q), e.HEAPU16 = new Uint16Array(q), e.HEAPU32 = new Uint32Array(q), e.HEAPF32 = new Float32Array(q), e.HEAPF64 = new Float64Array(q), p = e.asm.n, S.unshift(e.asm.h), M--, e.monitorRunDependencies && e.monitorRunDependencies(M), M == 0 && T && (q = T, T = null, q());
14899
14899
  }
14900
14900
  function R(q) {
14901
14901
  y(q.instance);
@@ -14911,7 +14911,7 @@ var yf = (function() {
14911
14911
  });
14912
14912
  }
14913
14913
  var W = { a: f };
14914
- if (J++, e.monitorRunDependencies && e.monitorRunDependencies(J), e.instantiateWasm) try {
14914
+ if (M++, e.monitorRunDependencies && e.monitorRunDependencies(M), e.instantiateWasm) try {
14915
14915
  return e.instantiateWasm(W, y);
14916
14916
  } catch (q) {
14917
14917
  return r("Module.instantiateWasm callback failed with error: " + q), !1;
@@ -14953,9 +14953,9 @@ var yf = (function() {
14953
14953
  NA(F);
14954
14954
  }
14955
14955
  }
14956
- if (!(0 < J)) {
14956
+ if (!(0 < M)) {
14957
14957
  if (e.preRun) for (typeof e.preRun == "function" && (e.preRun = [e.preRun]); e.preRun.length; ) G();
14958
- NA(k), 0 < J || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() {
14958
+ NA(k), 0 < M || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() {
14959
14959
  setTimeout(function() {
14960
14960
  e.setStatus("");
14961
14961
  }, 1), y();
@@ -15036,7 +15036,7 @@ const Vg = class Vg {
15036
15036
  e instanceof Error && this.errors.push(or(!1, e));
15037
15037
  }
15038
15038
  });
15039
- s(this, "initSegment", v);
15039
+ s(this, "initSegment", J);
15040
15040
  s(this, "take", () => this.decodedSamples.shift());
15041
15041
  this.decoder = A;
15042
15042
  }
@@ -15241,8 +15241,8 @@ s(Zg, "create", (A, e, t, g = !1, n = "no-preference", o, a) => h(null, null, fu
15241
15241
  webcodecsHardwareAcceleration: n,
15242
15242
  offscreenCanvas: void 0
15243
15243
  });
15244
- } catch (J) {
15245
- p(J);
15244
+ } catch (M) {
15245
+ p(M);
15246
15246
  }
15247
15247
  } else
15248
15248
  p(F);