@oddin-gg/havik-player 2.12.0 → 2.13.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/README.md +4 -1
- package/dist/havik-player.global.js +18 -18
- 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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +310 -266
- package/dist/index.js.map +1 -1
- package/docs/API.md +14 -12
- package/embed/index.html +1 -1
- package/examples/vanilla.html +1 -1
- package/package.json +1 -1
package/docs/API.md
CHANGED
|
@@ -282,9 +282,11 @@ don't need to set any of the live or ABR knobs:
|
|
|
282
282
|
`seekToLive()` are the way back to the edge); on VOD the bar covers the full
|
|
283
283
|
duration. Bring‑your‑own‑player (Mode B) owns its own seek UI and needs the
|
|
284
284
|
equivalent clamp itself.
|
|
285
|
-
- **
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
- **Small‑gap tolerance**: `maxBufferHole` is raised to **0.5 s** (hls.js
|
|
286
|
+
default 0.1 s), so a small hole in the buffer is tolerated instead of causing
|
|
287
|
+
a rebuffer. It is headroom, not a workaround: on the streams sampled so far,
|
|
288
|
+
audio is contiguous across segment and part boundaries, and the shorter last
|
|
289
|
+
part of each segment (~0.45 s) is media, not a gap.
|
|
288
290
|
- **Start quality**: auto ABR seeds a **~1 Mbps** estimate so the first
|
|
289
291
|
rendition is one a modest link can sustain (**~360p**) and then **ramps up**
|
|
290
292
|
within a few seconds as measured bandwidth allows, rather than grabbing a high
|
|
@@ -379,7 +381,7 @@ Notes:
|
|
|
379
381
|
| `paused` | `void` | Playback is paused. |
|
|
380
382
|
| `ended` | `EndedReason \| undefined` | The live stream ended; playback stops and the last frame is kept. The payload says **why**: `'interrupted'` (the match is still running, and its stream dropped, so show "reconnecting", **never** "ended"; the player rejoins by itself) or `'match_ended'` (a real end). `undefined` = the end came from the HLS staleness watchdog, or a server predating the field; treat it as a real end. Fires **again** with `'match_ended'` if an interruption later turns out to be the end, so don't latch on the first one. Also readable any time as `player.endedReason`. |
|
|
381
383
|
| `error` | [`PlaybackError`](#playbackerror) | A fatal error occurred (playback stopped). |
|
|
382
|
-
| `warning` | [`PlaybackError`](#playbackerror) | A non-fatal condition (e.g. FairPlay passthrough, a failed license refresh,
|
|
384
|
+
| `warning` | [`PlaybackError`](#playbackerror) | A non-fatal condition (e.g. FairPlay passthrough, a failed license refresh, **QoE beacons disabled because the endpoint could not be derived** — see [`analytics`](#createplayeroptions) — or **QoE beacons refused by the page's Content-Security-Policy**, naming the origin to add to `connect-src`). Playback continues. |
|
|
383
385
|
| `autoplayblocked` | `void` | The browser blocked autoplay (`NotAllowedError`). Show a tap-to-play / tap-to-unmute affordance, then call `player.play()` from the gesture. |
|
|
384
386
|
| `qualitychange` | `number` | Active rendition changed (level index, `-1` = auto). |
|
|
385
387
|
| `audiotrackchange` | `number` | Active audio track changed (track id). |
|
|
@@ -763,14 +765,14 @@ const watcher = watchStatus({
|
|
|
763
765
|
|
|
764
766
|
#### `WatchStatusOptions`
|
|
765
767
|
|
|
766
|
-
| Option | Type | Default | Description
|
|
767
|
-
| ------------ | --------------------------------------- | ------- |
|
|
768
|
-
| `baseUrl` | `string` | — | **Required.**
|
|
769
|
-
| `matchUrn` | `string` | — | **Required.**
|
|
770
|
-
| `credential` | [`CredentialSource`](#credentialsource) | — | **Required.**
|
|
771
|
-
| `onChange` | `(status: MatchStatus) => void` | — | **Required.** Fired on first read, then on any status, teams or start change.
|
|
772
|
-
| `onError` | `(err: PlaybackError) => void` | — | Fired on a poll error; polling continues.
|
|
773
|
-
| `intervalMs` | `number` | `10000` | Poll interval (floored at `2000`).
|
|
768
|
+
| Option | Type | Default | Description |
|
|
769
|
+
| ------------ | --------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
770
|
+
| `baseUrl` | `string` | — | **Required.** |
|
|
771
|
+
| `matchUrn` | `string` | — | **Required.** |
|
|
772
|
+
| `credential` | [`CredentialSource`](#credentialsource) | — | **Required.** |
|
|
773
|
+
| `onChange` | `(status: MatchStatus) => void` | — | **Required.** Fired on first read, then on any status, teams or start change. |
|
|
774
|
+
| `onError` | `(err: PlaybackError) => void` | — | Fired on a poll error; polling continues, except on `NOT_FOUND`, `GONE` or `INVALID_URN`: the watcher stops itself and this is its last call. |
|
|
775
|
+
| `intervalMs` | `number` | `10000` | Poll interval (floored at `2000`). |
|
|
774
776
|
|
|
775
777
|
<a id="live-state-sse"></a>
|
|
776
778
|
|
package/embed/index.html
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
beacons endpoint can be derived and QoE analytics is silently off.
|
|
29
29
|
`analytics` is honoured from the injected config only, never the query.
|
|
30
30
|
-->
|
|
31
|
-
<script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.13.1/dist/havik-player.global.js" integrity="sha384-Ct4ZlpTNiWMbtKCo8d52uoSElmYIBpTVj5AgN8kj8KxV6jU7Ok9dDqSg8Id2k5Kd" crossorigin="anonymous"></script>
|
|
32
32
|
<script>
|
|
33
33
|
HavikPlayer.bootEmbed();
|
|
34
34
|
</script>
|
package/examples/vanilla.html
CHANGED
|
@@ -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.
|
|
15
|
+
<script src="https://cdn.jsdelivr.net/npm/@oddin-gg/havik-player@2.13.1/dist/havik-player.global.js" integrity="sha384-Ct4ZlpTNiWMbtKCo8d52uoSElmYIBpTVj5AgN8kj8KxV6jU7Ok9dDqSg8Id2k5Kd" 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.
|
|
3
|
+
"version": "2.13.1",
|
|
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,
|