@vindral/web-sdk 4.1.5-5-gfe7b461b → 4.1.5-7-gfedebb3e

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.
@@ -5,7 +5,7 @@ var wu = Object.prototype.hasOwnProperty, bu = Object.prototype.propertyIsEnumer
5
5
  var dt = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Bt = (s) => {
6
6
  throw TypeError(s);
7
7
  };
8
- var $a = (s, e, t) => e in s ? Wc(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, S = (s, e) => {
8
+ var $a = (s, e, t) => e in s ? Wc(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, v = (s, e) => {
9
9
  for (var t in e || (e = {}))
10
10
  wu.call(e, t) && $a(s, t, e[t]);
11
11
  if (Ja)
@@ -25,11 +25,11 @@ var yu = (s, e) => {
25
25
  var Ci = (s) => {
26
26
  var e;
27
27
  return [, , , rm((e = s == null ? void 0 : s[dt("metadata")]) != null ? e : null)];
28
- }, Su = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Yn = (s) => s !== void 0 && typeof s != "function" ? Bt("Function expected") : s, hm = (s, e, t, i, n) => ({ kind: Su[s], name: e, metadata: i, addInitializer: (o) => t._ ? Bt("Already initialized") : n.push(Yn(o || null)) }), Zt = (s, e) => $a(e, dt("metadata"), s[3]), ki = (s, e, t, i) => {
28
+ }, vu = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Yn = (s) => s !== void 0 && typeof s != "function" ? Bt("Function expected") : s, hm = (s, e, t, i, n) => ({ kind: vu[s], name: e, metadata: i, addInitializer: (o) => t._ ? Bt("Already initialized") : n.push(Yn(o || null)) }), Zt = (s, e) => $a(e, dt("metadata"), s[3]), ki = (s, e, t, i) => {
29
29
  for (var n = 0, o = s[e >> 1], c = o && o.length; n < c; n++) e & 1 ? o[n].call(t) : i = o[n].call(t, i);
30
30
  return i;
31
31
  }, ye = (s, e, t, i, n, o) => {
32
- var c, h, u, m, p, g = e & 7, w = !!(e & 8), b = !!(e & 16), v = g > 3 ? s.length + 1 : g ? w ? 1 : 2 : 0, I = Su[g + 5], k = g > 3 && (s[v - 1] = []), D = s[v] || (s[v] = []), T = g && (!b && !w && (n = n.prototype), g < 5 && (g > 3 || !b) && om(g < 4 ? n : { get [t]() {
32
+ var c, h, u, m, p, g = e & 7, w = !!(e & 8), b = !!(e & 16), S = g > 3 ? s.length + 1 : g ? w ? 1 : 2 : 0, I = vu[g + 5], k = g > 3 && (s[S - 1] = []), D = s[S] || (s[S] = []), T = g && (!b && !w && (n = n.prototype), g < 5 && (g > 3 || !b) && om(g < 4 ? n : { get [t]() {
33
33
  return a(this, o);
34
34
  }, set [t](R) {
35
35
  return l(this, o, R);
@@ -121,8 +121,8 @@ var Ve = (s, e, t) => {
121
121
  return o();
122
122
  };
123
123
  import { E as Ei } from "./Bx7s5QdT.js";
124
- import { a as Xe, p as Sd, i as vd, c as dm, b as lm, A as mm, d as fm, t as pm, e as gm } from "./CPEMXA01.js";
125
- class vu {
124
+ import { a as Xe, p as vd, i as Sd, c as dm, b as lm, A as mm, d as fm, t as pm, e as gm } from "./CPEMXA01.js";
125
+ class Su {
126
126
  constructor(e) {
127
127
  r(this, "maxSize", 0);
128
128
  r(this, "size", 0);
@@ -493,7 +493,7 @@ function Rr() {
493
493
  const wm = /(android|bbd+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows ce|xda|xiino\/i.test(a)||\/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-\//i, Ee = navigator.userAgent.toLowerCase(), bm = wm.test(Ee), ym = () => {
494
494
  const s = document.createElement("video");
495
495
  return s.canPlayType("application/vnd.apple.mpegURL") !== "" || s.canPlayType("audio/mpegurl") !== "";
496
- }, Sm = () => {
496
+ }, vm = () => {
497
497
  try {
498
498
  if (typeof WebAssembly == "object" && typeof WebAssembly.instantiate == "function") {
499
499
  const s = new WebAssembly.Module(Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0));
@@ -503,7 +503,7 @@ const wm = /(android|bbd+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal
503
503
  return !1;
504
504
  }
505
505
  return !1;
506
- }, vm = () => Ee.indexOf("CrKey") !== -1, Id = () => navigator.platform === "MacIntel" && navigator.maxTouchPoints === 0, Fc = () => navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, Em = () => Ee.indexOf("iphone") >= 0 && Ee.indexOf("like iphone") < 0 || Ee.indexOf("ipad") >= 0 && Ee.indexOf("like ipad") < 0 || Ee.indexOf("ipod") >= 0 && Ee.indexOf("like ipod") < 0 || Fc(), Tm = () => {
506
+ }, Sm = () => Ee.indexOf("CrKey") !== -1, Id = () => navigator.platform === "MacIntel" && navigator.maxTouchPoints === 0, Fc = () => navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, Em = () => Ee.indexOf("iphone") >= 0 && Ee.indexOf("like iphone") < 0 || Ee.indexOf("ipad") >= 0 && Ee.indexOf("like ipad") < 0 || Ee.indexOf("ipod") >= 0 && Ee.indexOf("like ipod") < 0 || Fc(), Tm = () => {
507
507
  var s, e;
508
508
  return Fc() ? !1 : (e = (s = Rr()) == null ? void 0 : s.isTypeSupported('audio/mp4; codecs="opus"')) != null ? e : !1;
509
509
  }, gw = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, Im = () => /^(?!.*chrome).*safari/i.test(Ee);
@@ -526,7 +526,7 @@ const Cd = () => {
526
526
  supportsMp4Opus: e,
527
527
  supportsMediaSource: s,
528
528
  supportsHls: ym(),
529
- supportsWebAssembly: Sm(),
529
+ supportsWebAssembly: vm(),
530
530
  platform: {
531
531
  iosVersion: (t = Cm()) != null ? t : Number.MAX_SAFE_INTEGER,
532
532
  safariVersion: (i = km()) != null ? i : Number.MAX_SAFE_INTEGER,
@@ -667,7 +667,7 @@ function Pe(s) {
667
667
  return function(i, n) {
668
668
  const o = String(n.name);
669
669
  function c(...h) {
670
- s.enter && e[s.enter](`Enter '${o}'`, S({}, h));
670
+ s.enter && e[s.enter](`Enter '${o}'`, v({}, h));
671
671
  try {
672
672
  const u = i.call(this, ...h);
673
673
  return u instanceof Promise ? u.then((m) => {
@@ -796,7 +796,7 @@ class Ie {
796
796
  }
797
797
  je = new WeakMap(), et = new WeakMap();
798
798
  const Tu = (s, e) => {
799
- const t = S({}, s);
799
+ const t = v({}, s);
800
800
  return typeof t != "object" || e.forEach((i) => {
801
801
  delete t[i];
802
802
  }), t;
@@ -876,7 +876,7 @@ const Cu = () => {
876
876
  case "av1":
877
877
  return s.codecString ? `video/mp4; codecs="${s.codecString}"` : "video/mp4";
878
878
  }
879
- }, vi = () => Number.MAX_SAFE_INTEGER, lo = () => ({
879
+ }, Si = () => Number.MAX_SAFE_INTEGER, lo = () => ({
880
880
  width: Number.MAX_SAFE_INTEGER,
881
881
  height: Number.MAX_SAFE_INTEGER
882
882
  }), ku = (s) => !(typeof s != "object" || s === null || !("type" in s)), Dm = "connection_failed", Om = "connection_failed_will_not_attempt_again", Mm = "authentication_error", Fm = "authentication_expired", _m = "channel_not_found", Nm = "no_incoming_data_error", Vm = "connection_inactivity", Gm = "missing_init_segment", jm = "no_track_context", Wm = "invalid_track_context_state", zm = "disconnected_by_edge", Hm = "decoder_error", Qm = "audio_player_error", Xm = "media_source_error", qm = "webgl_context_lost_error", Zm = "access_forbidden", Jm = "channel_switch_failed", $m = "drm_error";
@@ -910,7 +910,7 @@ class x extends Error {
910
910
  r(this, "toStringifiable", () => {
911
911
  var n;
912
912
  const t = this.source(), i = t instanceof Error ? t.stack : this.stack;
913
- return M(S({}, this.extra), {
913
+ return M(v({}, this.extra), {
914
914
  code: this.props.code,
915
915
  isFatal: this.props.isFatal,
916
916
  type: this.props.type,
@@ -965,12 +965,13 @@ const Ym = (s, e) => new x(
965
965
  mseEnabled: !0,
966
966
  mseOpusEnabled: !0,
967
967
  muted: !1,
968
+ volume: 1,
968
969
  minBufferTime: 1500,
969
970
  maxBufferTime: 1500,
970
971
  logLevel: Um.OFF,
971
972
  maxSize: lo(),
972
- maxVideoBitRate: vi(),
973
- maxAudioBitRate: vi(),
973
+ maxVideoBitRate: Si(),
974
+ maxAudioBitRate: Si(),
974
975
  maxInitialBitRate: 2.5 * 1e3 * 1e3,
975
976
  // 2.5 Mbps
976
977
  tags: [],
@@ -1024,7 +1025,7 @@ class _c {
1024
1025
  const i = yield fetch(t, {
1025
1026
  method: "POST",
1026
1027
  body: e,
1027
- headers: S({
1028
+ headers: v({
1028
1029
  "Content-Type": "application/octet-stream"
1029
1030
  }, this.headers)
1030
1031
  });
@@ -1131,7 +1132,7 @@ const Pu = {
1131
1132
  }), xu = (s, e, t, i, n, o) => f(null, null, function* () {
1132
1133
  let c;
1133
1134
  for (const h of i) {
1134
- const u = t == null ? void 0 : t.map((p) => M(S({}, p), {
1135
+ const u = t == null ? void 0 : t.map((p) => M(v({}, p), {
1135
1136
  robustness: h,
1136
1137
  contentType: o ? `${n === "audioCapabilities" ? "audio/mp4" : "video/mp4"}; codecs="${o}"` : p.contentType
1137
1138
  }));
@@ -1188,8 +1189,8 @@ const Af = (s) => {
1188
1189
  if (i) {
1189
1190
  const g = i.getElementsByTagName("name"), w = i.getElementsByTagName("value");
1190
1191
  for (let b = 0; b < g.length; b++) {
1191
- const v = (h = g[b]) == null ? void 0 : h.childNodes[0], I = (u = w[b]) == null ? void 0 : u.childNodes[0];
1192
- v != null && v.nodeValue && I && I.nodeValue && (n[v.nodeValue] = I.nodeValue);
1192
+ const S = (h = g[b]) == null ? void 0 : h.childNodes[0], I = (u = w[b]) == null ? void 0 : u.childNodes[0];
1193
+ S != null && S.nodeValue && I && I.nodeValue && (n[S.nodeValue] = I.nodeValue);
1193
1194
  }
1194
1195
  }
1195
1196
  const o = t.getElementsByTagName("Challenge")[0];
@@ -1214,7 +1215,7 @@ class wf extends _c {
1214
1215
  t.searchParams.append(o, c);
1215
1216
  const i = Af(e), n = yield fetch(t, {
1216
1217
  method: "POST",
1217
- headers: S(S({}, i.headers), this.headers),
1218
+ headers: v(v({}, i.headers), this.headers),
1218
1219
  body: i.message
1219
1220
  });
1220
1221
  if (!n.ok)
@@ -1309,7 +1310,7 @@ class Lu {
1309
1310
  }
1310
1311
  getStatistics() {
1311
1312
  var e, t;
1312
- return !a(this, tt).resolved && !((e = a(this, de)) != null && e.statistics) ? null : S(S({}, a(this, tt).resolved), (t = a(this, de)) == null ? void 0 : t.statistics);
1313
+ return !a(this, tt).resolved && !((e = a(this, de)) != null && e.statistics) ? null : v(v({}, a(this, tt).resolved), (t = a(this, de)) == null ? void 0 : t.statistics);
1313
1314
  }
1314
1315
  unload() {
1315
1316
  var e;
@@ -1411,7 +1412,7 @@ Vd = function(e) {
1411
1412
  clearkey: void 0
1412
1413
  };
1413
1414
  };
1414
- const Sf = 7, vf = 8, Ef = (s) => {
1415
+ const vf = 7, Sf = 8, Ef = (s) => {
1415
1416
  const e = s.getUint32(0, !1), t = s.getUint8(0) << 16 | s.getUint16(1, !1);
1416
1417
  let i = 0;
1417
1418
  return t === 1 ? i += 3 : e === 1 && (i += 4), i;
@@ -1453,17 +1454,17 @@ const Sf = 7, vf = 8, Ef = (s) => {
1453
1454
  return Cf(s, (i) => {
1454
1455
  const n = i.byteOffset + i.byteLength;
1455
1456
  switch (If(i.getUint8(0))) {
1456
- case vf:
1457
+ case Sf:
1457
1458
  t.push(i.buffer.slice(i.byteOffset, n));
1458
1459
  break;
1459
- case Sf:
1460
+ case vf:
1460
1461
  e.push(i.buffer.slice(i.byteOffset, n));
1461
1462
  break;
1462
1463
  }
1463
1464
  return !0;
1464
1465
  }), { sequenceParameterSets: e, pictureParameterSets: t };
1465
1466
  }, kf = (s) => {
1466
- var v;
1467
+ var S;
1467
1468
  const e = new DataView(s), t = e.getUint8(1), i = e.getUint8(2), n = e.getUint8(3), o = new Ed(s, 32);
1468
1469
  o.readUnsignedExpGolomb();
1469
1470
  let c = 1;
@@ -1509,7 +1510,7 @@ const Sf = 7, vf = 8, Ef = (s) => {
1509
1510
  numerator: 1,
1510
1511
  denumerator: 1
1511
1512
  };
1512
- return o.readBit() && o.readBit() && (b = (v = Bf[o.readBits(8)]) != null ? v : { numerator: 0, denumerator: 0 }), {
1513
+ return o.readBit() && o.readBit() && (b = (S = Bf[o.readBits(8)]) != null ? S : { numerator: 0, denumerator: 0 }), {
1513
1514
  width: g,
1514
1515
  height: w,
1515
1516
  pixelAspectRatio: b,
@@ -1802,7 +1803,7 @@ const pr = class pr {
1802
1803
  }
1803
1804
  };
1804
1805
  r(pr, "type", "hdlr");
1805
- let So = pr;
1806
+ let vo = pr;
1806
1807
  const Ms = class Ms {
1807
1808
  constructor(e, t, i, n) {
1808
1809
  r(this, "type", Ms.type);
@@ -1823,7 +1824,7 @@ const Ms = class Ms {
1823
1824
  }
1824
1825
  };
1825
1826
  r(Ms, "type", "mdhd");
1826
- let vo = Ms;
1827
+ let So = Ms;
1827
1828
  const gr = class gr {
1828
1829
  constructor(e, t, i, n) {
1829
1830
  r(this, "type", gr.type);
@@ -1921,7 +1922,7 @@ const br = class br {
1921
1922
  let t, i, n;
1922
1923
  for (; e.remaining() > 0; ) {
1923
1924
  const o = ct(e);
1924
- o instanceof So && (t = o), o instanceof Io && (i = o), o instanceof vo && (n = o);
1925
+ o instanceof vo && (t = o), o instanceof Io && (i = o), o instanceof So && (n = o);
1925
1926
  }
1926
1927
  if (!t)
1927
1928
  throw new Error("No hdlr found");
@@ -1965,9 +1966,9 @@ const yr = class yr {
1965
1966
  };
1966
1967
  r(yr, "type", "tkhd");
1967
1968
  let ko = yr;
1968
- const Sr = class Sr {
1969
+ const vr = class vr {
1969
1970
  constructor(e, t) {
1970
- r(this, "type", Sr.type);
1971
+ r(this, "type", vr.type);
1971
1972
  r(this, "tkhd");
1972
1973
  r(this, "mdia");
1973
1974
  this.tkhd = e, this.mdia = t;
@@ -1982,14 +1983,14 @@ const Sr = class Sr {
1982
1983
  throw new Error("No tkhd found");
1983
1984
  if (!i)
1984
1985
  throw new Error("No mdia found");
1985
- return new Sr(t, i);
1986
+ return new vr(t, i);
1986
1987
  }
1987
1988
  };
1988
- r(Sr, "type", "trak");
1989
- let Bo = Sr;
1990
- const vr = class vr {
1989
+ r(vr, "type", "trak");
1990
+ let Bo = vr;
1991
+ const Sr = class Sr {
1991
1992
  constructor(e, t) {
1992
- r(this, "type", vr.type);
1993
+ r(this, "type", Sr.type);
1993
1994
  r(this, "mvhd");
1994
1995
  r(this, "traks");
1995
1996
  this.mvhd = e, this.traks = t;
@@ -2003,11 +2004,11 @@ const vr = class vr {
2003
2004
  }
2004
2005
  if (!t)
2005
2006
  throw new Error("No mvhd found");
2006
- return new vr(t, i);
2007
+ return new Sr(t, i);
2007
2008
  }
2008
2009
  };
2009
- r(vr, "type", "moov");
2010
- let Ro = vr;
2010
+ r(Sr, "type", "moov");
2011
+ let Ro = Sr;
2011
2012
  const Er = class Er {
2012
2013
  constructor(e, t, i, n, o, c, h, u) {
2013
2014
  r(this, "type", Er.type);
@@ -2160,10 +2161,10 @@ const jf = {
2160
2161
  trun: Ur,
2161
2162
  mdat: po,
2162
2163
  mdia: Co,
2163
- hdlr: So,
2164
+ hdlr: vo,
2164
2165
  minf: Io,
2165
2166
  stbl: To,
2166
- mdhd: vo,
2167
+ mdhd: So,
2167
2168
  stsd: Eo,
2168
2169
  prft: Uo,
2169
2170
  avc1: hh,
@@ -2235,13 +2236,13 @@ class Hf {
2235
2236
  }
2236
2237
  }
2237
2238
  jr = new WeakMap(), Wr = new WeakMap();
2238
- var Se, Re, H;
2239
+ var ve, Re, H;
2239
2240
  const hu = class hu {
2240
2241
  constructor(e, t) {
2241
- d(this, Se);
2242
+ d(this, ve);
2242
2243
  d(this, Re);
2243
2244
  d(this, H);
2244
- l(this, Se, t), l(this, Re, e), l(this, H, zf(t));
2245
+ l(this, ve, t), l(this, Re, e), l(this, H, zf(t));
2245
2246
  }
2246
2247
  /**
2247
2248
  * @returns a new fragment with a clone of the raw bytes
@@ -2249,7 +2250,7 @@ const hu = class hu {
2249
2250
  clone() {
2250
2251
  return new hu(
2251
2252
  a(this, Re),
2252
- new Uint8Array(a(this, Se).buffer.slice(a(this, Se).byteOffset, a(this, Se).byteOffset + a(this, Se).byteLength))
2253
+ new Uint8Array(a(this, ve).buffer.slice(a(this, ve).byteOffset, a(this, ve).byteOffset + a(this, ve).byteLength))
2253
2254
  );
2254
2255
  }
2255
2256
  /**
@@ -2257,13 +2258,13 @@ const hu = class hu {
2257
2258
  * @param baseMediaDecodeTime
2258
2259
  */
2259
2260
  updateBaseMediaDecodeTime(e) {
2260
- const t = new DataView(a(this, Se).buffer, a(this, Se).byteOffset, a(this, Se).byteLength);
2261
+ const t = new DataView(a(this, ve).buffer, a(this, ve).byteOffset, a(this, ve).byteLength);
2261
2262
  if (a(this, H).moof.traf.tfdt)
2262
2263
  if (a(this, H).moof.traf.tfdt.baseMediaDecodeTime = e, a(this, H).moof.traf.tfdt.extra.version === 1) {
2263
2264
  const i = Math.floor(e / 4294967296), n = (e & 4294967295) >>> 0;
2264
- t.setUint32(a(this, H).moof.traf.tfdt.byteOffset - a(this, Se).byteOffset, i), t.setUint32(a(this, H).moof.traf.tfdt.byteOffset - a(this, Se).byteOffset + 4, n);
2265
+ t.setUint32(a(this, H).moof.traf.tfdt.byteOffset - a(this, ve).byteOffset, i), t.setUint32(a(this, H).moof.traf.tfdt.byteOffset - a(this, ve).byteOffset + 4, n);
2265
2266
  } else
2266
- t.setUint32(a(this, H).moof.traf.tfdt.byteOffset - a(this, Se).byteOffset, e);
2267
+ t.setUint32(a(this, H).moof.traf.tfdt.byteOffset - a(this, ve).byteOffset, e);
2267
2268
  }
2268
2269
  producerReferenceTime() {
2269
2270
  if (a(this, H).prft)
@@ -2318,8 +2319,8 @@ const hu = class hu {
2318
2319
  return ((e = a(this, H).moof.traf.trun) == null ? void 0 : e.samplesCount) || 0;
2319
2320
  }
2320
2321
  sample(e) {
2321
- var v, I, k, D, T, P, R, X, Q, Fe, te, Ze, ht, Be, y;
2322
- const t = (v = a(this, Re).init().moov.traks[0]) == null ? void 0 : v.mdia.minf.stbl.stsd.codec, i = ((I = a(this, H).moof.traf.trun) == null ? void 0 : I.samplesCount) || 0, n = (k = a(this, H).moof.traf.tfdt) == null ? void 0 : k.baseMediaDecodeTime;
2322
+ var S, I, k, D, T, P, R, X, Q, Fe, te, Ze, ht, Be, y;
2323
+ const t = (S = a(this, Re).init().moov.traks[0]) == null ? void 0 : S.mdia.minf.stbl.stsd.codec, i = ((I = a(this, H).moof.traf.trun) == null ? void 0 : I.samplesCount) || 0, n = (k = a(this, H).moof.traf.tfdt) == null ? void 0 : k.baseMediaDecodeTime;
2323
2324
  if (e >= i || typeof n == "undefined" || !t)
2324
2325
  return;
2325
2326
  const o = this.compositionTimeOffset(e), c = ((D = a(this, H).moof.traf.trun) == null ? void 0 : D.sampleDurations[e]) || 0, h = ((T = a(this, H).moof.traf.trun) == null ? void 0 : T.sampleDurations.slice(0, e).reduce((E, F) => E + F, 0)) || 0, u = n + h, m = ((P = a(this, Re).init().moov.traks[0]) == null ? void 0 : P.mdia.mdhd.timescale) || 1e3, p = ((R = a(this, H).moof.traf.trun) == null ? void 0 : R.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((E, F) => E + 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;
@@ -2355,10 +2356,10 @@ const hu = class hu {
2355
2356
  * @returns the raw bytes of the cmaf fragment
2356
2357
  */
2357
2358
  rawBytes() {
2358
- return a(this, Se);
2359
+ return a(this, ve);
2359
2360
  }
2360
2361
  };
2361
- Se = new WeakMap(), Re = new WeakMap(), H = new WeakMap();
2362
+ ve = new WeakMap(), Re = new WeakMap(), H = new WeakMap();
2362
2363
  let lh = hu;
2363
2364
  var Zs;
2364
2365
  class Ou {
@@ -2691,14 +2692,14 @@ const ne = (s, e, t) => {
2691
2692
  for (const u of e.samples)
2692
2693
  n && (s.writer.writeUint32(u.duration), s.writer.writeUint32(u.data.byteLength), s.writer.writeUint32(qc(u))), t && s.writer.writeUint32(u.compositionTimeOffset || 0);
2693
2694
  s.writer.writeUint32At(h, s.writer.position() - s.moofOffset + 8), s.writer.writeUint32At(c, s.writer.position() - c);
2694
- }, qc = (s) => s.isSync ? 33554432 : 16842752, Sp = (s, e) => {
2695
+ }, qc = (s) => s.isSync ? 33554432 : 16842752, vp = (s, e) => {
2695
2696
  const t = s.writer.position();
2696
2697
  ne(s, j.traf, 0), wp(s, e), bp(s, e), yp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2697
- }, vp = (s, e) => {
2698
+ }, Sp = (s, e) => {
2698
2699
  ae(s, j.mfhd, 4, 0, 0), s.writer.writeUint32(e);
2699
2700
  }, Ep = (s, e) => {
2700
2701
  const t = s.writer.position();
2701
- ne(s, j.moof, 0), vp(s, e.sequenceNumber), Sp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2702
+ ne(s, j.moof, 0), Sp(s, e.sequenceNumber), vp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2702
2703
  }, Tp = (s, e) => {
2703
2704
  const t = e.samples.reduce((i, n) => i + n.data.byteLength, 0);
2704
2705
  ne(s, j.mdat, t), e.samples.forEach((i) => s.writer.writeBytes(i.data));
@@ -2710,7 +2711,7 @@ const ne = (s, e, t) => {
2710
2711
  const e = new zd();
2711
2712
  return ((t = s.samples[0]) == null ? void 0 : t.producerReferenceTime) !== void 0 && Yf(e, s.trackId, s.samples[0].producerReferenceTime, s.timestamp), e.moofOffset = e.writer.position(), Ep(e, s), Tp(e, s), e.writer.buffer();
2712
2713
  }, Ip = (s, e) => {
2713
- const t = s.map((c) => M(S({}, c), {
2714
+ const t = s.map((c) => M(v({}, c), {
2714
2715
  data: new Uint8Array(c.data)
2715
2716
  }));
2716
2717
  if (!t[0])
@@ -2742,7 +2743,7 @@ const ne = (s, e, t) => {
2742
2743
  throw new Error("No sps or pps provided");
2743
2744
  return kf(i);
2744
2745
  }, kp = (s, e) => {
2745
- const t = s.map((h) => M(S({}, h), {
2746
+ const t = s.map((h) => M(v({}, h), {
2746
2747
  data: new Uint8Array(h.data)
2747
2748
  }));
2748
2749
  if (!t[0])
@@ -2783,7 +2784,7 @@ const ne = (s, e, t) => {
2783
2784
  sampleRate: 48e3
2784
2785
  }
2785
2786
  ]), Up = (s, e) => {
2786
- const t = s.map((c) => M(S({}, c), {
2787
+ const t = s.map((c) => M(v({}, c), {
2787
2788
  data: new Uint8Array(c.data)
2788
2789
  }));
2789
2790
  if (!t[0])
@@ -2854,7 +2855,7 @@ const ne = (s, e, t) => {
2854
2855
  u && s.readBit() !== 0 && s.readBits(4), g.push({ tier: _e, operatingPointIdc: J, seqLevelIdx: ce });
2855
2856
  }
2856
2857
  }
2857
- const w = s.readBits(4) + 1, b = s.readBits(4) + 1, v = s.readBits(w) + 1, I = s.readBits(b) + 1;
2858
+ const w = s.readBits(4) + 1, b = s.readBits(4) + 1, S = s.readBits(w) + 1, I = s.readBits(b) + 1;
2858
2859
  let k = !1;
2859
2860
  n ? k = !1 : k = s.readBit() !== 0, k && (m = s.readBits(4) + 2, p = s.readBits(3) + 1);
2860
2861
  const D = s.readBit() !== 0, T = s.readBit() !== 0, P = s.readBit() !== 0;
@@ -2877,7 +2878,7 @@ const ne = (s, e, t) => {
2877
2878
  operatingPoints: g,
2878
2879
  frameWidthBits: w,
2879
2880
  frameHeightBits: b,
2880
- maxFrameWidth: v,
2881
+ maxFrameWidth: S,
2881
2882
  maxFrameHeight: I,
2882
2883
  frameIdNumbersPresentFlag: k,
2883
2884
  deltaFrameIdLength: m,
@@ -2906,8 +2907,8 @@ const ne = (s, e, t) => {
2906
2907
  let i = 8, n = !1;
2907
2908
  e === 2 && t ? i = s.readBit() !== 0 ? 12 : 10 : e <= 2 && (i = t ? 10 : 8), e === 1 ? n = !1 : n = s.readBit() !== 0;
2908
2909
  const o = n ? 1 : 3, c = s.readBit() !== 0;
2909
- let h = Mp, u = Fp, m = Vp, p = !1, g = 0, w = 0, b = _u, v = !1;
2910
- return c && (h = s.readBits(8), u = s.readBits(8), m = s.readBits(8)), n ? (p = s.readBit() !== 0, g = 1, w = 1, b = _u, v = !1, {
2910
+ let h = Mp, u = Fp, m = Vp, p = !1, g = 0, w = 0, b = _u, S = !1;
2911
+ return c && (h = s.readBits(8), u = s.readBits(8), m = s.readBits(8)), n ? (p = s.readBit() !== 0, g = 1, w = 1, b = _u, S = !1, {
2911
2912
  highBitDepth: t,
2912
2913
  bitDepth: i,
2913
2914
  monoChrome: n,
@@ -2916,7 +2917,7 @@ const ne = (s, e, t) => {
2916
2917
  colorRange: p,
2917
2918
  matrixCoefficients: m,
2918
2919
  numPlanes: o,
2919
- separateUvDeltaQ: v,
2920
+ separateUvDeltaQ: S,
2920
2921
  subsamplingX: g,
2921
2922
  subsamplingY: w,
2922
2923
  transferCharacteristics: u
@@ -2929,11 +2930,11 @@ const ne = (s, e, t) => {
2929
2930
  colorRange: p,
2930
2931
  matrixCoefficients: m,
2931
2932
  numPlanes: o,
2932
- separateUvDeltaQ: v,
2933
+ separateUvDeltaQ: S,
2933
2934
  subsamplingX: g,
2934
2935
  subsamplingY: w,
2935
2936
  transferCharacteristics: u
2936
- }) : (p = s.readBit() !== 0, e === 0 ? (g = 1, w = 1) : e === 1 ? (g = 0, w = 0) : i === 12 ? (g = s.readBit(), g !== 0 ? w = s.readBit() : w = 0) : (g = 1, w = 0), g !== 0 && w !== 0 && (b = s.readBits(2)), v = s.readBit() !== 0, {
2937
+ }) : (p = s.readBit() !== 0, e === 0 ? (g = 1, w = 1) : e === 1 ? (g = 0, w = 0) : i === 12 ? (g = s.readBit(), g !== 0 ? w = s.readBit() : w = 0) : (g = 1, w = 0), g !== 0 && w !== 0 && (b = s.readBits(2)), S = s.readBit() !== 0, {
2937
2938
  highBitDepth: t,
2938
2939
  bitDepth: i,
2939
2940
  monoChrome: n,
@@ -2942,7 +2943,7 @@ const ne = (s, e, t) => {
2942
2943
  colorRange: p,
2943
2944
  matrixCoefficients: m,
2944
2945
  numPlanes: o,
2945
- separateUvDeltaQ: v,
2946
+ separateUvDeltaQ: S,
2946
2947
  subsamplingX: g,
2947
2948
  subsamplingY: w,
2948
2949
  transferCharacteristics: u
@@ -2955,7 +2956,7 @@ const ne = (s, e, t) => {
2955
2956
  height: e.maxFrameHeight
2956
2957
  };
2957
2958
  }, zp = (s, e) => {
2958
- const t = s.map((h) => M(S({}, h), {
2959
+ const t = s.map((h) => M(v({}, h), {
2959
2960
  data: new Uint8Array(h.data)
2960
2961
  }));
2961
2962
  if (!t[0])
@@ -3113,10 +3114,10 @@ class Nu {
3113
3114
  }
3114
3115
  }
3115
3116
  ni = new WeakMap(), Dt = new WeakMap();
3116
- var Ss, Zd, fh;
3117
+ var vs, Zd, fh;
3117
3118
  class qd {
3118
3119
  constructor() {
3119
- d(this, Ss);
3120
+ d(this, vs);
3120
3121
  }
3121
3122
  parse(e) {
3122
3123
  const t = [], i = e.split(ag), n = new Nu(i), o = n.readLine();
@@ -3125,13 +3126,13 @@ class qd {
3125
3126
  for (; n.readLine() !== ""; )
3126
3127
  ;
3127
3128
  for (; n.linesLeft() > 0; ) {
3128
- const c = A(this, Ss, Zd).call(this, n);
3129
+ const c = A(this, vs, Zd).call(this, n);
3129
3130
  c && t.push(c), n.skipEmptyLines();
3130
3131
  }
3131
3132
  return t;
3132
3133
  }
3133
3134
  }
3134
- Ss = new WeakSet(), Zd = function(e) {
3135
+ vs = new WeakSet(), Zd = function(e) {
3135
3136
  e.skipEmptyLines();
3136
3137
  const t = e.takeUntilEmptyLine(), i = new Nu(t);
3137
3138
  let n = i.readLine(), o;
@@ -3148,7 +3149,7 @@ Ss = new WeakSet(), Zd = function(e) {
3148
3149
  const p = i.readLine();
3149
3150
  if (!p)
3150
3151
  throw new Error("missing text");
3151
- const g = A(this, Ss, fh).call(this, c), w = A(this, Ss, fh).call(this, u);
3152
+ const g = A(this, vs, fh).call(this, c), w = A(this, vs, fh).call(this, u);
3152
3153
  return {
3153
3154
  id: o,
3154
3155
  startTime: g,
@@ -3169,7 +3170,7 @@ const og = (s) => {
3169
3170
  e.vindralInstances = e.vindralInstances || {}, e.vindralInstances[s.getStatistics().clientId.substring(0, 8)] = s;
3170
3171
  };
3171
3172
  class ph extends Ei {
3172
- constructor({ type: t, autoplay: i, muted: n, logger: o, poster: c }) {
3173
+ constructor({ type: t, autoplay: i, muted: n, volume: o, logger: c, poster: h }) {
3173
3174
  super();
3174
3175
  r(this, "element");
3175
3176
  r(this, "logger");
@@ -3280,11 +3281,11 @@ class ph extends Ei {
3280
3281
  r(this, "onSeekEnd", () => {
3281
3282
  this.seekStartTime && (this.seekTimes.push(Date.now() - this.seekStartTime), this.seekStartTime = void 0);
3282
3283
  });
3283
- this.logger = o, this._userProvidedMuted = n, this.element = document.createElement(t), this.element instanceof HTMLVideoElement && (this.element.playsInline = !0), this.element.controls = !1, this.element.autoplay = i, this.element.muted = n, this.element.style.display = "block", this.element.style.width = "100%", this.element.disableRemotePlayback = !0, this.element.setAttribute(
3284
+ this.logger = c, this._userProvidedMuted = n, this.element = document.createElement(t), this.element instanceof HTMLVideoElement && (this.element.playsInline = !0), this.element.controls = !1, this.element.autoplay = i, this.element.muted = n, o !== void 0 && (this.element.volume = o), this.element.style.display = "block", this.element.style.width = "100%", this.element.disableRemotePlayback = !0, this.element.setAttribute(
3284
3285
  "poster",
3285
3286
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg=="
3286
3287
  ), this.onPlayPause(), setTimeout(() => {
3287
- !this.element || !c || this.element.setAttribute("poster", c);
3288
+ !this.element || !h || this.element.setAttribute("poster", h);
3288
3289
  }, 0), this.element.addEventListener("stalled", this.onEvent), this.element.addEventListener("canplay", this.onEvent), this.element.addEventListener("loadeddata", this.onEvent), this.element.addEventListener("loadedmetadata", this.onEvent), this.element.addEventListener("canplaythrough", this.onEvent), this.element.addEventListener("waiting", this.onEvent), this.element.addEventListener("playing", this.onPlayPause), this.element.addEventListener("pause", this.onPlayPause), this.element.addEventListener("seeked", this.onSeekEnd), this.element.addEventListener("seeking", this.onSeekStart), this.element.addEventListener("volumechange", this.onVolumeChange), this.element.addEventListener("timeupdate", this.onBufferStateChange), this.element.addEventListener("progress", this.onBufferStateChange);
3289
3290
  }
3290
3291
  get seekTime() {
@@ -3420,7 +3421,7 @@ const cg = (s) => {
3420
3421
  const { bufferFullness: t, general: i } = this.qualityOfServiceSource.getMetrics(), n = this.qualityOfServiceSource.getBufferFullnessRegression();
3421
3422
  if (!n)
3422
3423
  return;
3423
- const o = 10 * 1e3, c = 30 * 1e3, { slope: h } = n, u = n.predict(Jc), m = h < 0, p = n.predict(Jc) < Vu && n.slope < 0, g = n.predict(Jc) > lg, w = this.qualityOfServiceSource.timeSpentBufferingLast(c), b = this.qualityOfServiceSource.timeSpentActiveLast(c), v = this.qualityOfServiceSource.bufferingEventsLast(c), I = b > 0 ? w / b : 0, k = this.qualityOfServiceSource.getTargetBufferTime();
3424
+ const o = 10 * 1e3, c = 30 * 1e3, { slope: h } = n, u = n.predict(Jc), m = h < 0, p = n.predict(Jc) < Vu && n.slope < 0, g = n.predict(Jc) > lg, w = this.qualityOfServiceSource.timeSpentBufferingLast(c), b = this.qualityOfServiceSource.timeSpentActiveLast(c), S = this.qualityOfServiceSource.bufferingEventsLast(c), I = b > 0 ? w / b : 0, k = this.qualityOfServiceSource.getTargetBufferTime();
3424
3425
  if (t < 0.15 && I > 0.8) {
3425
3426
  this.adaptLevel("reconnect");
3426
3427
  return;
@@ -3434,7 +3435,7 @@ const cg = (s) => {
3434
3435
  return;
3435
3436
  }
3436
3437
  if (k < 1e3) {
3437
- e.playbackState === "buffering" && (v > 5 || I > 0.3) && this.adaptLevel("downgrade");
3438
+ e.playbackState === "buffering" && (S > 5 || I > 0.3) && this.adaptLevel("downgrade");
3438
3439
  return;
3439
3440
  }
3440
3441
  (p || t < hg) && m && t < Vu && u < ug && this.adaptLevel(e.playbackState === "buffering" ? "double downgrade" : "downgrade");
@@ -3443,7 +3444,7 @@ const cg = (s) => {
3443
3444
  this.reset();
3444
3445
  });
3445
3446
  r(this, "adaptLevel", (e) => this.emitter.emit("adapt level", e));
3446
- this.qualityOfServiceSource = i, this.config = S(S({}, mg), n), this.emitter = e, this.logger = t;
3447
+ this.qualityOfServiceSource = i, this.config = v(v({}, mg), n), this.emitter = e, this.logger = t;
3447
3448
  }
3448
3449
  tooMuchTimeBuffering(e) {
3449
3450
  const t = this.qualityOfServiceSource.timeSpentActiveLast(e);
@@ -3508,10 +3509,10 @@ const fg = {
3508
3509
  this.targetBufferTimeTarget.targetBufferTime + m
3509
3510
  ), this.bufferTimeAdjustmentCount++, this.reset());
3510
3511
  });
3511
- this.qualityOfServiceSource = i, this.targetBufferTimeTarget = n, this.config = S(S({}, fg), o), this.emitter = e, this.logger = t;
3512
+ this.qualityOfServiceSource = i, this.targetBufferTimeTarget = n, this.config = v(v({}, fg), o), this.emitter = e, this.logger = t;
3512
3513
  }
3513
3514
  updateConfig(e) {
3514
- this.config = S(S({}, this.config), e);
3515
+ this.config = v(v({}, this.config), e);
3515
3516
  }
3516
3517
  };
3517
3518
  r(Yt, "BUFFER_TIME_STEP_SIZE", 500), r(Yt, "BUFFER_TIME_MAX_STEPS", 3), r(Yt, "create", (e, t, i, n, o = {}) => new Yt(e, t, i, n, o));
@@ -3599,10 +3600,10 @@ class pg {
3599
3600
  }
3600
3601
  }
3601
3602
  pt = new WeakMap(), Js = new WeakMap(), $s = new WeakMap(), zr = new WeakMap(), Hr = new WeakMap(), Ys = new WeakMap(), Qr = new WeakMap(), Xr = new WeakMap();
3602
- var gt, Ks, qr, Zr, en, vs, $d, wh;
3603
+ var gt, Ks, qr, Zr, en, Ss, $d, wh;
3603
3604
  class gg {
3604
3605
  constructor(e, t, i, n, o) {
3605
- d(this, vs);
3606
+ d(this, Ss);
3606
3607
  d(this, gt);
3607
3608
  d(this, Ks);
3608
3609
  d(this, qr);
@@ -3617,7 +3618,7 @@ class gg {
3617
3618
  return a(this, en);
3618
3619
  }
3619
3620
  groups() {
3620
- return A(this, vs, $d).call(this);
3621
+ return A(this, Ss, $d).call(this);
3621
3622
  }
3622
3623
  subscribeId() {
3623
3624
  return a(this, Ks);
@@ -3631,13 +3632,13 @@ class gg {
3631
3632
  return this;
3632
3633
  }
3633
3634
  [kt()]() {
3634
- return A(this, vs, wh).call(this);
3635
+ return A(this, Ss, wh).call(this);
3635
3636
  }
3636
3637
  [Symbol.asyncDispose]() {
3637
- return A(this, vs, wh).call(this);
3638
+ return A(this, Ss, wh).call(this);
3638
3639
  }
3639
3640
  }
3640
- gt = new WeakMap(), Ks = new WeakMap(), qr = new WeakMap(), Zr = new WeakMap(), en = new WeakMap(), vs = new WeakSet(), $d = function() {
3641
+ gt = new WeakMap(), Ks = new WeakMap(), qr = new WeakMap(), Zr = new WeakMap(), en = new WeakMap(), Ss = new WeakSet(), $d = function() {
3641
3642
  return Rt(this, null, function* () {
3642
3643
  for (; !(yield new q(a(this, gt).isDone())); ) {
3643
3644
  const e = yield new q(a(this, gt).readBigVarInt()), t = new pg(
@@ -4002,7 +4003,7 @@ const kr = class kr {
4002
4003
  };
4003
4004
  Ue = new WeakMap(), Le = new WeakMap(), Xi = new WeakMap(), Yo = new WeakMap(), r(kr, "DEFAULT_BUFFER_SIZE", 1024);
4004
4005
  let xr = kr;
4005
- const il = 2 ** 6 - 1, sl = 2 ** 14 - 1, nl = 2 ** 30 - 1, yg = Number.MAX_SAFE_INTEGER, Sg = typeof BigInt == "function" ? U(2) ** U(62) - U(1) : U(Number.MAX_SAFE_INTEGER);
4006
+ const il = 2 ** 6 - 1, sl = 2 ** 14 - 1, nl = 2 ** 30 - 1, yg = Number.MAX_SAFE_INTEGER, vg = typeof BigInt == "function" ? U(2) ** U(62) - U(1) : U(Number.MAX_SAFE_INTEGER);
4006
4007
  function Gc(s, e) {
4007
4008
  return e[0] = s, e.subarray(0, 1);
4008
4009
  }
@@ -4040,7 +4041,7 @@ function ul(s, e) {
4040
4041
  return rl(Number(s) | 16384, e);
4041
4042
  if (s <= nl)
4042
4043
  return al(Number(s) | 2147483648, e);
4043
- if (s <= Sg)
4044
+ if (s <= vg)
4044
4045
  return typeof BigInt == "function" ? ol(BigInt(s) | BigInt(3221225472) << BigInt(32), e) : cl(Number(s), e);
4045
4046
  throw new Error(`overflow, value larger than 62-bits: ${s}`);
4046
4047
  }
@@ -4081,7 +4082,7 @@ function $n(s, e) {
4081
4082
  yield s.writeBigVarInt(t), yield s.writeVarInt(i.payload.length), yield s.write(i.payload);
4082
4083
  });
4083
4084
  }
4084
- function vg(s) {
4085
+ function Sg(s) {
4085
4086
  return f(this, null, function* () {
4086
4087
  return {
4087
4088
  type: C.Announce,
@@ -4382,7 +4383,7 @@ function Hg(s, e) {
4382
4383
  yield s.writeBigVarInt(e.id);
4383
4384
  });
4384
4385
  }
4385
- var Mt, on, ee, gl, Al, wl, bl, yl, Sl, vl, El, Tl, Il;
4386
+ var Mt, on, ee, gl, Al, wl, bl, yl, vl, Sl, El, Tl, Il;
4386
4387
  class pl {
4387
4388
  constructor(e) {
4388
4389
  d(this, ee);
@@ -4414,13 +4415,13 @@ class pl {
4414
4415
  yield A(this, ee, bl).call(this, t, e);
4415
4416
  break;
4416
4417
  case C.SubscribeUpdate:
4417
- yield A(this, ee, Sl).call(this, t, e);
4418
+ yield A(this, ee, vl).call(this, t, e);
4418
4419
  break;
4419
4420
  case C.SubscribeError:
4420
4421
  yield A(this, ee, yl).call(this, t, e);
4421
4422
  break;
4422
4423
  case C.SubscribeDone:
4423
- yield A(this, ee, vl).call(this, t, e);
4424
+ yield A(this, ee, Sl).call(this, t, e);
4424
4425
  break;
4425
4426
  case C.Unsubscribe:
4426
4427
  yield A(this, ee, El).call(this, t, e);
@@ -4466,11 +4467,11 @@ Mt = new WeakMap(), on = new WeakMap(), ee = new WeakSet(), gl = function(e, t)
4466
4467
  return f(this, null, function* () {
4467
4468
  yield Dg(e, t);
4468
4469
  });
4469
- }, Sl = function(e, t) {
4470
+ }, vl = function(e, t) {
4470
4471
  return f(this, null, function* () {
4471
4472
  yield _g(e, t);
4472
4473
  });
4473
- }, vl = function(e, t) {
4474
+ }, Sl = function(e, t) {
4474
4475
  return f(this, null, function* () {
4475
4476
  yield xg(e, t);
4476
4477
  });
@@ -4554,7 +4555,7 @@ class Gu {
4554
4555
  case C.Unsubscribe:
4555
4556
  return zg(a(this, he));
4556
4557
  case C.Announce:
4557
- return vg(a(this, he));
4558
+ return Sg(a(this, he));
4558
4559
  case C.AnnounceOk:
4559
4560
  return Tg(a(this, he));
4560
4561
  case C.AnnounceError:
@@ -4811,9 +4812,9 @@ oa = new WeakMap(), We = new WeakMap(), ca = new WeakMap(), ha = new WeakMap(),
4811
4812
  break;
4812
4813
  const w = yield a(this, ca).openSendStream();
4813
4814
  const b = new Yg(w);
4814
- const v = Ve(e, new eA(b, p.consume(), a(this, We)), !0);
4815
- yield v.run();
4816
- l(this, mn, v.finalGroup());
4815
+ const S = Ve(e, new eA(b, p.consume(), a(this, We)), !0);
4816
+ yield S.run();
4817
+ l(this, mn, S.finalGroup());
4817
4818
  } catch (t) {
4818
4819
  var i = t, n = !0;
4819
4820
  } finally {
@@ -4946,7 +4947,7 @@ ma = new WeakMap(), $i = new WeakMap(), oi = new WeakSet(), Ps = function(e, t)
4946
4947
  };
4947
4948
  var od, gn, fa, An, Yi, ci, hi, ui, nh;
4948
4949
  od = [Pe({ context: "Session", enter: "info", error: "error" })];
4949
- class Sh {
4950
+ class vh {
4950
4951
  constructor(e, t, i) {
4951
4952
  ki(nh, 5, this);
4952
4953
  d(this, gn);
@@ -5022,7 +5023,7 @@ class Sh {
5022
5023
  });
5023
5024
  }
5024
5025
  }
5025
- nh = Ci(null), gn = new WeakMap(), fa = new WeakMap(), An = new WeakMap(), Yi = new WeakMap(), ci = new WeakMap(), hi = new WeakMap(), ui = new WeakMap(), ye(nh, 1, "announce", od, Sh), Zt(nh, Sh);
5026
+ nh = Ci(null), gn = new WeakMap(), fa = new WeakMap(), An = new WeakMap(), Yi = new WeakMap(), ci = new WeakMap(), hi = new WeakMap(), ui = new WeakMap(), ye(nh, 1, "announce", od, vh), Zt(nh, vh);
5026
5027
  function iA(s, e) {
5027
5028
  const t = new Mo(e), [i, n] = tu(100), o = new sA(t, i), c = new Rl(s, t, n);
5028
5029
  return [o, c];
@@ -5052,11 +5053,11 @@ class sA {
5052
5053
  }
5053
5054
  }
5054
5055
  Ki = new WeakMap();
5055
- var cd, wn, le, bn, yn, rh, Sn, nr;
5056
+ var cd, wn, le, bn, yn, rh, vn, nr;
5056
5057
  class Rl {
5057
5058
  constructor(e, t, i) {
5058
5059
  ki(rh, 5, this);
5059
- d(this, Sn);
5060
+ d(this, vn);
5060
5061
  d(this, wn);
5061
5062
  d(this, le);
5062
5063
  d(this, bn);
@@ -5132,7 +5133,7 @@ class Rl {
5132
5133
  return Rt(this, null, function* () {
5133
5134
  var e, t;
5134
5135
  try {
5135
- for (var b = $(a(this, bn)), v, I, k; v = !(I = yield new q(b.next())).done; v = !1) {
5136
+ for (var b = $(a(this, bn)), S, I, k; S = !(I = yield new q(b.next())).done; S = !1) {
5136
5137
  var h = I.value;
5137
5138
  var u = [];
5138
5139
  try {
@@ -5168,7 +5169,7 @@ class Rl {
5168
5169
  k = [I];
5169
5170
  } finally {
5170
5171
  try {
5171
- v && (I = b.return) && (yield new q(I.call(b)));
5172
+ S && (I = b.return) && (yield new q(I.call(b)));
5172
5173
  } finally {
5173
5174
  if (k)
5174
5175
  throw k[0];
@@ -5216,17 +5217,17 @@ class Rl {
5216
5217
  });
5217
5218
  }
5218
5219
  [(cd = [Pe({ context: "SubscriptionConsumer", enter: "info" })], kt())]() {
5219
- return A(this, Sn, nr).call(this);
5220
+ return A(this, vn, nr).call(this);
5220
5221
  }
5221
5222
  [Symbol.asyncDispose]() {
5222
- return A(this, Sn, nr).call(this);
5223
+ return A(this, vn, nr).call(this);
5223
5224
  }
5224
5225
  }
5225
- rh = Ci(null), wn = new WeakMap(), le = new WeakMap(), bn = new WeakMap(), yn = new WeakMap(), Sn = new WeakSet(), nr = function() {
5226
+ rh = Ci(null), wn = new WeakMap(), le = new WeakMap(), bn = new WeakMap(), yn = new WeakMap(), vn = new WeakSet(), nr = function() {
5226
5227
  return f(this, null, function* () {
5227
5228
  return yield this.close(), this.unsubscribe();
5228
5229
  });
5229
- }, nr = ye(rh, 17, "#dispose", cd, Sn, nr), Zt(rh, Rl);
5230
+ }, nr = ye(rh, 17, "#dispose", cd, vn, nr), Zt(rh, Rl);
5230
5231
  const nA = 2e3;
5231
5232
  var hd, ud, dd, ld, Ft, De, es, ts, Rs, Ct, ro, xs;
5232
5233
  ld = [Pe({ context: "Session", return: "debug" })], dd = [Pe({ context: "Session", enter: "info", error: "error" })], ud = [Pe({ context: "Session", enter: "debug" })], hd = [Pe({ context: "Session", enter: "debug" })];
@@ -5339,7 +5340,7 @@ Rs = Ci(null), Ft = new WeakMap(), De = new WeakMap(), es = new WeakMap(), ts =
5339
5340
  }, xs = function(e) {
5340
5341
  a(this, De).isClosed() || a(this, De).update((t) => (t.delete(e), t));
5341
5342
  }, ro = ye(Rs, 17, "#observeChanges", ld, Ct, ro), ye(Rs, 1, "subscribe", dd, no), ye(Rs, 1, "close", ud, no), xs = ye(Rs, 17, "#deleteSubscription", hd, Ct, xs), Zt(Rs, no);
5342
- var md, fd, pd, gd, nt, pa, is, vn, En, ue, Ul, Pl, Us, ao, oo, co, rr;
5343
+ var md, fd, pd, gd, nt, pa, is, Sn, En, ue, Ul, Pl, Us, ao, oo, co, rr;
5343
5344
  class ru {
5344
5345
  constructor(e, t) {
5345
5346
  ki(Us, 5, this);
@@ -5350,12 +5351,12 @@ class ru {
5350
5351
  d(this, pa);
5351
5352
  // Outgoing messages
5352
5353
  d(this, is);
5353
- d(this, vn, ge.get().createContext("Session"));
5354
+ d(this, Sn, ge.get().createContext("Session"));
5354
5355
  r(this, "subscriber");
5355
5356
  r(this, "publisher");
5356
5357
  d(this, En);
5357
5358
  const [i, n] = tu(100);
5358
- l(this, nt, e), l(this, is, n), this.subscriber = new no(this, i), this.publisher = new Sh(this, e, i), l(this, pa, A(this, ue, Pl).call(this)), l(this, En, new Ie(t)), this.closed().then(() => this.close()).catch(O);
5359
+ l(this, nt, e), l(this, is, n), this.subscriber = new no(this, i), this.publisher = new vh(this, e, i), l(this, pa, A(this, ue, Pl).call(this)), l(this, En, new Ie(t)), this.closed().then(() => this.close()).catch(O);
5359
5360
  }
5360
5361
  updateAuthToken(e) {
5361
5362
  a(this, En).update(e);
@@ -5376,7 +5377,7 @@ class ru {
5376
5377
  try {
5377
5378
  this.subscriber.close(), this.publisher.close(), a(this, is).cancel("closing"), a(this, nt).close();
5378
5379
  } catch (e) {
5379
- a(this, vn).warn("Error closing session", e);
5380
+ a(this, Sn).warn("Error closing session", e);
5380
5381
  }
5381
5382
  }
5382
5383
  [(gd = [Pe({ context: "Session", return: "info", error: "error" })], pd = [Pe({ context: "Session", return: "info", error: "error" })], fd = [Pe({ context: "Session", return: "info", error: "error" })], md = [Pe({ context: "Session", enter: "debug" })], kd())]() {
@@ -5386,10 +5387,10 @@ class ru {
5386
5387
  A(this, ue, rr).call(this);
5387
5388
  }
5388
5389
  }
5389
- Us = Ci(null), nt = new WeakMap(), pa = new WeakMap(), is = new WeakMap(), vn = new WeakMap(), En = new WeakMap(), ue = new WeakSet(), Ul = function(e) {
5390
+ Us = Ci(null), nt = new WeakMap(), pa = new WeakMap(), is = new WeakMap(), Sn = new WeakMap(), En = new WeakMap(), ue = new WeakSet(), Ul = function(e) {
5390
5391
  return f(this, null, function* () {
5391
5392
  var t, i;
5392
- switch (a(this, vn).debug("received message", e), yield (t = this.subscriber) == null ? void 0 : t.onMessage(e), yield (i = this.publisher) == null ? void 0 : i.onMessage(e), e.type) {
5393
+ switch (a(this, Sn).debug("received message", e), yield (t = this.subscriber) == null ? void 0 : t.onMessage(e), yield (i = this.publisher) == null ? void 0 : i.onMessage(e), e.type) {
5393
5394
  case C.Goaway:
5394
5395
  break;
5395
5396
  }
@@ -5404,7 +5405,7 @@ Us = Ci(null), nt = new WeakMap(), pa = new WeakMap(), is = new WeakMap(), vn =
5404
5405
  try {
5405
5406
  for (var e = $(a(this, is)), t, i, n; t = !(i = yield e.next()).done; t = !1) {
5406
5407
  const o = i.value;
5407
- a(this, vn).debug("sending message", o), yield a(this, nt).writeMessage(o);
5408
+ a(this, Sn).debug("sending message", o), yield a(this, nt).writeMessage(o);
5408
5409
  }
5409
5410
  } catch (i) {
5410
5411
  n = [i];
@@ -5785,10 +5786,10 @@ function mA(s) {
5785
5786
  const e = new TextDecoder().decode(s);
5786
5787
  return JSON.parse(e);
5787
5788
  }
5788
- var Oe, yt, rs, He, Sa, ac, va, vh;
5789
+ var Oe, yt, rs, He, va, ac, Sa, Sh;
5789
5790
  const uu = class uu {
5790
5791
  constructor(e, t) {
5791
- d(this, va);
5792
+ d(this, Sa);
5792
5793
  d(this, Oe);
5793
5794
  // The largest group id seen so far - used to switch seamlessly between tracks
5794
5795
  d(this, yt);
@@ -5796,19 +5797,19 @@ const uu = class uu {
5796
5797
  d(this, rs, new oe(100));
5797
5798
  // This contains the unconsumed groups if this track has an absolute range
5798
5799
  d(this, He);
5799
- d(this, Sa);
5800
+ d(this, va);
5800
5801
  d(this, ac, (e) => f(this, null, function* () {
5801
5802
  if (!e)
5802
5803
  return a(this, Oe).close();
5803
5804
  if (a(this, He))
5804
5805
  return;
5805
5806
  const t = a(this, rs).items().reduce((i, n) => i < n ? i : n, e);
5806
- l(this, He, A(this, va, vh).call(this, t, e)), a(this, He).size === 0 && (yield a(this, Oe).close());
5807
+ l(this, He, A(this, Sa, Sh).call(this, t, e)), a(this, He).size === 0 && (yield a(this, Oe).close());
5807
5808
  }));
5808
5809
  l(this, Oe, e), l(this, yt, t), e.done().then((i) => f(this, null, function* () {
5809
5810
  var n;
5810
5811
  return a(this, ac).call(this, (n = i.finalInfo) == null ? void 0 : n.group);
5811
- })).catch(O), l(this, Sa, e.groups());
5812
+ })).catch(O), l(this, va, e.groups());
5812
5813
  }
5813
5814
  static subscribe(e, t) {
5814
5815
  return f(this, null, function* () {
@@ -5839,7 +5840,7 @@ const uu = class uu {
5839
5840
  }
5840
5841
  update(e, t) {
5841
5842
  return f(this, null, function* () {
5842
- return l(this, He, A(this, va, vh).call(this, e, t)), a(this, He).size === 0 && (yield a(this, Oe).close()), a(this, Oe).update(e, t);
5843
+ return l(this, He, A(this, Sa, Sh).call(this, e, t)), a(this, He).size === 0 && (yield a(this, Oe).close()), a(this, Oe).update(e, t);
5843
5844
  });
5844
5845
  }
5845
5846
  unsubscribe() {
@@ -5850,7 +5851,7 @@ const uu = class uu {
5850
5851
  var i;
5851
5852
  if (a(this, He) && a(this, He).size === 0)
5852
5853
  return { done: !0, value: void 0 };
5853
- const e = yield a(this, Sa).next();
5854
+ const e = yield a(this, va).next();
5854
5855
  if (e.done)
5855
5856
  return e;
5856
5857
  const t = e.value.groupId();
@@ -5864,7 +5865,7 @@ const uu = class uu {
5864
5865
  return this;
5865
5866
  }
5866
5867
  };
5867
- Oe = new WeakMap(), yt = new WeakMap(), rs = new WeakMap(), He = new WeakMap(), Sa = new WeakMap(), ac = new WeakMap(), va = new WeakSet(), vh = function(e, t) {
5868
+ Oe = new WeakMap(), yt = new WeakMap(), rs = new WeakMap(), He = new WeakMap(), va = new WeakMap(), ac = new WeakMap(), Sa = new WeakSet(), Sh = function(e, t) {
5868
5869
  const i = /* @__PURE__ */ new Set();
5869
5870
  for (let n = e; n <= t; n++)
5870
5871
  i == null || i.add(n);
@@ -5873,7 +5874,7 @@ Oe = new WeakMap(), yt = new WeakMap(), rs = new WeakMap(), He = new WeakMap(),
5873
5874
  }), i;
5874
5875
  };
5875
5876
  let Fo = uu;
5876
- var rt, as, Wt, St, Ea, Eh, Ta;
5877
+ var rt, as, Wt, vt, Ea, Eh, Ta;
5877
5878
  const du = class du {
5878
5879
  constructor(e) {
5879
5880
  d(this, Ea);
@@ -5883,24 +5884,24 @@ const du = class du {
5883
5884
  d(this, as);
5884
5885
  // The next group iterators to switch to when the current one runs out
5885
5886
  d(this, Wt, new Mc(10));
5886
- d(this, St);
5887
+ d(this, vt);
5887
5888
  d(this, Ta, (e, t) => f(this, null, function* () {
5888
5889
  var g = [];
5889
5890
  try {
5890
5891
  const i = Ve(g, yield a(this, rt).lock());
5891
5892
  const n = { subscribeId: i.value.subscribeId() };
5892
5893
  if (!i.value.needsRenewal()) {
5893
- a(this, St).debug("Subscription does not need renewal", n);
5894
+ a(this, vt).debug("Subscription does not need renewal", n);
5894
5895
  return;
5895
5896
  }
5896
5897
  const o = i.value.largestGroupId();
5897
5898
  const c = o !== void 0;
5898
5899
  const h = new Xt().name(t.name).priority(t.priority).groupOrder(t.groupOrder);
5899
5900
  n.largestGroupId = o;
5900
- a(this, St).debug("Renewing subscription", n);
5901
+ a(this, vt).debug("Renewing subscription", n);
5901
5902
  switch (t.filterType.type) {
5902
5903
  case "absolute-range":
5903
- a(this, St).debug("Absolute range is not renewed", n);
5904
+ a(this, vt).debug("Absolute range is not renewed", n);
5904
5905
  return;
5905
5906
  case "absolute-start":
5906
5907
  case "latest-group":
@@ -5919,14 +5920,14 @@ const du = class du {
5919
5920
  const p = new Fo(m, o);
5920
5921
  i.value = p;
5921
5922
  yield a(this, Wt).push(p);
5922
- a(this, St).info("Subscription renewed", n);
5923
+ a(this, vt).info("Subscription renewed", n);
5923
5924
  } catch (w) {
5924
- var b = w, v = !0;
5925
+ var b = w, S = !0;
5925
5926
  } finally {
5926
- Ge(g, b, v);
5927
+ Ge(g, b, S);
5927
5928
  }
5928
5929
  }));
5929
- l(this, rt, new xm(e)), l(this, as, e), l(this, St, ge.get().createContext(`Renewable '${e.name()}'`));
5930
+ l(this, rt, new xm(e)), l(this, as, e), l(this, vt, ge.get().createContext(`Renewable '${e.name()}'`));
5930
5931
  }
5931
5932
  static subscribe(e, t, i) {
5932
5933
  return f(this, null, function* () {
@@ -6044,15 +6045,15 @@ const du = class du {
6044
6045
  });
6045
6046
  }
6046
6047
  };
6047
- rt = new WeakMap(), as = new WeakMap(), Wt = new WeakMap(), St = new WeakMap(), Ea = new WeakSet(), Eh = function(e) {
6048
+ rt = new WeakMap(), as = new WeakMap(), Wt = new WeakMap(), vt = new WeakMap(), Ea = new WeakSet(), Eh = function(e) {
6048
6049
  return f(this, null, function* () {
6049
6050
  var t;
6050
6051
  if (e.unsubscribed() || (t = e.range()) != null && t.endGroup) {
6051
- a(this, St).info("Server initiated subscribe done but the subscription is already closing");
6052
+ a(this, vt).info("Server initiated subscribe done but the subscription is already closing");
6052
6053
  return;
6053
6054
  }
6054
6055
  if (a(this, rt).unsafeValue().subscribeId() !== e.id) {
6055
- a(this, St).info("subscribeId mismatch - the subscription already has been renewed");
6056
+ a(this, vt).info("subscribeId mismatch - the subscription already has been renewed");
6056
6057
  return;
6057
6058
  }
6058
6059
  return this.return();
@@ -6143,7 +6144,7 @@ class pA {
6143
6144
  [Symbol.asyncIterator]() {
6144
6145
  return Rt(this, null, function* () {
6145
6146
  const e = { name: this.track.trackObject.name, namespace: this.track.namespace };
6146
- a(this, Un).debug("start", S({}, e));
6147
+ a(this, Un).debug("start", v({}, e));
6147
6148
  try {
6148
6149
  for (var t = $(a(this, Rn)), i, n, o; i = !(n = yield new q(t.next())).done; i = !1) {
6149
6150
  const c = n.value;
@@ -6154,7 +6155,7 @@ class pA {
6154
6155
  const b = this.track.timestampRange();
6155
6156
  if (b && m >= b[1])
6156
6157
  break;
6157
- a(this, Un).debug("fragment", M(S({}, e), {
6158
+ a(this, Un).debug("fragment", M(v({}, e), {
6158
6159
  startTime: m,
6159
6160
  endTime: g,
6160
6161
  subscribeId: c.subscribeId,
@@ -6173,7 +6174,7 @@ class pA {
6173
6174
  throw o[0];
6174
6175
  }
6175
6176
  }
6176
- a(this, Un).debug("end", S({}, e));
6177
+ a(this, Un).debug("end", v({}, e));
6177
6178
  });
6178
6179
  }
6179
6180
  [kt()]() {
@@ -6189,18 +6190,18 @@ Ba = new WeakMap(), Rn = new WeakMap(), Ra = new WeakMap(), Un = new WeakMap(),
6189
6190
  return yield (t = (e = a(this, Rn)).return) == null ? void 0 : t.call(e), Promise.resolve();
6190
6191
  });
6191
6192
  };
6192
- var Pa, vt, xa, La, hc, Ml;
6193
+ var Pa, St, xa, La, hc, Ml;
6193
6194
  const Vs = class Vs {
6194
6195
  constructor(e, t, i, n, o) {
6195
6196
  d(this, Pa);
6196
- d(this, vt);
6197
+ d(this, St);
6197
6198
  // A static offset that will be applied to all fragments
6198
6199
  d(this, xa);
6199
6200
  // Stop consuming the track after we have passed thig timestamp
6200
6201
  d(this, La);
6201
6202
  r(this, "trackObject");
6202
6203
  r(this, "namespace");
6203
- this.trackObject = e, this.namespace = t, l(this, vt, i), l(this, Pa, n), l(this, xa, o);
6204
+ this.trackObject = e, this.namespace = t, l(this, St, i), l(this, Pa, n), l(this, xa, o);
6204
6205
  }
6205
6206
  static subscribe(c, h, u) {
6206
6207
  return f(this, arguments, function* (e, t, {
@@ -6208,7 +6209,7 @@ const Vs = class Vs {
6208
6209
  startGroup: n,
6209
6210
  params: o
6210
6211
  }) {
6211
- var v;
6212
+ var S;
6212
6213
  if (t.format !== "cmaf")
6213
6214
  throw new Error("format must be cmaf");
6214
6215
  const m = new Xt().name(t.name);
@@ -6216,7 +6217,7 @@ const Vs = class Vs {
6216
6217
  const p = m.build();
6217
6218
  if (t.initTrack) {
6218
6219
  const I = new Xt().name(t.initTrack).build(), [k, D] = yield Promise.all([
6219
- A(v = Vs, hc, Ml).call(v, e, I),
6220
+ A(S = Vs, hc, Ml).call(S, e, I),
6220
6221
  Ii.subscribe(e, p, { params: o, largestGroupId: n ? n - U(1) : void 0 })
6221
6222
  ]), T = new Ou(k);
6222
6223
  return new Vs(t, e.namespace(), D, T, i);
@@ -6230,7 +6231,7 @@ const Vs = class Vs {
6230
6231
  });
6231
6232
  }
6232
6233
  largestGroupId() {
6233
- return a(this, vt).largestGroupId();
6234
+ return a(this, St).largestGroupId();
6234
6235
  }
6235
6236
  stopAfterTimestampReached(e) {
6236
6237
  l(this, La, [0, e]);
@@ -6239,19 +6240,19 @@ const Vs = class Vs {
6239
6240
  return a(this, La);
6240
6241
  }
6241
6242
  endOfTrack(e) {
6242
- return a(this, vt).endOfTrack(e);
6243
+ return a(this, St).endOfTrack(e);
6243
6244
  }
6244
6245
  update(e, t) {
6245
- return a(this, vt).update(e, t);
6246
+ return a(this, St).update(e, t);
6246
6247
  }
6247
6248
  unsubscribe() {
6248
6249
  return f(this, null, function* () {
6249
- return a(this, vt).unsubscribe();
6250
+ return a(this, St).unsubscribe();
6250
6251
  });
6251
6252
  }
6252
6253
  next() {
6253
6254
  return f(this, null, function* () {
6254
- const e = yield a(this, vt).next();
6255
+ const e = yield a(this, St).next();
6255
6256
  return e.done ? e : {
6256
6257
  done: !1,
6257
6258
  value: new pA(e.value, a(this, Pa), a(this, xa), this)
@@ -6260,7 +6261,7 @@ const Vs = class Vs {
6260
6261
  }
6261
6262
  return() {
6262
6263
  return f(this, null, function* () {
6263
- return yield a(this, vt).return(), { done: !0, value: void 0 };
6264
+ return yield a(this, St).return(), { done: !0, value: void 0 };
6264
6265
  });
6265
6266
  }
6266
6267
  [Symbol.asyncIterator]() {
@@ -6275,7 +6276,7 @@ const Vs = class Vs {
6275
6276
  });
6276
6277
  }
6277
6278
  };
6278
- Pa = new WeakMap(), vt = new WeakMap(), xa = new WeakMap(), La = new WeakMap(), hc = new WeakSet(), Ml = function(e, t) {
6279
+ Pa = new WeakMap(), St = new WeakMap(), xa = new WeakMap(), La = new WeakMap(), hc = new WeakSet(), Ml = function(e, t) {
6279
6280
  return f(this, null, function* () {
6280
6281
  var o = [];
6281
6282
  try {
@@ -6350,7 +6351,7 @@ uc = new WeakMap(), fi = new WeakMap(), os = new WeakMap(), Da = new WeakMap(),
6350
6351
  return f(this, null, function* () {
6351
6352
  const t = yield e.promise;
6352
6353
  try {
6353
- for (var b = $(t), v, I, k; v = !(I = yield b.next()).done; v = !1) {
6354
+ for (var b = $(t), S, I, k; S = !(I = yield b.next()).done; S = !1) {
6354
6355
  var h = I.value;
6355
6356
  var u = [];
6356
6357
  try {
@@ -6391,7 +6392,7 @@ uc = new WeakMap(), fi = new WeakMap(), os = new WeakMap(), Da = new WeakMap(),
6391
6392
  k = [I];
6392
6393
  } finally {
6393
6394
  try {
6394
- v && (I = b.return) && (yield I.call(b));
6395
+ S && (I = b.return) && (yield I.call(b));
6395
6396
  } finally {
6396
6397
  if (k)
6397
6398
  throw k[0];
@@ -6628,10 +6629,10 @@ let Uh = fu;
6628
6629
  function to(s) {
6629
6630
  return typeof s == "string" || s === null || s === void 0;
6630
6631
  }
6631
- function SA(s) {
6632
+ function vA(s) {
6632
6633
  return "provider" in s && typeof s.provider == "string" && (!("widevineLicenseUrl" in s) || to(s.widevineLicenseUrl)) && (!("playreadyLicenseUrl" in s) || to(s.playreadyLicenseUrl)) && (!("fairplayLicenseUrl" in s) || to(s.fairplayLicenseUrl)) && (!("fairplayCertificate" in s) || to(s.fairplayCertificate));
6633
6634
  }
6634
- function vA(s) {
6635
+ function SA(s) {
6635
6636
  try {
6636
6637
  return Td(s);
6637
6638
  } catch (e) {
@@ -6640,11 +6641,11 @@ function vA(s) {
6640
6641
  }
6641
6642
  function EA(s) {
6642
6643
  const e = new TextDecoder().decode(s), t = JSON.parse(e);
6643
- if (!SA(t))
6644
+ if (!vA(t))
6644
6645
  throw new Error("Invalid drm object");
6645
6646
  const o = t, { fairplayCertificate: i } = o, n = yu(o, ["fairplayCertificate"]);
6646
- return M(S({}, n), {
6647
- fairplayCertificate: i ? vA(i) : void 0
6647
+ return M(v({}, n), {
6648
+ fairplayCertificate: i ? SA(i) : void 0
6648
6649
  });
6649
6650
  }
6650
6651
  class au {
@@ -6662,7 +6663,7 @@ class au {
6662
6663
  if (c.done)
6663
6664
  throw new Error("No drm object received");
6664
6665
  const h = EA(c.value.payload);
6665
- return new au(M(S({}, h), { videoCodec: t, audioCodec: i }));
6666
+ return new au(M(v({}, h), { videoCodec: t, audioCodec: i }));
6666
6667
  } catch (m) {
6667
6668
  var p = m, g = !0;
6668
6669
  } finally {
@@ -6792,7 +6793,7 @@ class Kc {
6792
6793
  name: c.trackObject.name,
6793
6794
  namespace: c.namespace
6794
6795
  };
6795
- a(this, Dn).debug("track start", S({ mediaType: e }, h)), yield* Hc(c), a(this, Dn).debug("track end", S({ mediaType: e }, h));
6796
+ a(this, Dn).debug("track start", v({ mediaType: e }, h)), yield* Hc(c), a(this, Dn).debug("track end", v({ mediaType: e }, h));
6796
6797
  }
6797
6798
  } catch (n) {
6798
6799
  o = [n];
@@ -6899,13 +6900,13 @@ const js = class js {
6899
6900
  }
6900
6901
  zap(e, t) {
6901
6902
  return f(this, null, function* () {
6902
- var v, I;
6903
+ var S, I;
6903
6904
  const i = yield _o.start(a(this, On), e), n = a(this, Mn).wallclock() - t, o = a(this, fe).current(), c = o.timestampWallclockOffset(), h = yield i.waitForWallclockTime(n);
6904
6905
  a(this, Fn).update(i), yield a(this, fe).current().close();
6905
6906
  const u = h.toReversed().find((k) => k.wallclock <= n), m = u != null && u.mediaPts ? u.mediaPts - o.timestampOffsetMs() : void 0, w = i.timestampWallclockOffset() - c + o.timestampOffsetMs();
6906
6907
  i.setTimestampOffsetMs(w);
6907
6908
  const b = u != null && u.groupId ? U(u.groupId) : void 0;
6908
- m && ((v = a(this, ot).current()) == null || v.stopAfterTimestampReached(m), (I = a(this, at).current()) == null || I.stopAfterTimestampReached(m)), a(this, fe).update(i), yield Promise.all([
6909
+ m && ((S = a(this, ot).current()) == null || S.stopAfterTimestampReached(m), (I = a(this, at).current()) == null || I.stopAfterTimestampReached(m)), a(this, fe).update(i), yield Promise.all([
6909
6910
  e.videoTrack ? this.setVideoTrack(e.videoTrack, b) : void 0,
6910
6911
  e.audioTrack ? this.setAudioTrack(e.audioTrack, b) : void 0
6911
6912
  ]);
@@ -7007,12 +7008,12 @@ function eh(s, e, t) {
7007
7008
  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;
7008
7009
  }
7009
7010
  const kA = 1e4;
7010
- var me, ve, Qe, ms, K, wi, Wa, _n, za, Nn, ke, Gl, Vn, Ha, Gn, jl, Wl, zl, Hl, Oh;
7011
+ var me, Se, Qe, ms, K, wi, Wa, _n, za, Nn, ke, Gl, Vn, Ha, Gn, jl, Wl, zl, Hl, Oh;
7011
7012
  const gu = class gu {
7012
7013
  constructor(e, t, i, n, o, c, h) {
7013
7014
  d(this, ke);
7014
7015
  d(this, me);
7015
- d(this, ve);
7016
+ d(this, Se);
7016
7017
  d(this, Qe);
7017
7018
  d(this, ms, "disconnected");
7018
7019
  d(this, K);
@@ -7034,11 +7035,11 @@ const gu = class gu {
7034
7035
  case "subscribe":
7035
7036
  {
7036
7037
  if (a(this, Gn)) {
7037
- a(this, ve).info("Ignoring - we are already switching");
7038
+ a(this, Se).info("Ignoring - we are already switching");
7038
7039
  return;
7039
7040
  }
7040
7041
  l(this, Gn, !0), A(this, ke, Wl).call(this, e.subscription).catch((t) => {
7041
- a(this, ve).error("error handling subscription", t), a(this, me).emit("received signal", {
7042
+ a(this, Se).error("error handling subscription", t), a(this, me).emit("received signal", {
7042
7043
  type: "subscription changed",
7043
7044
  subscription: e.subscription,
7044
7045
  reset: !0
@@ -7047,7 +7048,7 @@ const gu = class gu {
7047
7048
  }
7048
7049
  break;
7049
7050
  case "telemetry":
7050
- Sd(new URL("/api/telemetry", a(this, Qe).url().replace("wss://", "https://")), {
7051
+ vd(new URL("/api/telemetry", a(this, Qe).url().replace("wss://", "https://")), {
7051
7052
  body: e.body,
7052
7053
  headers: { "Content-Type": "text/plain" }
7053
7054
  }).catch(O);
@@ -7059,9 +7060,9 @@ const gu = class gu {
7059
7060
  });
7060
7061
  d(this, Gn, !1);
7061
7062
  r(this, "disconnect", (e = "Disconnect Requested") => {
7062
- a(this, ve).info("Disconnecting", e), a(this, Qe).close(), a(this, K).close().catch(O), l(this, Nn, /* @__PURE__ */ new Map()), l(this, ms, "disconnected");
7063
+ a(this, Se).info("Disconnecting", e), a(this, Qe).close(), a(this, K).close().catch(O), l(this, Nn, /* @__PURE__ */ new Map()), l(this, ms, "disconnected");
7063
7064
  });
7064
- l(this, me, e), l(this, ve, t), l(this, Qe, i), l(this, K, n), l(this, wi, o), l(this, Wa, c), l(this, _n, h), a(this, me).on("send signal", a(this, Ha)), a(this, me).on("disconnect", this.disconnect), a(this, me).on("text track", a(this, Vn)), A(this, ke, Gl).call(this).catch(O), A(this, ke, zl).call(this).catch(O);
7065
+ l(this, me, e), l(this, Se, t), l(this, Qe, i), l(this, K, n), l(this, wi, o), l(this, Wa, c), l(this, _n, h), a(this, me).on("send signal", a(this, Ha)), a(this, me).on("disconnect", this.disconnect), a(this, me).on("text track", a(this, Vn)), A(this, ke, Gl).call(this).catch(O), A(this, ke, zl).call(this).catch(O);
7065
7066
  }
7066
7067
  get estimatedBandwidth() {
7067
7068
  return a(this, za);
@@ -7100,7 +7101,7 @@ const gu = class gu {
7100
7101
  }
7101
7102
  const g = (T = n.connectInfo.channels.find((Q) => Q.channelId === h.channelId)) == null ? void 0 : T.catalog;
7102
7103
  t.debug("Resolved edge url", { edgeUrl: m, edgeWsUrl: p }), Xe(g, "no catalog found");
7103
- const w = (P = c.get(Bi(g.namespace))) == null ? void 0 : P.getVideoTrack(h.video), b = (R = c.get(Bi(g.namespace))) == null ? void 0 : R.getAudioTrack(h.audio), v = yield uA({
7104
+ const w = (P = c.get(Bi(g.namespace))) == null ? void 0 : P.getVideoTrack(h.video), b = (R = c.get(Bi(g.namespace))) == null ? void 0 : R.getAudioTrack(h.audio), S = yield uA({
7104
7105
  url: m,
7105
7106
  wsUrl: p,
7106
7107
  authToken: n.options.get("authenticationToken"),
@@ -7108,7 +7109,7 @@ const gu = class gu {
7108
7109
  role: Ng.Subscriber,
7109
7110
  websocketFallbackTimeoutMs: 2e3
7110
7111
  }), I = yield Promise.race([
7111
- xh.start(v.subscriber, {
7112
+ xh.start(S.subscriber, {
7112
7113
  namespace: g.namespace,
7113
7114
  catalog: g,
7114
7115
  videoTrack: w == null ? void 0 : w.track,
@@ -7116,7 +7117,7 @@ const gu = class gu {
7116
7117
  burstMs: h.burstMs || 0
7117
7118
  }),
7118
7119
  su(kA, new Error("Timeout waiting for player to start")),
7119
- Lm(v.closed(), "Session closed before player started")
7120
+ Lm(S.closed(), "Session closed before player started")
7120
7121
  ]), k = new th(I.catalog());
7121
7122
  c.set(Bi(g.namespace), k), e.emit("received signal", {
7122
7123
  type: "client ip",
@@ -7126,7 +7127,7 @@ const gu = class gu {
7126
7127
  }).catch((Q) => {
7127
7128
  t.error("Error getting DRM data", Q);
7128
7129
  });
7129
- const D = new gu(e, t, v, I, c, i, o);
7130
+ const D = new gu(e, t, S, I, c, i, o);
7130
7131
  return h.textTrack && a(X = D, Vn).call(X, h.textTrack), D;
7131
7132
  });
7132
7133
  }
@@ -7140,7 +7141,7 @@ const gu = class gu {
7140
7141
  return Promise.race([a(this, Qe).closed(), a(this, K).closed()]);
7141
7142
  }
7142
7143
  };
7143
- me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(), K = new WeakMap(), wi = new WeakMap(), Wa = new WeakMap(), _n = new WeakMap(), za = new WeakMap(), Nn = new WeakMap(), ke = new WeakSet(), Gl = function() {
7144
+ me = new WeakMap(), Se = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(), K = new WeakMap(), wi = new WeakMap(), Wa = new WeakMap(), _n = new WeakMap(), za = new WeakMap(), Nn = new WeakMap(), ke = new WeakSet(), Gl = function() {
7144
7145
  return f(this, null, function* () {
7145
7146
  a(this, Qe).transportType() === "websocket" && (yield Ti(5e3));
7146
7147
  try {
@@ -7163,7 +7164,7 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7163
7164
  return f(this, null, function* () {
7164
7165
  var n;
7165
7166
  const t = yield a(this, Wa).connect({ channelId: e });
7166
- if (!vd(t))
7167
+ if (!Sd(t))
7167
7168
  throw new Error("no moq connect info found");
7168
7169
  const i = (n = t.channels.find((o) => o.channelId === e)) == null ? void 0 : n.catalog;
7169
7170
  if (!i)
@@ -7173,11 +7174,11 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7173
7174
  }, Wl = function(e) {
7174
7175
  return f(this, null, function* () {
7175
7176
  var c, h, u;
7176
- a(this, ve).info("handle subscription", e);
7177
+ a(this, Se).info("handle subscription", e);
7177
7178
  const t = a(this, K);
7178
7179
  let i = a(this, wi).get(e.channelId);
7179
7180
  if (i || (i = new th(new Ie(yield A(this, ke, jl).call(this, e.channelId))), a(this, wi).set(e.channelId, i)), t.namespace().join("/") !== i.namespace().join("/")) {
7180
- a(this, ve).info("changing channel", e.channelId);
7181
+ a(this, Se).info("changing channel", e.channelId);
7181
7182
  const m = i.getVideoTrack(e.video), p = i.getAudioTrack(e.audio);
7182
7183
  yield t.zap(
7183
7184
  {
@@ -7190,8 +7191,8 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7190
7191
  ), t.drm().then((g) => {
7191
7192
  g && a(this, me).emit("received drm data", g.value);
7192
7193
  }).catch((g) => {
7193
- a(this, ve).error("Error getting DRM data", g);
7194
- }), a(this, ve).info("switched channel", e.channelId), (c = a(this, wi).get(Bi(t.namespace()))) == null || c.updateCatalog(t.catalog()), a(this, me).emit("received signal", {
7194
+ a(this, Se).error("Error getting DRM data", g);
7195
+ }), a(this, Se).info("switched channel", e.channelId), (c = a(this, wi).get(Bi(t.namespace()))) == null || c.updateCatalog(t.catalog()), a(this, me).emit("received signal", {
7195
7196
  type: "subscription changed",
7196
7197
  subscription: e
7197
7198
  });
@@ -7209,13 +7210,13 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7209
7210
  }, zl = function() {
7210
7211
  return f(this, null, function* () {
7211
7212
  try {
7212
- l(this, ms, "connecting"), a(this, ve).info("Connecting..."), l(this, ms, "connected"), yield Promise.all([
7213
+ l(this, ms, "connecting"), a(this, Se).info("Connecting..."), l(this, ms, "connected"), yield Promise.all([
7213
7214
  A(this, ke, Oh).call(this, a(this, K).referenceClock(), a(this, K).audio),
7214
7215
  A(this, ke, Oh).call(this, a(this, K).referenceClock(), a(this, K).video),
7215
7216
  A(this, ke, Hl).call(this, a(this, K).subtitles)
7216
- ]), yield a(this, K).closed(), a(this, Qe).close(), a(this, ve).info("Session closed");
7217
+ ]), yield a(this, K).closed(), a(this, Qe).close(), a(this, Se).info("Session closed");
7217
7218
  } catch (e) {
7218
- a(this, ve).warn("Session error", e);
7219
+ a(this, Se).warn("Session error", e);
7219
7220
  }
7220
7221
  });
7221
7222
  }, Hl = function(e) {
@@ -7242,8 +7243,8 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7242
7243
  let i = "", n = "", o;
7243
7244
  const c = a(this, K).videoTrack() === void 0;
7244
7245
  try {
7245
- for (var w = $(t), b, v, I; b = !(v = yield w.next()).done; b = !1) {
7246
- const k = v.value;
7246
+ for (var w = $(t), b, S, I; b = !(S = yield w.next()).done; b = !1) {
7247
+ const k = S.value;
7247
7248
  const D = Bi(k.track.namespace), T = k.track.trackObject.language, P = dm((h = k.track.trackObject.codec) != null ? h : ""), R = k.track.trackObject.codec, X = P ? Oi({ codec: P, codecString: R }) : void 0, Q = !!k.track.trackObject["com.vindral.drm"];
7248
7249
  try {
7249
7250
  for (var u = $(k), m, p, g; m = !(p = yield u.next()).done; m = !1) {
@@ -7258,7 +7259,7 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7258
7259
  if (Be && Date.now() - y > 1e3) {
7259
7260
  a(this, Nn).set(k.track.namespace, Date.now());
7260
7261
  const E = e.wallclock() - Be.getTime();
7261
- a(this, ve).debug("timing-info", {
7262
+ a(this, Se).debug("timing-info", {
7262
7263
  mediaType: te.mediaType(),
7263
7264
  referenceClock: e,
7264
7265
  delta: E,
@@ -7296,11 +7297,11 @@ me = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), ms = new WeakMap(),
7296
7297
  }
7297
7298
  }
7298
7299
  }
7299
- } catch (v) {
7300
- I = [v];
7300
+ } catch (S) {
7301
+ I = [S];
7301
7302
  } finally {
7302
7303
  try {
7303
- b && (v = w.return) && (yield v.call(w));
7304
+ b && (S = w.return) && (yield S.call(w));
7304
7305
  } finally {
7305
7306
  if (I)
7306
7307
  throw I[0];
@@ -7412,10 +7413,10 @@ class UA extends Ei {
7412
7413
  this.websockets.length !== 0 && this.options.onMessage(t, i.data);
7413
7414
  });
7414
7415
  r(this, "onError", () => {
7415
- this.logger.info("On error", S({}, this.options)), this.close("one websocket had an error"), this.emit("error", new x("WebSocket error", { code: "websocket_error", isFatal: !1 }));
7416
+ this.logger.info("On error", v({}, this.options)), this.close("one websocket had an error"), this.emit("error", new x("WebSocket error", { code: "websocket_error", isFatal: !1 }));
7416
7417
  });
7417
7418
  r(this, "onClose", (t) => {
7418
- switch (this.logger.info("Closed", M(S({}, this.options), {
7419
+ switch (this.logger.info("Closed", M(v({}, this.options), {
7419
7420
  reason: t.reason,
7420
7421
  code: t.code,
7421
7422
  isSuspended: this.isSuspended
@@ -7439,7 +7440,7 @@ class UA extends Ei {
7439
7440
  this.emit("close", this);
7440
7441
  });
7441
7442
  r(this, "onOpen", () => {
7442
- this.logger.info("Opened", S({}, this.options)), this.readyState() === WebSocket.OPEN && (this._connectTime = Date.now() - this.connectStartTime, this.reconnectState.reconnectRetries = 0, this._isConnectInProgress = !1, this.emit("open", this));
7443
+ this.logger.info("Opened", v({}, this.options)), this.readyState() === WebSocket.OPEN && (this._connectTime = Date.now() - this.connectStartTime, this.reconnectState.reconnectRetries = 0, this._isConnectInProgress = !1, this.emit("open", this));
7443
7444
  });
7444
7445
  /**
7445
7446
  * @returns a promise that resolves true if the connect steps succeeded
@@ -7451,7 +7452,7 @@ class UA extends Ei {
7451
7452
  if (this.isSuspended)
7452
7453
  return !1;
7453
7454
  if (this.readyState() !== WebSocket.CLOSED && this.close("new connection in progress"), this.shouldContinueConnecting = !0, this._isConnectInProgress = !0, t && this.options.reconnectDelay > 0) {
7454
- this.logger.info("Waiting for reconnect delay", S({}, this.options)), yield Ti(this.options.reconnectDelay);
7455
+ this.logger.info("Waiting for reconnect delay", v({}, this.options)), yield Ti(this.options.reconnectDelay);
7455
7456
  const i = yield this.options.reconnectHandler(this.reconnectState);
7456
7457
  if (this.reconnectState.reconnectRetries++, !i)
7457
7458
  return this._isConnectInProgress = !1, this.emit("error", Pd()), !1;
@@ -7463,7 +7464,7 @@ class UA extends Ei {
7463
7464
  const { url: i, connectionCount: n } = yield this.options.connectHandler();
7464
7465
  if (this.connectStartTime = Date.now(), !this.shouldContinueConnecting)
7465
7466
  return this._isConnectInProgress = !1, this.logger.info("Connection aborted"), !1;
7466
- this.logger.info("Connecting websockets", M(S({}, this.options), { url: i }));
7467
+ this.logger.info("Connecting websockets", M(v({}, this.options), { url: i }));
7467
7468
  for (let o = 0; o < n; o++) {
7468
7469
  const c = new WebSocket(i);
7469
7470
  c.binaryType = "arraybuffer", c.onmessage = (h) => this.onMessage(o, h), c.addEventListener("error", this.onError), c.addEventListener("close", this.onClose), c.addEventListener("open", this.onOpen), this.websockets.push(c);
@@ -7738,7 +7739,7 @@ const Ws = class Ws {
7738
7739
  l(this, Tt, !0), (e = this.connectionImpl) == null || e.unsuspend(), this.connect();
7739
7740
  });
7740
7741
  r(this, "getState", () => this.connectionImpl ? this.connectionImpl.getState() : "disconnected");
7741
- r(this, "getStatistics", () => this.connectionImpl ? M(S({}, this.connectionImpl.getStatistics()), {
7742
+ r(this, "getStatistics", () => this.connectionImpl ? M(v({}, this.connectionImpl.getStatistics()), {
7742
7743
  rtt: ei(a(this, Et).items()),
7743
7744
  estimatedBandwidth: this.estimatedBandwidth,
7744
7745
  connectCount: a(this, Hn),
@@ -7820,11 +7821,11 @@ Et = new WeakMap(), Tt = new WeakMap(), zn = new WeakMap(), Ht = new WeakMap(),
7820
7821
  const h = e.select(n.edges);
7821
7822
  if (!h)
7822
7823
  throw new x("Failed to resolve edge url", { isFatal: !0, code: "failed_to_resolve_edge_url" });
7823
- vd(n) ? this.connectionImpl = yield Dh.start(
7824
+ Sd(n) ? this.connectionImpl = yield Dh.start(
7824
7825
  this.emitter,
7825
7826
  this.logger,
7826
7827
  this.apiClient,
7827
- M(S({}, this.config), {
7828
+ M(v({}, this.config), {
7828
7829
  connectInfo: n,
7829
7830
  edgeUrl: h
7830
7831
  }),
@@ -7832,7 +7833,7 @@ Et = new WeakMap(), Tt = new WeakMap(), zn = new WeakMap(), Ht = new WeakMap(),
7832
7833
  ) : (Xe(typeof h == "string", "Edge URL is expected to be a string"), this.connectionImpl = yield Mh.start(
7833
7834
  this.emitter,
7834
7835
  this.logger,
7835
- M(S({}, this.config), {
7836
+ M(v({}, this.config), {
7836
7837
  connectInfo: n,
7837
7838
  edgeUrl: h
7838
7839
  }),
@@ -7862,16 +7863,16 @@ Et = new WeakMap(), Tt = new WeakMap(), zn = new WeakMap(), Ht = new WeakMap(),
7862
7863
  }, r(Ws, "PING_TIMEOUT", 1e3), r(Ws, "create", (e, t, i) => new Ws(e, t, i));
7863
7864
  let Fh = Ws;
7864
7865
  const ih = () => ({
7865
- video: M(S({}, lo()), {
7866
- bitRate: vi()
7866
+ video: M(v({}, lo()), {
7867
+ bitRate: Si()
7867
7868
  }),
7868
7869
  audio: {
7869
- bitRate: vi()
7870
+ bitRate: Si()
7870
7871
  }
7871
7872
  }), MA = () => ({
7872
7873
  width: window.innerWidth,
7873
7874
  height: window.innerHeight,
7874
- bitRate: vi()
7875
+ bitRate: Si()
7875
7876
  }), zs = class zs {
7876
7877
  constructor(e, t, i, n) {
7877
7878
  r(this, "emitter");
@@ -7900,9 +7901,9 @@ const ih = () => ({
7900
7901
  r(this, "setUserSpecifiedCap", (e) => {
7901
7902
  var i;
7902
7903
  const t = (i = this.getUserSpecifiedCap()) != null ? i : ih();
7903
- this.userSpecifiedCap = M(S({}, t), {
7904
- video: S(S({}, t.video), e.video),
7905
- audio: S(S({}, t.audio), e.audio)
7904
+ this.userSpecifiedCap = M(v({}, t), {
7905
+ video: v(v({}, t.video), e.video),
7906
+ audio: v(v({}, t.audio), e.audio)
7906
7907
  }), this.evaluateConstraintCap();
7907
7908
  });
7908
7909
  r(this, "getUserSpecifiedCap", () => this.userSpecifiedCap);
@@ -7926,7 +7927,7 @@ const ih = () => ({
7926
7927
  });
7927
7928
  r(this, "evaluateConstraintCap", () => {
7928
7929
  var c, h, u, m, p;
7929
- const e = this.sizeBasedResolutionCapEnabled ? M(S({}, ih()), { video: MA() }) : ih();
7930
+ const e = this.sizeBasedResolutionCapEnabled ? M(v({}, ih()), { video: MA() }) : ih();
7930
7931
  if (!this.resizeObserver) {
7931
7932
  const g = this.element.getBoundingClientRect();
7932
7933
  this.elementSize = { width: g.width, height: g.height };
@@ -7943,7 +7944,7 @@ const ih = () => ({
7943
7944
  });
7944
7945
  i && i.video && (e.video.width = i.video.width, e.video.height = i.video.height);
7945
7946
  const n = (h = this.userSpecifiedCap) == null ? void 0 : h.video, o = (u = this.userSpecifiedCap) == null ? void 0 : u.audio;
7946
- n && (e.video.width > n.width && (e.video.width = n.width), e.video.height > n.height && (e.video.height = n.height)), e.video.bitRate = (m = n == null ? void 0 : n.bitRate) != null ? m : e.video.bitRate, e.audio.bitRate = (p = o == null ? void 0 : o.bitRate) != null ? p : e.audio.bitRate, Is(e, this.currentCap) ? this.currentCap = S({}, e) : (this.currentCap = S({}, e), this.emitter.emit("constraint cap changed", e));
7947
+ n && (e.video.width > n.width && (e.video.width = n.width), e.video.height > n.height && (e.video.height = n.height)), e.video.bitRate = (m = n == null ? void 0 : n.bitRate) != null ? m : e.video.bitRate, e.audio.bitRate = (p = o == null ? void 0 : o.bitRate) != null ? p : e.audio.bitRate, Is(e, this.currentCap) ? this.currentCap = v({}, e) : (this.currentCap = v({}, e), this.emitter.emit("constraint cap changed", e));
7947
7948
  });
7948
7949
  r(this, "enterPictureInPicture", (e) => {
7949
7950
  this.pictureInPictureSource = e, this.evaluateConstraintCap();
@@ -8074,7 +8075,7 @@ class ou {
8074
8075
  for (const h of i)
8075
8076
  switch (h.type) {
8076
8077
  case "audio": {
8077
- const { OpusDecoderContext: u } = yield import("./Bdbmrcn2.js");
8078
+ const { OpusDecoderContext: u } = yield import("./D6A1wDaY.js");
8078
8079
  c.set(h.type, {
8079
8080
  buffer: [],
8080
8081
  decoderContext: yield u.create(48e3, 2),
@@ -8085,7 +8086,7 @@ class ou {
8085
8086
  break;
8086
8087
  }
8087
8088
  case "video": {
8088
- const { H264DecoderWorkerContext: u } = yield import("./D0IMhaql.js");
8089
+ const { H264DecoderWorkerContext: u } = yield import("./B7vIH0lF.js");
8089
8090
  c.set(h.type, {
8090
8091
  buffer: [],
8091
8092
  decoderContext: yield u.create(o),
@@ -8167,7 +8168,7 @@ const VA = (s) => (e, t, i) => e.timestamp <= t || e.timestampAdded <= i - s, Kt
8167
8168
  this.timers.unload(), this.emitter.off("add event", this.addEvent);
8168
8169
  });
8169
8170
  r(this, "addEvent", (e) => {
8170
- this.logger.debug("Adding event", { event: e }), !this.waitingEvents.some((t) => typeof t.id != "undefined" && t.id === e.id) && this.waitingEvents.push(M(S({}, e), { timestampAdded: Date.now() }));
8171
+ this.logger.debug("Adding event", { event: e }), !this.waitingEvents.some((t) => typeof t.id != "undefined" && t.id === e.id) && this.waitingEvents.push(M(v({}, e), { timestampAdded: Date.now() }));
8171
8172
  });
8172
8173
  r(this, "extractEvent", (e, t) => {
8173
8174
  t.type === "video" && e.channelId !== t.channelId && this.addEvent({
@@ -8286,8 +8287,8 @@ class cu {
8286
8287
  * (derived from media timestamps) with the actual inter-arrival time.
8287
8288
  */
8288
8289
  recordSample(e) {
8289
- var w, b, v, I;
8290
- const t = this.getTrackingKey(e.type, e.renditionId), i = (v = (b = (w = globalThis.performance) == null ? void 0 : w.now) == null ? void 0 : b.call(w)) != null ? v : Date.now(), n = e.timestamp / e.timescale * 1e3, o = this.trackingState.get(t);
8290
+ var w, b, S, I;
8291
+ const t = this.getTrackingKey(e.type, e.renditionId), i = (S = (b = (w = globalThis.performance) == null ? void 0 : w.now) == null ? void 0 : b.call(w)) != null ? S : Date.now(), n = e.timestamp / e.timescale * 1e3, o = this.trackingState.get(t);
8291
8292
  if (!o) {
8292
8293
  this.trackingState.set(t, {
8293
8294
  lastArrivalTime: i,
@@ -8407,7 +8408,7 @@ const GA = () => window.AudioContext || window.webkitAudioContext, yc = class yc
8407
8408
  };
8408
8409
  r(yc, "CHECK_INTERVAL", 1e3);
8409
8410
  let jh = yc;
8410
- const Sc = class Sc extends Ei {
8411
+ const vc = class vc extends Ei {
8411
8412
  constructor(t, i, { muted: n, reInitWhenStuck: o }) {
8412
8413
  super();
8413
8414
  r(this, "logger");
@@ -8469,7 +8470,7 @@ const Sc = class Sc extends Ei {
8469
8470
  r(this, "onDecodedFrame", (t) => {
8470
8471
  if (!(this.gainNode && this.audio && this.audio.isRunning)) {
8471
8472
  if (t.type === "audio") {
8472
- this.preInitSampleQueue.push(M(S({}, t), { data: t.data.slice(0, t.data.length) }));
8473
+ this.preInitSampleQueue.push(M(v({}, t), { data: t.data.slice(0, t.data.length) }));
8473
8474
  const i = this.clockSource.currentTime;
8474
8475
  this.preInitSampleQueue.filterPop(({ timestamp: n, timescale: o }) => n / o * 1e3 > i);
8475
8476
  }
@@ -8575,8 +8576,8 @@ const Sc = class Sc extends Ei {
8575
8576
  return (n = this.gainNode) == null || n.connect(i), i;
8576
8577
  }
8577
8578
  };
8578
- r(Sc, "create", (t, i, n) => new Sc(t, i, n));
8579
- let No = Sc;
8579
+ r(vc, "create", (t, i, n) => new vc(t, i, n));
8580
+ let No = vc;
8580
8581
  var Qa, It, pe, ps, qe, ql, Ls, Zl;
8581
8582
  class jA {
8582
8583
  constructor() {
@@ -8716,11 +8717,11 @@ void main() {
8716
8717
  }
8717
8718
  return i;
8718
8719
  };
8719
- var vc, _, Xa, qa, Za, yi, Zn, Jl, $l, Ec;
8720
+ var Sc, _, Xa, qa, Za, yi, Zn, Jl, $l, Ec;
8720
8721
  class HA {
8721
8722
  constructor(e) {
8722
8723
  d(this, Zn);
8723
- d(this, vc, 96);
8724
+ d(this, Sc, 96);
8724
8725
  d(this, _);
8725
8726
  d(this, Xa);
8726
8727
  d(this, qa);
@@ -8752,7 +8753,7 @@ class HA {
8752
8753
  this.subtitleRenderer.setActiveCues(e), this.subtitleRenderer.render(t);
8753
8754
  }
8754
8755
  render(e) {
8755
- const t = this.subtitleRenderer.canvas, i = (e.padding + a(this, vc)) * window.devicePixelRatio;
8756
+ const t = this.subtitleRenderer.canvas, i = (e.padding + a(this, Sc)) * window.devicePixelRatio;
8756
8757
  t.width !== 0 && (a(this, _).useProgram(a(this, yi)), A(this, Zn, Jl).call(this), A(this, Zn, $l).call(this, this.subtitleRenderer.canvas.width / e.width, this.subtitleRenderer.canvas.height / e.height, -this.subtitleRenderer.canvas.width / e.width / 2, -(1 - (this.subtitleRenderer.canvas.height + i) / e.height)), a(this, _).uniform1i(a(this, _).getUniformLocation(a(this, yi), "texture"), 4), a(this, _).activeTexture(a(this, _).TEXTURE4), a(this, _).bindTexture(a(this, _).TEXTURE_2D, a(this, Xa)), a(this, _).enable(a(this, _).BLEND), a(this, _).blendFunc(a(this, _).SRC_ALPHA, a(this, _).ONE_MINUS_SRC_ALPHA), a(this, _).texImage2D(
8757
8758
  a(this, _).TEXTURE_2D,
8758
8759
  0,
@@ -8763,7 +8764,7 @@ class HA {
8763
8764
  ), a(this, _).texParameteri(a(this, _).TEXTURE_2D, a(this, _).TEXTURE_MAG_FILTER, a(this, _).LINEAR), a(this, _).drawArrays(a(this, _).TRIANGLE_STRIP, 0, 4));
8764
8765
  }
8765
8766
  }
8766
- vc = new WeakMap(), _ = new WeakMap(), Xa = new WeakMap(), qa = new WeakMap(), Za = new WeakMap(), yi = new WeakMap(), Zn = new WeakSet(), Jl = function() {
8767
+ Sc = new WeakMap(), _ = new WeakMap(), Xa = new WeakMap(), qa = new WeakMap(), Za = new WeakMap(), yi = new WeakMap(), Zn = new WeakSet(), Jl = function() {
8767
8768
  const e = a(this, _).getAttribLocation(a(this, yi), "position");
8768
8769
  a(this, _).enableVertexAttribArray(e), a(this, _).vertexAttribPointer(e, 2, a(this, _).FLOAT, !1, 0, 0);
8769
8770
  }, $l = function(e, t, i, n) {
@@ -9016,11 +9017,11 @@ const Tc = class Tc {
9016
9017
  };
9017
9018
  r(Tc, "create", (e, t, i, n) => new Tc(e, t, i, n));
9018
9019
  let Vo = Tc;
9019
- var Si;
9020
+ var vi;
9020
9021
  class Yl {
9021
9022
  constructor() {
9022
- d(this, Si, []);
9023
- l(this, Si, []);
9023
+ d(this, vi, []);
9024
+ l(this, vi, []);
9024
9025
  }
9025
9026
  addTextTrack(e, t, i) {
9026
9027
  const n = [], o = {
@@ -9037,23 +9038,23 @@ class Yl {
9037
9038
  h !== -1 && n.splice(h, 1);
9038
9039
  }
9039
9040
  };
9040
- return a(this, Si).push(o), o;
9041
+ return a(this, vi).push(o), o;
9041
9042
  }
9042
9043
  set language(e) {
9043
- a(this, Si).forEach((t) => {
9044
+ a(this, vi).forEach((t) => {
9044
9045
  t.language === e ? t.mode = "showing" : t.mode = "hidden";
9045
9046
  });
9046
9047
  }
9047
9048
  get language() {
9048
9049
  var e;
9049
- return (e = a(this, Si).find((t) => t.mode === "showing")) == null ? void 0 : e.language;
9050
+ return (e = a(this, vi).find((t) => t.mode === "showing")) == null ? void 0 : e.language;
9050
9051
  }
9051
9052
  getActiveCues(e) {
9052
- const t = a(this, Si).find((i) => i.mode === "showing");
9053
+ const t = a(this, vi).find((i) => i.mode === "showing");
9053
9054
  return t ? t.cues.filter(({ startTime: i, endTime: n }) => e >= i && e <= n) : [];
9054
9055
  }
9055
9056
  }
9056
- Si = new WeakMap();
9057
+ vi = new WeakMap();
9057
9058
  const Ri = (s, e) => {
9058
9059
  let t;
9059
9060
  for (t = e; s > 1; s--) t += e;
@@ -9073,7 +9074,7 @@ class QA {
9073
9074
  }
9074
9075
  }
9075
9076
  const Ic = class Ic {
9076
- constructor(e, t, i, n, o) {
9077
+ constructor(e, t, i, n, o, c) {
9077
9078
  r(this, "logger");
9078
9079
  r(this, "emitter");
9079
9080
  r(this, "audioPlayer");
@@ -9124,7 +9125,7 @@ const Ic = class Ic {
9124
9125
  this.logger = t, this.emitter = e, this.pool = i, this.audioPlayer = No.create(this.logger.createContext("AudioPlayerModule"), n, {
9125
9126
  muted: o,
9126
9127
  reInitWhenStuck: !0
9127
- }), this.audioPlayer.on("stuck", () => {
9128
+ }), c !== void 0 && (this.audioPlayer.volume = c), this.audioPlayer.on("stuck", () => {
9128
9129
  this.isDisconnected = !0;
9129
9130
  }), this.audioPlayer.on("state change", () => {
9130
9131
  this.emitter.emit("volume state", {
@@ -9184,10 +9185,10 @@ const Ic = class Ic {
9184
9185
  this._isPaused = !0, this.audioPlayer.pause(), this.emitter.emit("media element state", "paused");
9185
9186
  }
9186
9187
  };
9187
- r(Ic, "create", (e, t, i, n, o) => new Ic(e, t, i, n, o));
9188
+ r(Ic, "create", (e, t, i, n, o, c) => new Ic(e, t, i, n, o, c));
9188
9189
  let Hh = Ic;
9189
9190
  const Cc = class Cc {
9190
- constructor(e, t, i, n, { muted: o, type: c, poster: h }) {
9191
+ constructor(e, t, i, n, { muted: o, volume: c, type: h, poster: u }) {
9191
9192
  r(this, "logger");
9192
9193
  r(this, "emitter");
9193
9194
  r(this, "mediaElement");
@@ -9256,23 +9257,24 @@ const Cc = class Cc {
9256
9257
  Is(e, this.volumeState) || (this.volumeState = e, this.emitter.emit("volume state", this.volumeState));
9257
9258
  });
9258
9259
  this.logger = t, this.emitter = e, this.pool = i, this._userProvidedMuted = o, this.mediaElement = new ph({
9259
- poster: h,
9260
- type: c,
9260
+ poster: u,
9261
+ type: h,
9261
9262
  muted: o,
9263
+ volume: c,
9262
9264
  autoplay: !1,
9263
9265
  logger: this.logger.createContext("MediaElement")
9264
- }), this.mediaElement.on("volume state", (u) => {
9265
- this.updateVolumeState(), !u.isMuted && !this.audioPlayer.isContextRunning && this.activateAudioPlayer().catch(O), u.isMuted || (this._userProvidedMuted = !1);
9266
- }), this.mediaElement.on("media element state", (u) => {
9267
- u === "paused" && this.audioPlayer.flushBuffer(), this.emitter.emit("media element state", u);
9266
+ }), this.mediaElement.on("volume state", (m) => {
9267
+ this.updateVolumeState(), !m.isMuted && !this.audioPlayer.isContextRunning && this.activateAudioPlayer().catch(O), m.isMuted || (this._userProvidedMuted = !1);
9268
+ }), this.mediaElement.on("media element state", (m) => {
9269
+ m === "paused" && this.audioPlayer.flushBuffer(), this.emitter.emit("media element state", m);
9268
9270
  }), this.audioPlayer = No.create(this.logger.createContext("AudioPlayerModule"), n, {
9269
9271
  muted: !1,
9270
9272
  // Never muted because its the media element that limits audio output,
9271
9273
  reInitWhenStuck: !1
9272
9274
  }), this.audioPlayer.on("stuck", () => {
9273
9275
  this.isDisconnected = !0;
9274
- }), this.audioPlayer.on("state change", (u) => {
9275
- u === "suspended" || u === "interrupted" ? this.mediaElement.muted = !0 : u === "running" && (this.mediaElement.muted = this._userProvidedMuted || document.visibilityState === "hidden"), this.updateVolumeState();
9276
+ }), this.audioPlayer.on("state change", (m) => {
9277
+ m === "suspended" || m === "interrupted" ? this.mediaElement.muted = !0 : m === "running" && (this.mediaElement.muted = this._userProvidedMuted || document.visibilityState === "hidden"), this.updateVolumeState();
9276
9278
  }), this.videoPlayer = Vo.create(
9277
9279
  this.logger.createContext("VideoPlayerModule"),
9278
9280
  this.audioPlayer,
@@ -9450,7 +9452,7 @@ class tm {
9450
9452
  }
9451
9453
  }
9452
9454
  function $A(s, { mediaSource: e, mimeType: t, codec: i }) {
9453
- return M(S({}, s), {
9455
+ return M(v({}, s), {
9454
9456
  state: "initialized",
9455
9457
  mimeType: t,
9456
9458
  codec: i,
@@ -9646,10 +9648,10 @@ const kc = class kc {
9646
9648
  this.logger.warn("Skipping fragment with no codec");
9647
9649
  return;
9648
9650
  }
9649
- const v = this.trackContexts.get(c);
9650
- if (!v)
9651
+ const S = this.trackContexts.get(c);
9652
+ if (!S)
9651
9653
  throw Ya(c);
9652
- v.state === "initialized" && t && (v.mimeType = t, v.initSegments.set(n, o, u));
9654
+ S.state === "initialized" && t && (S.mimeType = t, S.initSegments.set(n, o, u));
9653
9655
  const I = {
9654
9656
  fragmented: !0,
9655
9657
  type: c,
@@ -9676,7 +9678,7 @@ const kc = class kc {
9676
9678
  if (!(!t.hasFirstSync && !e.isSync)) {
9677
9679
  if (this.hasAddedInitialPosterFrame && e.isSync && e.type === "video") {
9678
9680
  this.hasAddedInitialPosterFrame = !1;
9679
- const i = S({}, e);
9681
+ const i = v({}, e);
9680
9682
  "fragment" in i ? (i.fragment = i.fragment.clone(), i.fragment.updateBaseMediaDecodeTime(0), i.data = i.fragment.rawBytes()) : i.timestamp = 0, t.pendingSamples.push(i);
9681
9683
  }
9682
9684
  t.hasFirstSync = !0, t.pendingSamples.push(e), t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || YA(t, this.append, this.maxChunkSize).catch((i) => {
@@ -9928,8 +9930,8 @@ const Jh = () => ({
9928
9930
  const t = this.timeSpentBuffering(), i = this.timeActive(), n = this.bufferingRatios(), o = this.activeRatios(), c = ((m = (u = e.video) == null ? void 0 : u.bitRate) != null ? m : 0) + ((g = (p = e.audio) == null ? void 0 : p.bitRate) != null ? g : 0), h = t / i;
9929
9931
  return Object.keys(this.metrics.levels).map((w) => parseInt(w, 10)).filter((w) => w >= c).reduce((w, b) => {
9930
9932
  var I, k;
9931
- const v = this.getQualityIndex(b).toString();
9932
- return ((I = o.get(v)) != null ? I : 0) - ((k = n.get(v)) != null ? k : 0) * h + w;
9933
+ const S = this.getQualityIndex(b).toString();
9934
+ return ((I = o.get(S)) != null ? I : 0) - ((k = n.get(S)) != null ? k : 0) * h + w;
9933
9935
  }, 0);
9934
9936
  });
9935
9937
  r(this, "timeSpentBuffering", () => Bs(this.metrics.general.bufferingRanges));
@@ -9941,8 +9943,8 @@ const Jh = () => ({
9941
9943
  fatalQosCount: this.fatalQosCount
9942
9944
  }));
9943
9945
  r(this, "onRenditionLevelChanged", (e) => {
9944
- var o, c, h, u, m, p, g, w, b, v, I, k, D, T;
9945
- const t = ((h = (c = (o = e.from) == null ? void 0 : o.video) == null ? void 0 : c.bitRate) != null ? h : 0) + ((p = (m = (u = e.from) == null ? void 0 : u.audio) == null ? void 0 : m.bitRate) != null ? p : 0), i = ((b = (w = (g = e.to) == null ? void 0 : g.video) == null ? void 0 : w.bitRate) != null ? b : 0) + ((k = (I = (v = e.to) == null ? void 0 : v.audio) == null ? void 0 : I.bitRate) != null ? k : 0);
9946
+ var o, c, h, u, m, p, g, w, b, S, I, k, D, T;
9947
+ const t = ((h = (c = (o = e.from) == null ? void 0 : o.video) == null ? void 0 : c.bitRate) != null ? h : 0) + ((p = (m = (u = e.from) == null ? void 0 : u.audio) == null ? void 0 : m.bitRate) != null ? p : 0), i = ((b = (w = (g = e.to) == null ? void 0 : g.video) == null ? void 0 : w.bitRate) != null ? b : 0) + ((k = (I = (S = e.to) == null ? void 0 : S.audio) == null ? void 0 : I.bitRate) != null ? k : 0);
9946
9948
  this.logger.info("rendition level changed", { fromLevel: t, toLevel: i }), this.metrics.general.activeRanges.length === 0 && this.setActive(), e.from && e.to && (t < i ? this.metrics.general.upgradesFromLevel.push(Date.now()) : this.metrics.general.downgradesFromLevel.push(Date.now()));
9947
9949
  let n = !1;
9948
9950
  if (e.from) {
@@ -10208,7 +10210,7 @@ const er = (s) => JSON.parse(JSON.stringify(s)), ew = 1e4, xc = class xc {
10208
10210
  };
10209
10211
  r(xc, "create", (e, t, i) => new xc(e, i, t));
10210
10212
  let Kh = xc;
10211
- const id = 5e3, tw = () => Id() || Fc() || vm(), sd = () => tw() ? 100 : 0, nd = (s) => (e) => e > s, Lc = class Lc {
10213
+ const id = 5e3, tw = () => Id() || Fc() || Sm(), sd = () => tw() ? 100 : 0, nd = (s) => (e) => e > s, Lc = class Lc {
10212
10214
  constructor(e, t, i, n, o) {
10213
10215
  r(this, "emitter");
10214
10216
  r(this, "logger");
@@ -10468,7 +10470,7 @@ const id = 5e3, tw = () => Id() || Fc() || vm(), sd = () => tw() ? 100 : 0, nd =
10468
10470
  if (this.isSuspended)
10469
10471
  return;
10470
10472
  if (!n || !o) {
10471
- this.logger.info("Initial timing info", { syncInfo: t }), this.channelSyncInfo.set(e, M(S({}, t), { localTimestamp: i, timeDifferences: new oe(12) }));
10473
+ this.logger.info("Initial timing info", { syncInfo: t }), this.channelSyncInfo.set(e, M(v({}, t), { localTimestamp: i, timeDifferences: new oe(12) }));
10472
10474
  return;
10473
10475
  }
10474
10476
  const c = t.wallclockTime - n.wallclockTime, h = t.timestamp - n.timestamp, u = i - n.localTimestamp, m = h - u;
@@ -10482,7 +10484,7 @@ const id = 5e3, tw = () => Id() || Fc() || vm(), sd = () => tw() ? 100 : 0, nd =
10482
10484
  wallclockDelta: c,
10483
10485
  localWallclockDelta: u
10484
10486
  }), Math.abs(m) >= this.bufferSource.getTargetBufferTime() * 2) {
10485
- this.logger.info("Resetting sync info", { diffFromEstimated: m }), this.channelSyncInfo.set(e, M(S({}, t), {
10487
+ this.logger.info("Resetting sync info", { diffFromEstimated: m }), this.channelSyncInfo.set(e, M(v({}, t), {
10486
10488
  localTimestamp: i,
10487
10489
  timeDifferences: new oe(n.timeDifferences.maxSize + 1)
10488
10490
  })), this.currentChannelId && this.currentChannelId === e && (this.reset(), this.emitter.emit("channel reset"));
@@ -10528,7 +10530,7 @@ const iw = {
10528
10530
  maxRetries: 10,
10529
10531
  maxErrorReports: 50,
10530
10532
  maxEvents: 50
10531
- }, sh = (s, e) => M(S({}, e), { type: s, timestamp: (/* @__PURE__ */ new Date()).toISOString(), discriminator: "web" }), Dc = class Dc {
10533
+ }, sh = (s, e) => M(v({}, e), { type: s, timestamp: (/* @__PURE__ */ new Date()).toISOString(), discriminator: "web" }), Dc = class Dc {
10532
10534
  constructor(e, t, i, n) {
10533
10535
  r(this, "logger");
10534
10536
  r(this, "timers", new Ae());
@@ -10551,13 +10553,13 @@ const iw = {
10551
10553
  r(this, "addStats", ({ isFinal: e, initiator: t } = { isFinal: !1, initiator: "interval" }, i = {}) => {
10552
10554
  if (!this.options.includeStats)
10553
10555
  return;
10554
- const n = this.parentContext.getStatistics(), o = sh("stats", M(S(S({}, i), n), { isFinal: e, initiator: t, count: this.statsCount++ }));
10556
+ const n = this.parentContext.getStatistics(), o = sh("stats", M(v(v({}, i), n), { isFinal: e, initiator: t, count: this.statsCount++ }));
10555
10557
  this.unsentLines.push(o);
10556
10558
  });
10557
10559
  r(this, "addEvent", (e) => {
10558
10560
  if (!this.options.includeEvents || this.eventCount > this.options.maxEvents)
10559
10561
  return;
10560
- const t = this.parentContext.getStatistics(), i = sh("event", S(S({}, t), e));
10562
+ const t = this.parentContext.getStatistics(), i = sh("event", v(v({}, t), e));
10561
10563
  this.eventCount++, this.unsentLines.push(i);
10562
10564
  });
10563
10565
  r(this, "getStatistics", () => ({
@@ -10578,7 +10580,7 @@ const iw = {
10578
10580
  this.parentContext.connectionState === "connected" ? this.emitter.emit("send signal", {
10579
10581
  type: "telemetry",
10580
10582
  body: t
10581
- }) : yield Sd(new URL(this.options.url), { body: t, headers: { "Content-Type": "text/plain" } });
10583
+ }) : yield vd(new URL(this.options.url), { body: t, headers: { "Content-Type": "text/plain" } });
10582
10584
  break;
10583
10585
  }
10584
10586
  this.retries = 0, this.unsentLines.clear();
@@ -10602,11 +10604,11 @@ const iw = {
10602
10604
  return;
10603
10605
  const n = this.parentContext.getStatistics();
10604
10606
  this.unsentLines.push(
10605
- sh("error", S(S({}, n), e.toStringifiable()))
10607
+ sh("error", v(v({}, n), e.toStringifiable()))
10606
10608
  );
10607
10609
  }
10608
10610
  });
10609
- this.logger = e, this.emitter = t, this.options = S(S({}, iw), i), this.parentContext = n;
10611
+ this.logger = e, this.emitter = t, this.options = v(v({}, iw), i), this.parentContext = n;
10610
10612
  }
10611
10613
  };
10612
10614
  r(Dc, "create", (e, t, i, n) => new Dc(e, t, i, n));
@@ -10700,13 +10702,13 @@ const aw = 6, ow = (s) => {
10700
10702
  const o = (h, u) => {
10701
10703
  var k, D, T;
10702
10704
  h.flags && cr(h.flags) && (t = (k = h.compositionTimeOffset) != null ? k : 0), h.timestamp += t, h.compositionTimeOffset = ((D = h.compositionTimeOffset) != null ? D : 0) - t;
10703
- const m = h.timestamp / h.timescale, g = u.flags && cr(u.flags) ? (T = u.compositionTimeOffset) != null ? T : 0 : t, b = (u.timestamp + g) / u.timescale, v = Math.max(0, Math.round((b - m) * h.timescale));
10704
- return v > 0 && (i = v), M(S({}, h), {
10705
+ const m = h.timestamp / h.timescale, g = u.flags && cr(u.flags) ? (T = u.compositionTimeOffset) != null ? T : 0 : t, b = (u.timestamp + g) / u.timescale, S = Math.max(0, Math.round((b - m) * h.timescale));
10706
+ return S > 0 && (i = S), M(v({}, h), {
10705
10707
  /*
10706
10708
  During resync timeshifts we may end up with negative durations (normalized to 0 above) which is not allowed in mse (the MseModule
10707
10709
  drops the frame) so we use the last known duration instead. This is not ideal but it's better than dropping the frame.
10708
10710
  */
10709
- duration: v > 0 ? v : i
10711
+ duration: S > 0 ? S : i
10710
10712
  });
10711
10713
  };
10712
10714
  return (h, u = !1) => {
@@ -10728,7 +10730,7 @@ const aw = 6, ow = (s) => {
10728
10730
  };
10729
10731
  }, cw = (s, e, t) => {
10730
10732
  if (ws(e))
10731
- return S(M(S({}, s), {
10733
+ return v(M(v({}, s), {
10732
10734
  type: "video",
10733
10735
  codec: e.codec,
10734
10736
  isSync: cr(s.flags),
@@ -10739,7 +10741,7 @@ const aw = 6, ow = (s) => {
10739
10741
  }), t);
10740
10742
  if (e.codec === "webvtt")
10741
10743
  throw new Error("WebVTT is not supported");
10742
- return M(S({}, s), {
10744
+ return M(v({}, s), {
10743
10745
  type: "audio",
10744
10746
  channels: e.channels,
10745
10747
  sampleRate: e.sampleRate,
@@ -10772,13 +10774,13 @@ class hw {
10772
10774
  w.sort((T, P) => T.brand.localeCompare(P.brand));
10773
10775
  const b = [...(h = this.highEntropyValues.fullVersionList) != null ? h : []];
10774
10776
  b.sort((T, P) => T.brand.localeCompare(P.brand));
10775
- const v = b.map((T) => T.version), I = w.map((T) => T.brand), k = w.map((T) => T.version), D = parseInt((m = (u = this.highEntropyValues.platformVersion) == null ? void 0 : u.split(".")[0]) != null ? m : "1");
10776
- return S({
10777
+ const S = b.map((T) => T.version), I = w.map((T) => T.brand), k = w.map((T) => T.version), D = parseInt((m = (u = this.highEntropyValues.platformVersion) == null ? void 0 : u.split(".")[0]) != null ? m : "1");
10778
+ return v({
10777
10779
  userAgentLegacy: window.navigator.userAgent,
10778
10780
  ua: {
10779
10781
  browser: {
10780
10782
  brands: I,
10781
- fullVersionBrands: v,
10783
+ fullVersionBrands: S,
10782
10784
  majorVersions: k
10783
10785
  },
10784
10786
  device: this.highEntropyValues.model || "Other",
@@ -10790,7 +10792,7 @@ class hw {
10790
10792
  }
10791
10793
  }, n);
10792
10794
  } else
10793
- return S({
10795
+ return v({
10794
10796
  userAgent: window.navigator.userAgent
10795
10797
  }, n);
10796
10798
  }
@@ -10798,7 +10800,7 @@ class hw {
10798
10800
  const rd = (s, e) => s && typeof s == "object" && e in s, uw = (s) => !(typeof s != "object" || !rd(s, "channelId") || typeof s.channelId != "string" || !rd(s, "url") || typeof s.url != "string" || s.channelId.length === 0 || s.url.length === 0), dw = (s) => {
10799
10801
  if (!uw(s))
10800
10802
  throw new x("Invalid options", { isFatal: !0, code: "invalid_options" });
10801
- const e = S({}, s);
10803
+ const e = v({}, s);
10802
10804
  return Object.keys(e).forEach((t) => {
10803
10805
  const i = e;
10804
10806
  typeof i[t] == "undefined" && delete i[t];
@@ -10839,7 +10841,7 @@ const Ut = class Ut extends Ei {
10839
10841
  r(this, "hasCalledConnect", !1);
10840
10842
  r(this, "latestEmittedLanguages", []);
10841
10843
  r(this, "wakeLock");
10842
- r(this, "pool", new vu(Ut.MAX_POOL_SIZE));
10844
+ r(this, "pool", new Su(Ut.MAX_POOL_SIZE));
10843
10845
  r(this, "userAgentInformation", new hw());
10844
10846
  r(this, "encryptedMediaExtensions");
10845
10847
  d(this, gs, 0);
@@ -10916,7 +10918,7 @@ const Ut = class Ut extends Ei {
10916
10918
  var m;
10917
10919
  this.sessionId = Cu();
10918
10920
  const i = this.modules.subscription.getTargetSubscription(), n = t.channels.find((p) => p.channelId === i.channelId);
10919
- if (this.emitter.emit("connect info", t), "timeshift" in t && t.timeshift ? (t.timeshift, this._channels = t.channels.map((p) => M(S({}, p), {
10921
+ if (this.emitter.emit("connect info", t), "timeshift" in t && t.timeshift ? (t.timeshift, this._channels = t.channels.map((p) => M(v({}, p), {
10920
10922
  timeshift: t.timeshift
10921
10923
  })), this.emit("timeshift info", t.timeshift)) : this._channels = t.channels, this.updateTextTracks((m = n == null ? void 0 : n.renditions) != null ? m : []), !this.textTrack && this.options.get("textTrack") && (this.textTrack = this.options.get("textTrack")), yield Promise.all(
10922
10924
  t.channels.map((p) => f(this, null, function* () {
@@ -10994,8 +10996,8 @@ const Ut = class Ut extends Ei {
10994
10996
  if (!ws(h) || !this.isSupportedVideoCodecProfile(h.codec, h.codecString))
10995
10997
  return !1;
10996
10998
  if (!this.willUseMediaSource()) {
10997
- const b = this.options.get("advanced"), v = (p = b.wasmDecodingConstraint.bitRate) != null ? p : Number.MAX_SAFE_INTEGER, I = (g = b.wasmDecodingConstraint.width) != null ? g : Number.MAX_SAFE_INTEGER, k = (w = b.wasmDecodingConstraint.height) != null ? w : Number.MAX_SAFE_INTEGER;
10998
- return h.bitRate <= v && h.width <= I && h.height <= k;
10999
+ const b = this.options.get("advanced"), S = (p = b.wasmDecodingConstraint.bitRate) != null ? p : Number.MAX_SAFE_INTEGER, I = (g = b.wasmDecodingConstraint.width) != null ? g : Number.MAX_SAFE_INTEGER, k = (w = b.wasmDecodingConstraint.height) != null ? w : Number.MAX_SAFE_INTEGER;
11000
+ return h.bitRate <= S && h.width <= I && h.height <= k;
10999
11001
  }
11000
11002
  const u = yield cg(h);
11001
11003
  if (!u.supported || h.codec == "av1" && !u.smooth && !u.powerEfficient)
@@ -11026,7 +11028,7 @@ const Ut = class Ut extends Ei {
11026
11028
  ), h = this.options.get("media") === "audio" ? [] : this.options.get("videoCodecs", this.channelId), u = this.supportedAudioCodecs(), m = t.renditions.filter(bs), p = t.renditions.filter(ws), g = u.find((I) => m.find((k) => k.codec === I) !== void 0), w = h.find((I) => p.find((k) => k.codec === I) !== void 0), b = m.map((I) => I.language);
11027
11029
  if (this.logger.debug("supported and selected codecs", { audioCodecs: u, videoCodecs: h, audioCodec: g, videoCodec: w }), w) {
11028
11030
  const I = this.options.get("maxSize");
11029
- this.modules.subscription.setVideoConstraint(S({
11031
+ this.modules.subscription.setVideoConstraint(v({
11030
11032
  codec: w,
11031
11033
  bitRate: this.abrEnabled ? o : this.options.get("maxVideoBitRate")
11032
11034
  }, I));
@@ -11036,9 +11038,9 @@ const Ut = class Ut extends Ei {
11036
11038
  bitRate: this.abrEnabled ? c : this.options.get("maxAudioBitRate"),
11037
11039
  language: this.options.get("language")
11038
11040
  }), (!b.includes(this.options.get("language")) || this.language === void 0) && this.modules.subscription.setLanguage(b[0])), this.alignSizeAndBitRate(this.targetSubscription);
11039
- const v = this.modules.subscription.getTargetSubscription();
11041
+ const S = this.modules.subscription.getTargetSubscription();
11040
11042
  this.emitter.emit("subscription changed", {
11041
- to: v,
11043
+ to: S,
11042
11044
  from: this.modules.subscription.getCurrentSubscription()
11043
11045
  });
11044
11046
  });
@@ -11093,7 +11095,7 @@ const Ut = class Ut extends Ei {
11093
11095
  */
11094
11096
  r(this, "unload", () => f(this, null, function* () {
11095
11097
  var t, i, n;
11096
- this.logger.debug("Unloading modules..."), yield Promise.all(Object.values(this.modules).map((o) => o == null ? void 0 : o.unload())), (t = this.wakeLock) == null || t.unload(), this.pool = new vu(Ut.MAX_POOL_SIZE), (n = (i = this.playbackSource).unload) == null || n.call(i), this.element.remove(), this.emitter.reset(), this.encryptedMediaExtensions.unload(), this.reset(), this.logger.debug("Unloaded modules");
11098
+ this.logger.debug("Unloading modules..."), yield Promise.all(Object.values(this.modules).map((o) => o == null ? void 0 : o.unload())), (t = this.wakeLock) == null || t.unload(), this.pool = new Su(Ut.MAX_POOL_SIZE), (n = (i = this.playbackSource).unload) == null || n.call(i), this.element.remove(), this.emitter.reset(), this.encryptedMediaExtensions.unload(), this.reset(), this.logger.debug("Unloaded modules");
11097
11099
  }));
11098
11100
  /**
11099
11101
  * @deprecated since 3.0.0 Use play instead.
@@ -11149,13 +11151,13 @@ const Ut = class Ut extends Ei {
11149
11151
  */
11150
11152
  r(this, "getStatistics", () => {
11151
11153
  const t = Object.values(this.modules).reduce(
11152
- (n, o) => o && "getStatistics" in o ? S(S({}, n), o.getStatistics()) : n,
11154
+ (n, o) => o && "getStatistics" in o ? v(v({}, n), o.getStatistics()) : n,
11153
11155
  // Safety: We know that the collective statistics from module map will equal Statistic because the Statistics type is inferred from moduleMap
11154
11156
  this.getRuntimeInfo()
11155
11157
  ), i = Math.round(
11156
11158
  this.timeActive > 0 ? (t.bytesReceived || 0) * 8 / (this.timeActive / 1e3) : 0
11157
11159
  );
11158
- return M(S({}, t), {
11160
+ return M(v({}, t), {
11159
11161
  averageBitRate: i
11160
11162
  });
11161
11163
  });
@@ -11166,9 +11168,9 @@ const Ut = class Ut extends Ei {
11166
11168
  });
11167
11169
  r(this, "getRuntimeInfo", () => {
11168
11170
  const t = this.modules.canvasModule ? this.options.get("iosMediaElementEnabled") : void 0;
11169
- return S({
11171
+ return v({
11170
11172
  uptime: Date.now() - this.createdAt,
11171
- version: "4.1.5-5-gfe7b461b",
11173
+ version: "4.1.5-7-gfedebb3e",
11172
11174
  clientId: this.clientId,
11173
11175
  sessionId: this.sessionId,
11174
11176
  channelId: this.channelId,
@@ -11200,7 +11202,7 @@ const Ut = class Ut extends Ei {
11200
11202
  if (i && t)
11201
11203
  return t - i;
11202
11204
  });
11203
- this.options = new rw(S(S({}, hf), dw(t)));
11205
+ this.options = new rw(v(v({}, hf), dw(t)));
11204
11206
  const i = ["localhost", "127.0.0.1"];
11205
11207
  t.telemetryEnabled === void 0 && i.includes(location.hostname) && this.options.set("telemetryEnabled", !1);
11206
11208
  const n = {
@@ -11249,13 +11251,14 @@ const Ut = class Ut extends Ei {
11249
11251
  this.encryptedMediaExtensions.queryParams = y;
11250
11252
  }
11251
11253
  };
11252
- const b = Nh.create(this.emitter), v = this.options.get("poster"), I = v === !0 ? this.getThumbnailUrl() : v || void 0;
11254
+ const b = Nh.create(this.emitter), S = this.options.get("poster"), I = S === !0 ? this.getThumbnailUrl() : S || void 0;
11253
11255
  let k, D, T;
11254
11256
  if (this.willUseMediaSource()) {
11255
11257
  const y = new ph({
11256
11258
  type: this.options.get("media") == "audio" ? "audio" : "video",
11257
11259
  autoplay: !1,
11258
11260
  muted: this.options.get("muted") || this.options.get("media") === "video",
11261
+ volume: this.options.get("volume"),
11259
11262
  logger: this.logger.createContext("MediaElement"),
11260
11263
  poster: I
11261
11264
  });
@@ -11269,6 +11272,7 @@ const Ut = class Ut extends Ei {
11269
11272
  {
11270
11273
  type: this.options.get("media") == "audio" ? "audio" : "video",
11271
11274
  muted: this.options.get("muted") || this.options.get("media") === "video",
11275
+ volume: this.options.get("volume"),
11272
11276
  poster: I
11273
11277
  }
11274
11278
  ), E = y.element();
@@ -11279,7 +11283,8 @@ const Ut = class Ut extends Ei {
11279
11283
  this.logger.createContext("LegacyCanvasModule"),
11280
11284
  this.pool,
11281
11285
  this,
11282
- this.options.get("muted") || this.options.get("media") === "video"
11286
+ this.options.get("muted") || this.options.get("media") === "video",
11287
+ this.options.get("volume")
11283
11288
  );
11284
11289
  this.element = y.element(), this.playbackSource = y, T = y, this.options.get("iosWakeLockEnabled") && (this.wakeLock = new rg());
11285
11290
  }
@@ -11388,7 +11393,7 @@ const Ut = class Ut extends Ei {
11388
11393
  y.telemetry && ((N = this.modules.telemetry) == null || N.unload(), this.modules.telemetry = Go.create(
11389
11394
  this.logger.createContext("TelemetryModule"),
11390
11395
  this.emitter,
11391
- M(S({}, y.telemetry), {
11396
+ M(v({}, y.telemetry), {
11392
11397
  enabled: this.options.get("telemetryEnabled") && F
11393
11398
  }),
11394
11399
  this
@@ -11401,7 +11406,7 @@ const Ut = class Ut extends Ei {
11401
11406
  switch (y) {
11402
11407
  case "upgrade":
11403
11408
  {
11404
- const ie = Math.min(G + 1, L), ut = E[ie], im = (xe = this.modules.connection.estimatedBandwidth) != null ? xe : vi(), sm = ((ce = (J = ut == null ? void 0 : ut.audio) == null ? void 0 : J.bitRate) != null ? ce : 0) + ((Ne = (_e = ut == null ? void 0 : ut.video) == null ? void 0 : _e.bitRate) != null ? Ne : 0), nm = im * 2 > sm;
11409
+ const ie = Math.min(G + 1, L), ut = E[ie], im = (xe = this.modules.connection.estimatedBandwidth) != null ? xe : Si(), sm = ((ce = (J = ut == null ? void 0 : ut.audio) == null ? void 0 : J.bitRate) != null ? ce : 0) + ((Ne = (_e = ut == null ? void 0 : ut.video) == null ? void 0 : _e.bitRate) != null ? Ne : 0), nm = im * 2 > sm;
11405
11410
  ut && nm && this.modules.adaptivity.isQoSOk(ut) && (N = ie);
11406
11411
  }
11407
11412
  break;
@@ -11423,9 +11428,9 @@ const Ut = class Ut extends Ei {
11423
11428
  if (N === G)
11424
11429
  return;
11425
11430
  const Z = E[N];
11426
- this.alignSizeAndBitRate(M(S({}, this.targetSubscription), {
11427
- video: S(S({}, this.targetSubscription.video), Z == null ? void 0 : Z.video),
11428
- audio: S(S({}, this.targetSubscription.audio), Z == null ? void 0 : Z.audio)
11431
+ this.alignSizeAndBitRate(M(v({}, this.targetSubscription), {
11432
+ video: v(v({}, this.targetSubscription.video), Z == null ? void 0 : Z.video),
11433
+ audio: v(v({}, this.targetSubscription.audio), Z == null ? void 0 : Z.audio)
11429
11434
  })), this.emitter.emit("adapted level");
11430
11435
  }), this.emitter.on("text track data", (y) => {
11431
11436
  const E = a(this, Me).find((N) => N.language === y.language), G = this.modules.sync.getTimeshiftOffset() / 1e3, L = G - a(this, gs);
@@ -11441,7 +11446,7 @@ const Ut = class Ut extends Ei {
11441
11446
  }), this.emitter.on("received signal", (y) => {
11442
11447
  var G;
11443
11448
  const E = y, F = this.modules.subscription.getCurrentSubscription();
11444
- switch (this.logger.debug("received", S({}, E)), E.type) {
11449
+ switch (this.logger.debug("received", v({}, E)), E.type) {
11445
11450
  case "client ip":
11446
11451
  this.clientIp = E.ip;
11447
11452
  break;
@@ -11483,10 +11488,10 @@ const Ut = class Ut extends Ei {
11483
11488
  }), this.emitter.on("received data", (y) => {
11484
11489
  const E = this.modules.subscription.getCurrentSubscription(), F = sg(y);
11485
11490
  if (!E) {
11486
- this.logger.warn("Received unwanted message", S({}, F));
11491
+ this.logger.warn("Received unwanted message", v({}, F));
11487
11492
  return;
11488
11493
  }
11489
- Be(M(S({}, F), { channelId: E.channelId }));
11494
+ Be(M(v({}, F), { channelId: E.channelId }));
11490
11495
  }), this.emitter.on("received moq data", (y) => {
11491
11496
  var N, Z, xe;
11492
11497
  const E = y.payload.mediaType(), F = y.channelId, G = y.renditionId, L = this.modules.sync.processFragment(F, y.payload);
@@ -11534,7 +11539,7 @@ const Ut = class Ut extends Ei {
11534
11539
  }
11535
11540
  for (let Ne = 0; Ne < L.samplesCount(); Ne++) {
11536
11541
  const ie = L.sample(Ne);
11537
- ie && this.emitter.emit("coded sample", M(S({}, ie), {
11542
+ ie && this.emitter.emit("coded sample", M(v({}, ie), {
11538
11543
  renditionId: G,
11539
11544
  channelId: F,
11540
11545
  data: ie.data.buffer.slice(ie.data.byteOffset, ie.data.byteOffset + ie.data.byteLength)
@@ -11577,7 +11582,7 @@ const Ut = class Ut extends Ei {
11577
11582
  if (G === "text")
11578
11583
  throw new Error("Subtitles are not supported");
11579
11584
  if (this.modules.incomingData.add(G, y.payload.byteLength), Kp(y.flags)) {
11580
- const L = M(S({
11585
+ const L = M(v({
11581
11586
  type: G,
11582
11587
  data: y.payload,
11583
11588
  codec: F.codec
@@ -11877,7 +11882,7 @@ const Ut = class Ut extends Ei {
11877
11882
  */
11878
11883
  get maxVideoBitRate() {
11879
11884
  var t, i;
11880
- return (i = (t = this.modules.constraintCap.getCurrentConstraintCap()) == null ? void 0 : t.video.bitRate) != null ? i : vi();
11885
+ return (i = (t = this.modules.constraintCap.getCurrentConstraintCap()) == null ? void 0 : t.video.bitRate) != null ? i : Si();
11881
11886
  }
11882
11887
  /**
11883
11888
  * Set max video bit rate that will be subscribed to
@@ -11894,7 +11899,7 @@ const Ut = class Ut extends Ei {
11894
11899
  */
11895
11900
  get maxAudioBitRate() {
11896
11901
  var t, i;
11897
- return (i = (t = this.modules.constraintCap.getCurrentConstraintCap()) == null ? void 0 : t.audio.bitRate) != null ? i : vi();
11902
+ return (i = (t = this.modules.constraintCap.getCurrentConstraintCap()) == null ? void 0 : t.audio.bitRate) != null ? i : Si();
11898
11903
  }
11899
11904
  /**
11900
11905
  * Set max audio bit rate that will be subscribed to
@@ -11997,9 +12002,9 @@ const Ut = class Ut extends Ei {
11997
12002
  * Aligns size and bitrate to match a rendition level correctly
11998
12003
  */
11999
12004
  alignSizeAndBitRate(t) {
12000
- const i = this.modules.constraintCap.constrainSubscription(M(S({}, t), {
12001
- video: S({}, t.video),
12002
- audio: S({}, t.audio)
12005
+ const i = this.modules.constraintCap.constrainSubscription(M(v({}, t), {
12006
+ video: v({}, t.video),
12007
+ audio: v({}, t.audio)
12003
12008
  })), n = this.modules.constraintCap.getUserSpecifiedCap();
12004
12009
  !this.abrEnabled && n && (i.audio.bitRate = n.audio.bitRate, i.video.bitRate = n.video.bitRate, i.video.width = n.video.width, i.video.height = n.video.height);
12005
12010
  const o = this.modules.renditions.getRenditionLevel(i);