@oddin-gg/havik-player 2.6.2 → 2.6.4

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/docs/API.md CHANGED
@@ -776,6 +776,18 @@ reconnects with backoff, and replays the current state on connect. Every event i
776
776
  also reported via `onAlive` (including heartbeats) so callers can treat the stream as
777
777
  healthy. A subscription problem is **non-fatal**; it retries in the background.
778
778
 
779
+ A connection can also go silent **without closing** (a black-holed socket after
780
+ a laptop sleep, a NAT rebind, a half-closing proxy). Nothing in the reconnect
781
+ path above catches that on its own, so the subscription would stay permanently
782
+ dead and silent, missing a real end-of-match push without surfacing anything to
783
+ the caller. An idle watchdog covers it, in both phases: `idleTimeoutMs` spent
784
+ waiting for response headers, or `idleTimeoutMs` without a byte on an open
785
+ connection, tears that request down, reports it via `onError`, and reconnects
786
+ through the normal backoff. Both phases matter, because the reconnect the
787
+ watchdog triggers goes out over a network that just changed, which is exactly
788
+ the request most likely to hit a black hole of its own. The default (45s) is two
789
+ missed 20s server heartbeats.
790
+
779
791
  ```ts
780
792
  import { subscribeLiveState, deriveEventsBaseUrl } from '@oddin-gg/havik-player';
781
793
 
@@ -793,16 +805,17 @@ const sub = subscribeLiveState({
793
805
 
794
806
  #### `SubscribeLiveStateOptions`
795
807
 
796
- | Option | Type | Default | Description |
797
- | --------------- | --------------------------------------- | ------- | ----------------------------------------------------------------- |
798
- | `eventsBaseUrl` | `string` | — | **Required.** SSE base, e.g. from `deriveEventsBaseUrl(baseUrl)`. |
799
- | `matchUrn` | `string` | — | **Required.** |
800
- | `credential` | [`CredentialSource`](#credentialsource) | — | **Required.** |
801
- | `onState` | `(ev: LiveStateEvent) => void` | — | **Required.** Initial snapshot on connect + every transition. |
802
- | `onError` | `(err: unknown) => void` | — | Non-fatal subscription error; the client keeps retrying. |
803
- | `onAlive` | `() => void` | — | Liveness tick on every received frame (incl. heartbeats). |
804
- | `minBackoffMs` | `number` | `1000` | Reconnect backoff floor. |
805
- | `maxBackoffMs` | `number` | `15000` | Reconnect backoff ceiling. |
808
+ | Option | Type | Default | Description |
809
+ | --------------- | --------------------------------------- | ------- | ------------------------------------------------------------------ |
810
+ | `eventsBaseUrl` | `string` | — | **Required.** SSE base, e.g. from `deriveEventsBaseUrl(baseUrl)`. |
811
+ | `matchUrn` | `string` | — | **Required.** |
812
+ | `credential` | [`CredentialSource`](#credentialsource) | — | **Required.** |
813
+ | `onState` | `(ev: LiveStateEvent) => void` | — | **Required.** Initial snapshot on connect + every transition. |
814
+ | `onError` | `(err: unknown) => void` | — | Non-fatal subscription error; the client keeps retrying. |
815
+ | `onAlive` | `() => void` | — | Liveness tick on every received frame (incl. heartbeats). |
816
+ | `minBackoffMs` | `number` | `1000` | Reconnect backoff floor. |
817
+ | `maxBackoffMs` | `number` | `15000` | Reconnect backoff ceiling. |
818
+ | `idleTimeoutMs` | `number` | `45000` | Silence (awaiting headers, or bytes) before reconnecting; `0` off. |
806
819
 
807
820
  ### `isLowLatencyManifest`
808
821
 
package/embed/index.html CHANGED
@@ -23,7 +23,7 @@
23
23
  apiKey, parentOrigin). When injected, the URL query string is IGNORED for
24
24
  security; the api-key must NOT travel in the query in production.
25
25
  -->
26
- <script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.6.2/dist/havik-player.global.js" integrity="sha384-dja7s2fU5Ag8U3KY+z4fisxHpQGcAoYGqZhS8z26eXRHhsdKajVP1Y+cGwGav+m+" crossorigin="anonymous"></script>
26
+ <script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.6.4/dist/havik-player.global.js" integrity="sha384-RpkRMoFsfW9lTzl/wadwET2YJiY+1edB4Ec/boat45wKYa4GZse5nJp1wTg+A1Wa" crossorigin="anonymous"></script>
27
27
  <script>
28
28
  HavikPlayer.bootEmbed();
29
29
  </script>
@@ -12,7 +12,7 @@
12
12
  shipped in each npm release is pinned to that release with Subresource
13
13
  Integrity, injected at publish time (scripts/inject-sri.mjs). In
14
14
  production, always use a pinned + SRI'd tag like the released copy. -->
15
- <script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.6.2/dist/havik-player.global.js" integrity="sha384-dja7s2fU5Ag8U3KY+z4fisxHpQGcAoYGqZhS8z26eXRHhsdKajVP1Y+cGwGav+m+" crossorigin="anonymous"></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.6.4/dist/havik-player.global.js" integrity="sha384-RpkRMoFsfW9lTzl/wadwET2YJiY+1edB4Ec/boat45wKYa4GZse5nJp1wTg+A1Wa" crossorigin="anonymous"></script>
16
16
  <script>
17
17
  (async () => {
18
18
  const player = await HavikPlayer.createPlayer({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oddin-gg/havik-player",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "description": "Havik HTML5 player SDK — LL-HLS + DRM playback for Oddin live streams (managed, bring-your-own-player, and iframe-embed modes).",
5
5
  "type": "module",
6
6
  "sideEffects": false,