@oddin-gg/havik-player 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/havik-player.global.js +1 -1
- package/dist/havik-player.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/embed/index.html +1 -1
- package/examples/vanilla.html +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1685,18 +1685,20 @@ var lt = class {
|
|
|
1685
1685
|
}
|
|
1686
1686
|
flush(e = !1) {
|
|
1687
1687
|
if (this.firstFlushTimer &&= (clearTimeout(this.firstFlushTimer), null), this.pendingStart = null, this.pending.length === 0) return;
|
|
1688
|
-
let t =
|
|
1688
|
+
let t = { beacons: this.pending };
|
|
1689
|
+
this.opts.apiKey && (t.apiKey = this.opts.apiKey);
|
|
1690
|
+
let n = JSON.stringify(t);
|
|
1689
1691
|
if (this.pending = [], e) {
|
|
1690
1692
|
let e = this.opts.sendBeacon ?? (typeof navigator < "u" && navigator.sendBeacon ? navigator.sendBeacon.bind(navigator) : void 0);
|
|
1691
|
-
if (e && e(this.url,
|
|
1693
|
+
if (e && e(this.url, n)) return;
|
|
1692
1694
|
}
|
|
1693
|
-
let
|
|
1694
|
-
if (!
|
|
1695
|
-
let
|
|
1696
|
-
this.opts.apiKey && (
|
|
1695
|
+
let r = this.opts.fetchFn ?? (typeof fetch < "u" ? fetch : void 0);
|
|
1696
|
+
if (!r) return;
|
|
1697
|
+
let i = { "content-type": "application/json" };
|
|
1698
|
+
this.opts.apiKey && (i["x-api-key"] = this.opts.apiKey), r(this.url, {
|
|
1697
1699
|
method: "POST",
|
|
1698
|
-
headers:
|
|
1699
|
-
body:
|
|
1700
|
+
headers: i,
|
|
1701
|
+
body: n,
|
|
1700
1702
|
keepalive: !0
|
|
1701
1703
|
}).catch(() => {});
|
|
1702
1704
|
}
|
|
@@ -1776,7 +1778,7 @@ async function mt() {
|
|
|
1776
1778
|
}
|
|
1777
1779
|
//#endregion
|
|
1778
1780
|
//#region src/core/version.ts
|
|
1779
|
-
var ht = "2.
|
|
1781
|
+
var ht = "2.6.0", J = {
|
|
1780
1782
|
accent: "#E1B600",
|
|
1781
1783
|
accentText: "#1B1C23",
|
|
1782
1784
|
background: "#0e0f13",
|