@oddin-gg/havik-player 2.5.0 → 2.5.1
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.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/embed/index.html +1 -1
- package/examples/vanilla.html +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -663,7 +663,15 @@ export declare interface PlaybackErrorInit {
|
|
|
663
663
|
|
|
664
664
|
export declare interface PlaybackStats {
|
|
665
665
|
droppedFrames: number;
|
|
666
|
-
/**
|
|
666
|
+
/**
|
|
667
|
+
* TOTAL frames this session — the denominator dropped frames need, and it
|
|
668
|
+
* ALREADY INCLUDES the dropped ones (it is
|
|
669
|
+
* `VideoPlaybackQuality.totalVideoFrames`). So the ratio is
|
|
670
|
+
* `droppedFrames / decodedFrames`, with nothing added to the bottom.
|
|
671
|
+
*
|
|
672
|
+
* The name says "decoded" because it is the wire field's name and a
|
|
673
|
+
* contract rename is not worth a migration (plan D10). Read it as "total".
|
|
674
|
+
*/
|
|
667
675
|
decodedFrames?: number;
|
|
668
676
|
/** Live-edge latency in seconds (hls.js engine only). */
|
|
669
677
|
latencySeconds?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -663,7 +663,15 @@ export declare interface PlaybackErrorInit {
|
|
|
663
663
|
|
|
664
664
|
export declare interface PlaybackStats {
|
|
665
665
|
droppedFrames: number;
|
|
666
|
-
/**
|
|
666
|
+
/**
|
|
667
|
+
* TOTAL frames this session — the denominator dropped frames need, and it
|
|
668
|
+
* ALREADY INCLUDES the dropped ones (it is
|
|
669
|
+
* `VideoPlaybackQuality.totalVideoFrames`). So the ratio is
|
|
670
|
+
* `droppedFrames / decodedFrames`, with nothing added to the bottom.
|
|
671
|
+
*
|
|
672
|
+
* The name says "decoded" because it is the wire field's name and a
|
|
673
|
+
* contract rename is not worth a migration (plan D10). Read it as "total".
|
|
674
|
+
*/
|
|
667
675
|
decodedFrames?: number;
|
|
668
676
|
/** Live-edge latency in seconds (hls.js engine only). */
|
|
669
677
|
latencySeconds?: number;
|
package/dist/index.js
CHANGED
|
@@ -682,7 +682,7 @@ function R(e) {
|
|
|
682
682
|
let t = e.getVideoPlaybackQuality?.();
|
|
683
683
|
return {
|
|
684
684
|
dropped: t?.droppedVideoFrames ?? 0,
|
|
685
|
-
|
|
685
|
+
totalFrames: t?.totalVideoFrames ?? 0
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
function Me(e, t) {
|
|
@@ -873,7 +873,7 @@ var V = class {
|
|
|
873
873
|
getStats() {
|
|
874
874
|
let e = this.deps.video, t = R(e), n = {
|
|
875
875
|
droppedFrames: t.dropped,
|
|
876
|
-
decodedFrames: t.
|
|
876
|
+
decodedFrames: t.totalFrames
|
|
877
877
|
};
|
|
878
878
|
return this.cdnHost ||= je(this.builtAt), this.cdnHost && (n.cdnHost = this.cdnHost), this.deps.descriptor.drmEnabled && (n.keySystem = "fairplay"), e.duration === Infinity && (n.isLive = !0, e.seekable.length > 0 && (n.atLiveEdge = e.currentTime >= e.seekable.end(e.seekable.length - 1) - 2)), n;
|
|
879
879
|
}
|
|
@@ -1195,7 +1195,7 @@ var U = class {
|
|
|
1195
1195
|
getStats() {
|
|
1196
1196
|
let e = this.hls, t = R(this.deps.video), n = {
|
|
1197
1197
|
droppedFrames: t.dropped,
|
|
1198
|
-
decodedFrames: t.
|
|
1198
|
+
decodedFrames: t.totalFrames,
|
|
1199
1199
|
lowLatency: this.detectedLowLatency,
|
|
1200
1200
|
bytesLoaded: this.bytesLoaded,
|
|
1201
1201
|
playlistBytesLoaded: this.playlistBytesLoaded,
|
|
@@ -1738,12 +1738,21 @@ function dt() {
|
|
|
1738
1738
|
function ft() {
|
|
1739
1739
|
let e = typeof navigator < "u" ? navigator.connection : void 0;
|
|
1740
1740
|
if (!e) return { connectionType: "CONNECTION_TYPE_UNKNOWN" };
|
|
1741
|
-
let t = {
|
|
1741
|
+
let t = {
|
|
1742
1742
|
wifi: "CONNECTION_TYPE_WIFI",
|
|
1743
1743
|
cellular: "CONNECTION_TYPE_CELLULAR",
|
|
1744
1744
|
ethernet: "CONNECTION_TYPE_ETHERNET"
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1745
|
+
}, n = {
|
|
1746
|
+
"slow-2g": "RADIO_ACCESS_ESTIMATED_SLOW_2G",
|
|
1747
|
+
"2g": "RADIO_ACCESS_ESTIMATED_2G",
|
|
1748
|
+
"3g": "RADIO_ACCESS_ESTIMATED_3G",
|
|
1749
|
+
"4g": "RADIO_ACCESS_ESTIMATED_4G"
|
|
1750
|
+
}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, i = { connectionType: e.type ? r(t, e.type) ?? "CONNECTION_TYPE_OTHER" : "CONNECTION_TYPE_UNKNOWN" };
|
|
1751
|
+
if (e.effectiveType) {
|
|
1752
|
+
let t = r(n, e.effectiveType);
|
|
1753
|
+
t && (i.radioAccess = t);
|
|
1754
|
+
}
|
|
1755
|
+
return typeof e.downlink == "number" && e.downlink > 0 && (i.downlinkKbps = Math.round(e.downlink * 1e3)), typeof e.rtt == "number" && e.rtt > 0 && (i.rttMs = Math.round(e.rtt)), e.saveData && (i.saveData = !0), i;
|
|
1747
1756
|
}
|
|
1748
1757
|
function pt(e) {
|
|
1749
1758
|
let t = ut(), n = {
|
|
@@ -1767,7 +1776,7 @@ async function mt() {
|
|
|
1767
1776
|
}
|
|
1768
1777
|
//#endregion
|
|
1769
1778
|
//#region src/core/version.ts
|
|
1770
|
-
var ht = "2.5.
|
|
1779
|
+
var ht = "2.5.1", J = {
|
|
1771
1780
|
accent: "#E1B600",
|
|
1772
1781
|
accentText: "#1B1C23",
|
|
1773
1782
|
background: "#0e0f13",
|