@oddin-gg/havik-player 2.27.2 → 2.28.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 +3 -3
- package/dist/havik-player.global.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +314 -230
- package/dist/index.js.map +1 -1
- package/docs/API.md +57 -23
- package/embed/index.html +1 -1
- package/examples/vanilla.html +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -271,6 +271,20 @@ export declare interface CreatePlayerOptions {
|
|
|
271
271
|
* hands capping to hls.js.
|
|
272
272
|
*/
|
|
273
273
|
stallCap?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Stuck-freeze reload (native engine: Safari, iPhone, iPad; live only):
|
|
276
|
+
* when the playhead has not moved and the buffered media under it has not
|
|
277
|
+
* grown for 8 s, with the page visible, the element playing and the
|
|
278
|
+
* browser online, the player reloads the stream at the live edge. WebKit's
|
|
279
|
+
* native HLS has a freeze it never leaves by itself: on production iPhone
|
|
280
|
+
* Safari over 8 days to 2026-11-04 there were 2.31 such freezes per
|
|
281
|
+
* watch-hour (hls.js on Android, same CDN slots and countries: 0.35), not
|
|
282
|
+
* one recovered on its own, and viewers paused or left after a median
|
|
283
|
+
* 24 s. At most twice per 30 s of healthy playback; a slow start, a seek,
|
|
284
|
+
* a pause, a hidden tab and an offline browser never count. Each reload
|
|
285
|
+
* counts in `stuckReloads`. Default: true.
|
|
286
|
+
*/
|
|
287
|
+
stuckReload?: boolean;
|
|
274
288
|
/**
|
|
275
289
|
* DRM cold start: download the first init segment and parts while the
|
|
276
290
|
* first key is still being acquired, instead of after it (hls.js waits for
|
|
@@ -1007,6 +1021,13 @@ export declare class PlaybackError extends Error {
|
|
|
1007
1021
|
* upper-case ISO 3166-1 alpha-2 tag (e.g. "RU"). Absent on every other code.
|
|
1008
1022
|
*/
|
|
1009
1023
|
readonly country?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* The engine's own name for the failure, when it supplied one: an hls.js
|
|
1026
|
+
* `ErrorDetails` value (`keySystemNoAccess`, `bufferStalledError`, …).
|
|
1027
|
+
* Absent on errors the SDK or the server raised. Branch on this, not on
|
|
1028
|
+
* `message`, to tell one engine failure from another.
|
|
1029
|
+
*/
|
|
1030
|
+
readonly detail?: string;
|
|
1010
1031
|
constructor(code: PlaybackErrorCode, httpStatus: number, message: string, init?: PlaybackErrorInit);
|
|
1011
1032
|
}
|
|
1012
1033
|
|
|
@@ -1028,6 +1049,12 @@ export declare interface PlaybackErrorInit {
|
|
|
1028
1049
|
* carried on a GEO_DENIED body so the player can name it.
|
|
1029
1050
|
*/
|
|
1030
1051
|
country?: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* The engine's own name for the failure (an hls.js `ErrorDetails` value
|
|
1054
|
+
* such as `keySystemNoAccess`), when it supplied one. `message` is composed
|
|
1055
|
+
* prose; this is the value to branch on.
|
|
1056
|
+
*/
|
|
1057
|
+
detail?: string;
|
|
1031
1058
|
cause?: unknown;
|
|
1032
1059
|
}
|
|
1033
1060
|
|
|
@@ -1090,6 +1117,10 @@ export declare interface PlaybackStats {
|
|
|
1090
1117
|
/** Times a playback stall stepped the ABR ceiling down one rung this session
|
|
1091
1118
|
* (hls.js engine only; see `stallCap`). */
|
|
1092
1119
|
stallDownCaps?: number;
|
|
1120
|
+
/** Times the stuck-freeze watchdog reloaded the stream because the playhead
|
|
1121
|
+
* and the buffered end both stopped for 8 s (native engine only; see
|
|
1122
|
+
* `stuckReload`). */
|
|
1123
|
+
stuckReloads?: number;
|
|
1093
1124
|
/** Height of the highest rendition ABR may pick right now (hls.js engine
|
|
1094
1125
|
* only). Present only while a ceiling is in force; a viewer stuck at 540p
|
|
1095
1126
|
* reads it next to `levelHeight` to see the ceiling, not the network. */
|
package/dist/index.d.ts
CHANGED
|
@@ -271,6 +271,20 @@ export declare interface CreatePlayerOptions {
|
|
|
271
271
|
* hands capping to hls.js.
|
|
272
272
|
*/
|
|
273
273
|
stallCap?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Stuck-freeze reload (native engine: Safari, iPhone, iPad; live only):
|
|
276
|
+
* when the playhead has not moved and the buffered media under it has not
|
|
277
|
+
* grown for 8 s, with the page visible, the element playing and the
|
|
278
|
+
* browser online, the player reloads the stream at the live edge. WebKit's
|
|
279
|
+
* native HLS has a freeze it never leaves by itself: on production iPhone
|
|
280
|
+
* Safari over 8 days to 2026-11-04 there were 2.31 such freezes per
|
|
281
|
+
* watch-hour (hls.js on Android, same CDN slots and countries: 0.35), not
|
|
282
|
+
* one recovered on its own, and viewers paused or left after a median
|
|
283
|
+
* 24 s. At most twice per 30 s of healthy playback; a slow start, a seek,
|
|
284
|
+
* a pause, a hidden tab and an offline browser never count. Each reload
|
|
285
|
+
* counts in `stuckReloads`. Default: true.
|
|
286
|
+
*/
|
|
287
|
+
stuckReload?: boolean;
|
|
274
288
|
/**
|
|
275
289
|
* DRM cold start: download the first init segment and parts while the
|
|
276
290
|
* first key is still being acquired, instead of after it (hls.js waits for
|
|
@@ -1007,6 +1021,13 @@ export declare class PlaybackError extends Error {
|
|
|
1007
1021
|
* upper-case ISO 3166-1 alpha-2 tag (e.g. "RU"). Absent on every other code.
|
|
1008
1022
|
*/
|
|
1009
1023
|
readonly country?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* The engine's own name for the failure, when it supplied one: an hls.js
|
|
1026
|
+
* `ErrorDetails` value (`keySystemNoAccess`, `bufferStalledError`, …).
|
|
1027
|
+
* Absent on errors the SDK or the server raised. Branch on this, not on
|
|
1028
|
+
* `message`, to tell one engine failure from another.
|
|
1029
|
+
*/
|
|
1030
|
+
readonly detail?: string;
|
|
1010
1031
|
constructor(code: PlaybackErrorCode, httpStatus: number, message: string, init?: PlaybackErrorInit);
|
|
1011
1032
|
}
|
|
1012
1033
|
|
|
@@ -1028,6 +1049,12 @@ export declare interface PlaybackErrorInit {
|
|
|
1028
1049
|
* carried on a GEO_DENIED body so the player can name it.
|
|
1029
1050
|
*/
|
|
1030
1051
|
country?: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* The engine's own name for the failure (an hls.js `ErrorDetails` value
|
|
1054
|
+
* such as `keySystemNoAccess`), when it supplied one. `message` is composed
|
|
1055
|
+
* prose; this is the value to branch on.
|
|
1056
|
+
*/
|
|
1057
|
+
detail?: string;
|
|
1031
1058
|
cause?: unknown;
|
|
1032
1059
|
}
|
|
1033
1060
|
|
|
@@ -1090,6 +1117,10 @@ export declare interface PlaybackStats {
|
|
|
1090
1117
|
/** Times a playback stall stepped the ABR ceiling down one rung this session
|
|
1091
1118
|
* (hls.js engine only; see `stallCap`). */
|
|
1092
1119
|
stallDownCaps?: number;
|
|
1120
|
+
/** Times the stuck-freeze watchdog reloaded the stream because the playhead
|
|
1121
|
+
* and the buffered end both stopped for 8 s (native engine only; see
|
|
1122
|
+
* `stuckReload`). */
|
|
1123
|
+
stuckReloads?: number;
|
|
1093
1124
|
/** Height of the highest rendition ABR may pick right now (hls.js engine
|
|
1094
1125
|
* only). Present only while a ceiling is in force; a viewer stuck at 540p
|
|
1095
1126
|
* reads it next to `levelHeight` to see the ceiling, not the network. */
|