@oddin-gg/havik-player 1.1.0 → 1.2.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.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/docs/API.md +10 -4
- package/embed/index.html +1 -1
- package/package.json +1 -1
package/docs/API.md
CHANGED
|
@@ -226,7 +226,7 @@ player.on('error', (e) => console.error(e.code, e.httpStatus, e.message));
|
|
|
226
226
|
| `poster` | `string` | — | Poster image shown before playback starts. |
|
|
227
227
|
| `startLevel` | `number` | `-1` | Initial rendition index (`-1` = auto). With auto, ABR starts on a conservative, sustainable rendition (~360p) and ramps up as bandwidth allows — see [Low‑latency & adaptive bitrate](#low-latency--adaptive-bitrate). |
|
|
228
228
|
| `maxBitrate` | `number` | — | Cap ABR to renditions at/below this bitrate (bps). |
|
|
229
|
-
| `liveLatencyTarget` | `number` | `
|
|
229
|
+
| `liveLatencyTarget` | `number` | `2` | Target live‑edge latency in seconds (hls.js `liveSyncDuration`). The player derives a matching latency **ceiling** internally and catches up at 1.5×, so this is the only live‑latency knob you need. Lower = closer to live but more rebuffer‑prone. Live/LL only. |
|
|
230
230
|
| `snapToLiveOnRefocus` | `boolean` | `true` | Snap to the live edge when a backgrounded tab is refocused while far behind. Live/LL only. |
|
|
231
231
|
| `liveStateEvents` | `boolean` | `true` | Use the push-based **live-state SSE** channel for go-live and end-of-stream (see [Live state](#live-state-sse)). Graceful: falls back to polling if the endpoint is unreachable. Set `false` to disable. |
|
|
232
232
|
| `eventsBaseUrl` | `string` | derived | Override the SSE endpoint base. Default: `baseUrl` with the host prefixed by `events.` (e.g. `feed.<d>` → `events.<d>`). |
|
|
@@ -236,15 +236,15 @@ player.on('error', (e) => console.error(e.code, e.httpStatus, e.message));
|
|
|
236
236
|
The player ships tuned defaults for Oddin's low‑latency HLS, so you normally
|
|
237
237
|
don't need to set any of the live or ABR knobs:
|
|
238
238
|
|
|
239
|
-
- **Live latency** — playback targets **~
|
|
239
|
+
- **Live latency** — playback targets **~2 s** behind the live edge
|
|
240
240
|
(`liveLatencyTarget` → hls.js `liveSyncDuration`). It deliberately sits back
|
|
241
241
|
from the bleeding `PART‑HOLD‑BACK` edge, where the newest partial segments
|
|
242
242
|
aren't reliably published yet; chasing that edge causes constant rebuffering.
|
|
243
243
|
Set `liveLatencyTarget` lower for closer‑to‑live (more rebuffer‑prone) or
|
|
244
|
-
higher for steadier playback.
|
|
244
|
+
higher for steadier playback. _Lowered from 3 s — see the migration note below._
|
|
245
245
|
- **Drift ceiling** — after a stall, the player catches up at up to **1.5×** and,
|
|
246
246
|
as a backstop, force‑seeks back toward the target once latency exceeds an
|
|
247
|
-
internal **ceiling (~12 s, derived as `liveLatencyTarget + 9`)**. This is what
|
|
247
|
+
internal **ceiling (~12 s, derived as `max(12, liveLatencyTarget + 9)`)**. This is what
|
|
248
248
|
stops latency from snowballing to tens of seconds after buffering. The ceiling
|
|
249
249
|
is internal and always kept above your `liveLatencyTarget`.
|
|
250
250
|
- **Over‑seek clamp** — the drift ceiling's counterpart on the _near_ side. A seek
|
|
@@ -280,6 +280,12 @@ can't crash the player: if you pass the count‑based `liveSyncDurationCount` /
|
|
|
280
280
|
rejects mixing the two); if you set `liveSyncDuration` alone, a matching ceiling
|
|
281
281
|
is derived above it.
|
|
282
282
|
|
|
283
|
+
> **Migration note:** the default `liveLatencyTarget` **dropped from 3 s to 2 s**.
|
|
284
|
+
> Nothing to change — the drift ceiling stays 12 s and the ABR reaction budgets
|
|
285
|
+
> are derived from the target, so they tighten with it automatically. Expect
|
|
286
|
+
> playback ~1 s closer to live. If you were relying on the old behaviour, pass
|
|
287
|
+
> `liveLatencyTarget: 3` explicitly.
|
|
288
|
+
|
|
283
289
|
> **Migration note:** `liveCatchUpRate` was **removed** as a public option — the
|
|
284
290
|
> catch‑up rate (1.5×) is now managed internally alongside the drift ceiling. If
|
|
285
291
|
> you set it before, drop it; reach for `hlsConfig.maxLiveSyncPlaybackRate` only
|
package/embed/index.html
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
apiKey, parentOrigin). When injected, the URL query string is IGNORED for
|
|
19
19
|
security; the api-key must NOT travel in the query in production.
|
|
20
20
|
-->
|
|
21
|
-
<script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@1.
|
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@1.2.0/dist/havik-player.global.js" integrity="sha384-xlhuEyjXmH+i5h/uDHbq7qDClRNwVVbbm6ZNstinanu2eLw5TwtP300ByLacLnbv" crossorigin="anonymous"></script>
|
|
22
22
|
<script>
|
|
23
23
|
HavikPlayer.bootEmbed();
|
|
24
24
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oddin-gg/havik-player",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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,
|