@oddin-gg/havik-player 2.8.0 → 2.9.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/index.d.cts CHANGED
@@ -275,6 +275,11 @@ export declare interface CreatePlayerOptions {
275
275
  * `beacons[-dev].…`). Pass `false` to opt out entirely, or
276
276
  * `{ endpoint }` to point at a non-conventional beacons host.
277
277
  *
278
+ * If {@link baseUrl} is NOT a `feed[-dev].<domain>` host — a CDN or gateway
279
+ * fronting the streams API, say — nothing can be derived and beacons are
280
+ * disabled. That is reported, not silent: a `console.warn` naming the host
281
+ * (once per host) plus a non-fatal `warning` event. Supply `{ endpoint }`.
282
+ *
278
283
  * Privacy: the sid is an opaque per-session id, held in memory only and
279
284
  * never persisted. Beacons carry playback QoE numbers plus the session's
280
285
  * environment (form factor, device model and OS version where the browser
@@ -373,6 +378,23 @@ export declare interface EmbedConfig {
373
378
  autoplay?: boolean;
374
379
  muted?: boolean;
375
380
  waitForLive?: WaitForLive;
381
+ /**
382
+ * QoE beacons, forwarded verbatim to {@link createPlayer}. Same meaning as
383
+ * there: `false` opts out, `{ endpoint }` names a beacons host.
384
+ *
385
+ * Mode C needs this for the same reason Mode A does, and until now had no
386
+ * way to say it. An embed whose `baseUrl` is not a `feed[-dev].<domain>`
387
+ * host — a CDN or gateway fronting the streams API — derives no beacons
388
+ * endpoint, so analytics is off and stays off. Without this option the
389
+ * only remedy was to move `baseUrl` back onto a feed host, which is not a
390
+ * choice an integrator who fronts the API deliberately can make.
391
+ *
392
+ * INJECTED CONFIG ONLY: unlike every other field here, this is not read
393
+ * from the query string. See {@link readConfig}.
394
+ */
395
+ analytics?: boolean | {
396
+ endpoint?: string;
397
+ };
376
398
  }
377
399
 
378
400
  export declare interface EmbedHandle {
@@ -673,6 +695,18 @@ export declare interface MountEmbedOptions {
673
695
  container: HTMLElement;
674
696
  /** URL of the hosted embed page, e.g. `https://player-dev.oddin-video.gg/embed/`. */
675
697
  src: string;
698
+ /**
699
+ * API base URL, forwarded to the embed page as a query parameter.
700
+ *
701
+ * ⚠️ QoE beacons: the beacons endpoint is derived from this host by
702
+ * convention (`feed[-dev].<domain>` → `beacons[-dev].<domain>`). If your
703
+ * base is NOT a feed host, nothing derives and analytics is off — and
704
+ * `mountEmbed` CANNOT fix it, because the only way to name an endpoint is
705
+ * {@link EmbedConfig.analytics}, which the embed page reads from injected
706
+ * config and deliberately never from the query string (a link must not be
707
+ * able to redirect a session's telemetry). Host the embed page yourself
708
+ * and inject `window.HAVIK_EMBED_CONFIG` with `analytics: { endpoint }`.
709
+ */
676
710
  baseUrl: string;
677
711
  matchUrn: string;
678
712
  /**
package/dist/index.d.ts CHANGED
@@ -275,6 +275,11 @@ export declare interface CreatePlayerOptions {
275
275
  * `beacons[-dev].…`). Pass `false` to opt out entirely, or
276
276
  * `{ endpoint }` to point at a non-conventional beacons host.
277
277
  *
278
+ * If {@link baseUrl} is NOT a `feed[-dev].<domain>` host — a CDN or gateway
279
+ * fronting the streams API, say — nothing can be derived and beacons are
280
+ * disabled. That is reported, not silent: a `console.warn` naming the host
281
+ * (once per host) plus a non-fatal `warning` event. Supply `{ endpoint }`.
282
+ *
278
283
  * Privacy: the sid is an opaque per-session id, held in memory only and
279
284
  * never persisted. Beacons carry playback QoE numbers plus the session's
280
285
  * environment (form factor, device model and OS version where the browser
@@ -373,6 +378,23 @@ export declare interface EmbedConfig {
373
378
  autoplay?: boolean;
374
379
  muted?: boolean;
375
380
  waitForLive?: WaitForLive;
381
+ /**
382
+ * QoE beacons, forwarded verbatim to {@link createPlayer}. Same meaning as
383
+ * there: `false` opts out, `{ endpoint }` names a beacons host.
384
+ *
385
+ * Mode C needs this for the same reason Mode A does, and until now had no
386
+ * way to say it. An embed whose `baseUrl` is not a `feed[-dev].<domain>`
387
+ * host — a CDN or gateway fronting the streams API — derives no beacons
388
+ * endpoint, so analytics is off and stays off. Without this option the
389
+ * only remedy was to move `baseUrl` back onto a feed host, which is not a
390
+ * choice an integrator who fronts the API deliberately can make.
391
+ *
392
+ * INJECTED CONFIG ONLY: unlike every other field here, this is not read
393
+ * from the query string. See {@link readConfig}.
394
+ */
395
+ analytics?: boolean | {
396
+ endpoint?: string;
397
+ };
376
398
  }
377
399
 
378
400
  export declare interface EmbedHandle {
@@ -673,6 +695,18 @@ export declare interface MountEmbedOptions {
673
695
  container: HTMLElement;
674
696
  /** URL of the hosted embed page, e.g. `https://player-dev.oddin-video.gg/embed/`. */
675
697
  src: string;
698
+ /**
699
+ * API base URL, forwarded to the embed page as a query parameter.
700
+ *
701
+ * ⚠️ QoE beacons: the beacons endpoint is derived from this host by
702
+ * convention (`feed[-dev].<domain>` → `beacons[-dev].<domain>`). If your
703
+ * base is NOT a feed host, nothing derives and analytics is off — and
704
+ * `mountEmbed` CANNOT fix it, because the only way to name an endpoint is
705
+ * {@link EmbedConfig.analytics}, which the embed page reads from injected
706
+ * config and deliberately never from the query string (a link must not be
707
+ * able to redirect a session's telemetry). Host the embed page yourself
708
+ * and inject `window.HAVIK_EMBED_CONFIG` with `analytics: { endpoint }`.
709
+ */
676
710
  baseUrl: string;
677
711
  matchUrn: string;
678
712
  /**