@oddin-gg/havik-player 2.11.1 → 2.12.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/index.d.cts CHANGED
@@ -142,8 +142,10 @@ export declare interface CreatePlayerOptions {
142
142
  * fronting the streams API, the CN plane, or a pinned build that must
143
143
  * outlive a domain change.
144
144
  *
145
- * Note that a base which is not a `feed[-dev].<domain>` host derives no QoE
146
- * beacons endpoint, so pair it with `analytics: { endpoint }`.
145
+ * QoE beacons: havik-streams v0.10.0+ names the beacons host itself, so any
146
+ * base works. Against an older server, a base which is not a
147
+ * `feed[-dev].<domain>` host derives no beacons endpoint, so pair it with
148
+ * `analytics: { endpoint }`.
147
149
  */
148
150
  baseUrl?: string;
149
151
  matchUrn: string;
@@ -308,13 +310,17 @@ export declare interface CreatePlayerOptions {
308
310
  /**
309
311
  * QoE beacons + CMCD session attribution. Active only when the playback
310
312
  * response carries an analytics sid (the server-side flag) — without one
311
- * this option does nothing. Default: true, with the beacons endpoint
312
- * derived from {@link baseUrl} by hostname convention (`feed[-dev].…` →
313
- * `beacons[-dev].…`). Pass `false` to opt out entirely, or
314
- * `{ endpoint }` to point at a non-conventional beacons host.
313
+ * this option does nothing. Default: true. Pass `false` to opt out entirely.
315
314
  *
316
- * If {@link baseUrl} is NOT a `feed[-dev].<domain>` host — a CDN or gateway
317
- * fronting the streams API, say — nothing can be derived and beacons are
315
+ * Where beacons go: havik-streams v0.10.0+ names the beacons host in the
316
+ * playback response, and that host is used whatever {@link baseUrl} is —
317
+ * including a CDN or gateway fronting the streams API. It also wins over
318
+ * `{ endpoint }` (a differing value is ignored with one `console.warn`).
319
+ *
320
+ * Against an older server that names none, the endpoint is `{ endpoint }`
321
+ * if given, else derived from {@link baseUrl} by hostname convention
322
+ * (`feed[-dev].…` → `beacons[-dev].…`). If {@link baseUrl} is NOT a
323
+ * `feed[-dev].<domain>` host, nothing can be derived and beacons are
318
324
  * disabled. That is reported, not silent: a `console.warn` naming the host
319
325
  * (once per host) plus a non-fatal `warning` event. Supply `{ endpoint }`.
320
326
  *
@@ -421,9 +427,11 @@ export declare interface EmbedConfig {
421
427
  * there: `false` opts out, `{ endpoint }` names a beacons host.
422
428
  *
423
429
  * Mode C needs this for the same reason Mode A does, and until now had no
424
- * way to say it. An embed whose `baseUrl` is not a `feed[-dev].<domain>`
425
- * host — a CDN or gateway fronting the streams API — derives no beacons
426
- * endpoint, so analytics is off and stays off. Without this option the
430
+ * way to say it. Against a server that does not name the beacons host
431
+ * (havik-streams before v0.10.0), an embed whose `baseUrl` is not a
432
+ * `feed[-dev].<domain>` host — a CDN or gateway fronting the streams API —
433
+ * derives no beacons endpoint, so analytics is off and stays off. A server
434
+ * that names it needs no option here. Without this option the
427
435
  * only remedy was to move `baseUrl` back onto a feed host, which is not a
428
436
  * choice an integrator who fronts the API deliberately can make.
429
437
  *
@@ -763,10 +771,12 @@ export declare interface MountEmbedOptions {
763
771
  /**
764
772
  * API base URL, forwarded to the embed page as a query parameter.
765
773
  *
766
- * ⚠️ QoE beacons: the beacons endpoint is derived from this host by
767
- * convention (`feed[-dev].<domain>` → `beacons[-dev].<domain>`). If your
768
- * base is NOT a feed host, nothing derives and analytics is off — and
769
- * `mountEmbed` CANNOT fix it, because the only way to name an endpoint is
774
+ * ⚠️ QoE beacons: havik-streams v0.10.0+ names the beacons host in the
775
+ * playback response, so any base works. Against an older server the
776
+ * endpoint is derived from this host by convention (`feed[-dev].<domain>` →
777
+ * `beacons[-dev].<domain>`). There, if your base is NOT a feed host,
778
+ * nothing derives and analytics is off — and `mountEmbed` CANNOT fix it,
779
+ * because the only client-side way to name an endpoint is
770
780
  * {@link EmbedConfig.analytics}, which the embed page reads from injected
771
781
  * config and deliberately never from the query string (a link must not be
772
782
  * able to redirect a session's telemetry). Host the embed page yourself
@@ -1061,9 +1071,17 @@ export declare interface StreamDescriptor {
1061
1071
  * id — non-secret by design (DRM remains the access gate) — echoed in CMCD
1062
1072
  * query params on CDN requests and carried by QoE beacons. It lives only in
1063
1073
  * memory for the duration of the session and is never persisted.
1074
+ *
1075
+ * `endpoint` is the QoE beacons origin the server names for this session
1076
+ * (e.g. `https://beacons.oddin-video.gg`; beacons POST to
1077
+ * `<endpoint>/v1/beacons`). Present only alongside a sid, and only from a
1078
+ * server new enough to send it; the SDK keeps it only when it is a bare
1079
+ * https origin. It takes precedence over the `analytics.endpoint` option and
1080
+ * over deriving a host from `baseUrl`.
1064
1081
  */
1065
1082
  analytics?: {
1066
1083
  sid?: string;
1084
+ endpoint?: string;
1067
1085
  };
1068
1086
  /** Any unrecognized top-level fields from the playback response (forward-compat). */
1069
1087
  extensions?: Record<string, unknown>;
package/dist/index.d.ts CHANGED
@@ -142,8 +142,10 @@ export declare interface CreatePlayerOptions {
142
142
  * fronting the streams API, the CN plane, or a pinned build that must
143
143
  * outlive a domain change.
144
144
  *
145
- * Note that a base which is not a `feed[-dev].<domain>` host derives no QoE
146
- * beacons endpoint, so pair it with `analytics: { endpoint }`.
145
+ * QoE beacons: havik-streams v0.10.0+ names the beacons host itself, so any
146
+ * base works. Against an older server, a base which is not a
147
+ * `feed[-dev].<domain>` host derives no beacons endpoint, so pair it with
148
+ * `analytics: { endpoint }`.
147
149
  */
148
150
  baseUrl?: string;
149
151
  matchUrn: string;
@@ -308,13 +310,17 @@ export declare interface CreatePlayerOptions {
308
310
  /**
309
311
  * QoE beacons + CMCD session attribution. Active only when the playback
310
312
  * response carries an analytics sid (the server-side flag) — without one
311
- * this option does nothing. Default: true, with the beacons endpoint
312
- * derived from {@link baseUrl} by hostname convention (`feed[-dev].…` →
313
- * `beacons[-dev].…`). Pass `false` to opt out entirely, or
314
- * `{ endpoint }` to point at a non-conventional beacons host.
313
+ * this option does nothing. Default: true. Pass `false` to opt out entirely.
315
314
  *
316
- * If {@link baseUrl} is NOT a `feed[-dev].<domain>` host — a CDN or gateway
317
- * fronting the streams API, say — nothing can be derived and beacons are
315
+ * Where beacons go: havik-streams v0.10.0+ names the beacons host in the
316
+ * playback response, and that host is used whatever {@link baseUrl} is —
317
+ * including a CDN or gateway fronting the streams API. It also wins over
318
+ * `{ endpoint }` (a differing value is ignored with one `console.warn`).
319
+ *
320
+ * Against an older server that names none, the endpoint is `{ endpoint }`
321
+ * if given, else derived from {@link baseUrl} by hostname convention
322
+ * (`feed[-dev].…` → `beacons[-dev].…`). If {@link baseUrl} is NOT a
323
+ * `feed[-dev].<domain>` host, nothing can be derived and beacons are
318
324
  * disabled. That is reported, not silent: a `console.warn` naming the host
319
325
  * (once per host) plus a non-fatal `warning` event. Supply `{ endpoint }`.
320
326
  *
@@ -421,9 +427,11 @@ export declare interface EmbedConfig {
421
427
  * there: `false` opts out, `{ endpoint }` names a beacons host.
422
428
  *
423
429
  * Mode C needs this for the same reason Mode A does, and until now had no
424
- * way to say it. An embed whose `baseUrl` is not a `feed[-dev].<domain>`
425
- * host — a CDN or gateway fronting the streams API — derives no beacons
426
- * endpoint, so analytics is off and stays off. Without this option the
430
+ * way to say it. Against a server that does not name the beacons host
431
+ * (havik-streams before v0.10.0), an embed whose `baseUrl` is not a
432
+ * `feed[-dev].<domain>` host — a CDN or gateway fronting the streams API —
433
+ * derives no beacons endpoint, so analytics is off and stays off. A server
434
+ * that names it needs no option here. Without this option the
427
435
  * only remedy was to move `baseUrl` back onto a feed host, which is not a
428
436
  * choice an integrator who fronts the API deliberately can make.
429
437
  *
@@ -763,10 +771,12 @@ export declare interface MountEmbedOptions {
763
771
  /**
764
772
  * API base URL, forwarded to the embed page as a query parameter.
765
773
  *
766
- * ⚠️ QoE beacons: the beacons endpoint is derived from this host by
767
- * convention (`feed[-dev].<domain>` → `beacons[-dev].<domain>`). If your
768
- * base is NOT a feed host, nothing derives and analytics is off — and
769
- * `mountEmbed` CANNOT fix it, because the only way to name an endpoint is
774
+ * ⚠️ QoE beacons: havik-streams v0.10.0+ names the beacons host in the
775
+ * playback response, so any base works. Against an older server the
776
+ * endpoint is derived from this host by convention (`feed[-dev].<domain>` →
777
+ * `beacons[-dev].<domain>`). There, if your base is NOT a feed host,
778
+ * nothing derives and analytics is off — and `mountEmbed` CANNOT fix it,
779
+ * because the only client-side way to name an endpoint is
770
780
  * {@link EmbedConfig.analytics}, which the embed page reads from injected
771
781
  * config and deliberately never from the query string (a link must not be
772
782
  * able to redirect a session's telemetry). Host the embed page yourself
@@ -1061,9 +1071,17 @@ export declare interface StreamDescriptor {
1061
1071
  * id — non-secret by design (DRM remains the access gate) — echoed in CMCD
1062
1072
  * query params on CDN requests and carried by QoE beacons. It lives only in
1063
1073
  * memory for the duration of the session and is never persisted.
1074
+ *
1075
+ * `endpoint` is the QoE beacons origin the server names for this session
1076
+ * (e.g. `https://beacons.oddin-video.gg`; beacons POST to
1077
+ * `<endpoint>/v1/beacons`). Present only alongside a sid, and only from a
1078
+ * server new enough to send it; the SDK keeps it only when it is a bare
1079
+ * https origin. It takes precedence over the `analytics.endpoint` option and
1080
+ * over deriving a host from `baseUrl`.
1064
1081
  */
1065
1082
  analytics?: {
1066
1083
  sid?: string;
1084
+ endpoint?: string;
1067
1085
  };
1068
1086
  /** Any unrecognized top-level fields from the playback response (forward-compat). */
1069
1087
  extensions?: Record<string, unknown>;