@vindral/web-sdk 4.5.1-28-g9cc413f1 → 4.5.1-29-gb7cd696c8

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.
@@ -6355,29 +6355,31 @@ function zp() {
6355
6355
  }), i;
6356
6356
  }), zp.apply(this, arguments);
6357
6357
  }
6358
- function Bp(e) {
6358
+ function Bp(e, t) {
6359
6359
  return Vp.apply(this, arguments);
6360
6360
  }
6361
6361
  function Vp() {
6362
- return Vp = t(function* (e) {
6363
- let t = new WebTransport(e.url, {
6362
+ return Vp = t(function* (e, t) {
6363
+ let n = new WebTransport(e.url, {
6364
6364
  congestionControl: "low-latency",
6365
6365
  serverCertificateHashes: e.serverCertificateHashes
6366
- }), n = () => {
6367
- t.close();
6366
+ });
6367
+ t == null || t.addEventListener("abort", () => n.close(), { once: !0 });
6368
+ let r = () => {
6369
+ n.close();
6368
6370
  };
6369
- typeof window < "u" && typeof window.addEventListener == "function" && (window.addEventListener("beforeunload", n), t.closed.finally(() => {
6370
- window.removeEventListener("beforeunload", n);
6371
- }).catch(() => {})), yield Promise.race([t.ready, t.closed.then(() => Promise.reject(/* @__PURE__ */ Error("WebTransport closed")))]);
6372
- let r = yield t.createBidirectionalStream(), i = bd.wrapWebTransport(r), a = Cd(i, e.role).catch(() => {
6373
- t.close();
6371
+ typeof window < "u" && typeof window.addEventListener == "function" && (window.addEventListener("beforeunload", r), n.closed.finally(() => {
6372
+ window.removeEventListener("beforeunload", r);
6373
+ }).catch(() => {})), yield Promise.race([n.ready, n.closed.then(() => Promise.reject(/* @__PURE__ */ Error("WebTransport closed")))]);
6374
+ let i = yield n.createBidirectionalStream(), a = bd.wrapWebTransport(i), o = Cd(a, e.role).catch(() => {
6375
+ n.close();
6374
6376
  });
6375
- e.handshakePipelining || (yield a);
6376
- let o = new Qf(new Pp(t, i, e.url.toString()), e.authToken);
6377
+ e.handshakePipelining || (yield o);
6378
+ let s = new Qf(new Pp(n, a, e.url.toString()), e.authToken);
6377
6379
  return Lp.info("connected", {
6378
6380
  url: e.url,
6379
6381
  transport: "webtransport"
6380
- }), o;
6382
+ }), s;
6381
6383
  }), Vp.apply(this, arguments);
6382
6384
  }
6383
6385
  function Hp(e) {
@@ -6390,14 +6392,16 @@ function Up() {
6390
6392
  session: yield Bp(e),
6391
6393
  transportSelectionReason: void 0
6392
6394
  };
6393
- let t = Bp(e).catch(() => Rp(e)), n = yield Promise.race([t, yn(e.websocketFallbackTimeoutMs)]);
6394
- return n ? {
6395
- session: n,
6396
- transportSelectionReason: n.transportType() === "websocket" ? "fallback" : void 0
6397
- } : {
6395
+ let t = new AbortController(), n = Bp(e, t.signal).catch(() => void 0), r, i = new Promise((t) => {
6396
+ r = setTimeout(() => t(void 0), e.websocketFallbackTimeoutMs);
6397
+ }), a = yield Promise.race([n, i]).finally(() => clearTimeout(r));
6398
+ return a ? {
6399
+ session: a,
6400
+ transportSelectionReason: void 0
6401
+ } : (t.abort(), n.then((e) => e == null ? void 0 : e.close()), {
6398
6402
  session: yield Rp(e),
6399
6403
  transportSelectionReason: "fallback"
6400
- };
6404
+ });
6401
6405
  }
6402
6406
  let t;
6403
6407
  return t = (e == null ? void 0 : e.preferredTransport) === "websocket" ? "disabled" : self.WebTransport ? "unavailable" : "unsupported", {
@@ -11848,7 +11852,7 @@ var Ay = class {
11848
11852
  let e = this.modules.canvasModule instanceof Bv ? !0 : void 0;
11849
11853
  return D({
11850
11854
  uptime: this.uptime,
11851
- version: "4.5.1-28-g9cc413f1",
11855
+ version: "4.5.1-29-gb7cd696c8",
11852
11856
  clientId: this.clientId,
11853
11857
  sessionId: this.sessionId,
11854
11858
  channelId: this.channelId,
@@ -1,5 +1,5 @@
1
1
  import { n as e, t } from "./BsfwXDui.js";
2
- import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se } from "./viWJT_nb.js";
2
+ import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se } from "./BI3SGgfO.js";
3
3
  import { F as ce } from "./BBVSf5AB.js";
4
4
  import { i as f, n as p, r as m, t as h } from "./DSw1XhvD.js";
5
5
  import { c as le, n as ue, t as de } from "./BOdyvABa.js";
package/core.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as e } from "./viWJT_nb.js";
1
+ import { t as e } from "./BI3SGgfO.js";
2
2
  import { a as t, c as n, d as r, f as i, i as a, l as o, n as s, o as c, r as l, s as u } from "./BBVSf5AB.js";
3
3
  export { s as AUTHENTICATION_EXPIRED_CODE, l as AUTHENTICATION_FAILED_CODE, a as CHANNEL_NOT_FOUND_CODE, t as CHANNEL_NOT_LIVE_CODE, c as CONNECTION_FAILED_AFTER_RETRIES_CODE, u as CONNECTION_FAILED_CODE, n as DISCONNECTED_BY_EDGE, o as INACTIVITY_CODE, r as NO_INCOMING_DATA, e as Vindral, i as VindralError };
package/legacy.es.js CHANGED
@@ -7335,29 +7335,31 @@ function lg() {
7335
7335
  }), i;
7336
7336
  }), lg.apply(this, arguments);
7337
7337
  }
7338
- function ug(e) {
7338
+ function ug(e, t) {
7339
7339
  return dg.apply(this, arguments);
7340
7340
  }
7341
7341
  function dg() {
7342
- return dg = N(function* (e) {
7343
- let t = new WebTransport(e.url, {
7342
+ return dg = N(function* (e, t) {
7343
+ let n = new WebTransport(e.url, {
7344
7344
  congestionControl: "low-latency",
7345
7345
  serverCertificateHashes: e.serverCertificateHashes
7346
- }), n = () => {
7347
- t.close();
7346
+ });
7347
+ t == null || t.addEventListener("abort", () => n.close(), { once: !0 });
7348
+ let r = () => {
7349
+ n.close();
7348
7350
  };
7349
- typeof window < "u" && typeof window.addEventListener == "function" && (window.addEventListener("beforeunload", n), t.closed.finally(() => {
7350
- window.removeEventListener("beforeunload", n);
7351
- }).catch(() => {})), yield Promise.race([t.ready, t.closed.then(() => Promise.reject(/* @__PURE__ */ Error("WebTransport closed")))]);
7352
- let r = yield t.createBidirectionalStream(), i = Wp.wrapWebTransport(r), a = qp(i, e.role).catch(() => {
7353
- t.close();
7351
+ typeof window < "u" && typeof window.addEventListener == "function" && (window.addEventListener("beforeunload", r), n.closed.finally(() => {
7352
+ window.removeEventListener("beforeunload", r);
7353
+ }).catch(() => {})), yield Promise.race([n.ready, n.closed.then(() => Promise.reject(/* @__PURE__ */ Error("WebTransport closed")))]);
7354
+ let i = yield n.createBidirectionalStream(), a = Wp.wrapWebTransport(i), o = qp(a, e.role).catch(() => {
7355
+ n.close();
7354
7356
  });
7355
- e.handshakePipelining || (yield a);
7356
- let o = new Sh(new ig(t, i, e.url.toString()), e.authToken);
7357
+ e.handshakePipelining || (yield o);
7358
+ let s = new Sh(new ig(n, a, e.url.toString()), e.authToken);
7357
7359
  return sg.info("connected", {
7358
7360
  url: e.url,
7359
7361
  transport: "webtransport"
7360
- }), o;
7362
+ }), s;
7361
7363
  }), dg.apply(this, arguments);
7362
7364
  }
7363
7365
  function fg(e) {
@@ -7370,14 +7372,16 @@ function pg() {
7370
7372
  session: yield ug(e),
7371
7373
  transportSelectionReason: void 0
7372
7374
  };
7373
- let t = ug(e).catch(() => cg(e)), n = yield Promise.race([t, hr(e.websocketFallbackTimeoutMs)]);
7374
- return n ? {
7375
- session: n,
7376
- transportSelectionReason: n.transportType() === "websocket" ? "fallback" : void 0
7377
- } : {
7375
+ let t = new AbortController(), n = ug(e, t.signal).catch(() => void 0), r, i = new Promise((t) => {
7376
+ r = setTimeout(() => t(void 0), e.websocketFallbackTimeoutMs);
7377
+ }), a = yield Promise.race([n, i]).finally(() => clearTimeout(r));
7378
+ return a ? {
7379
+ session: a,
7380
+ transportSelectionReason: void 0
7381
+ } : (t.abort(), n.then((e) => e == null ? void 0 : e.close()), {
7378
7382
  session: yield cg(e),
7379
7383
  transportSelectionReason: "fallback"
7380
- };
7384
+ });
7381
7385
  }
7382
7386
  let t;
7383
7387
  return t = (e == null ? void 0 : e.preferredTransport) === "websocket" ? "disabled" : self.WebTransport ? "unavailable" : "unsupported", {
@@ -13440,7 +13444,7 @@ var YS = 1e4, XS = 1280 * 720, ZS = /* @__PURE__ */ new WeakMap(), QS = /* @__PU
13440
13444
  let e = this.modules.canvasModule instanceof Vx ? !0 : void 0;
13441
13445
  return z({
13442
13446
  uptime: this.uptime,
13443
- version: "4.5.1-28-g9cc413f1",
13447
+ version: "4.5.1-29-gb7cd696c8",
13444
13448
  clientId: this.clientId,
13445
13449
  sessionId: this.sessionId,
13446
13450
  channelId: this.channelId,