@oddin-gg/havik-player 1.8.4 → 1.9.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
@@ -164,6 +164,21 @@ export declare interface CreatePlayerOptions {
164
164
  * differs from that convention.
165
165
  */
166
166
  eventsBaseUrl?: string;
167
+ /**
168
+ * QoE beacons + CMCD session attribution. Active only when the playback
169
+ * response carries an analytics sid (the server-side flag) — without one
170
+ * this option does nothing. Default: true, with the beacons endpoint
171
+ * derived from {@link baseUrl} by hostname convention (`feed[-dev].…` →
172
+ * `beacons[-dev].…`). Pass `false` to opt out entirely, or
173
+ * `{ endpoint }` to point at a non-conventional beacons host.
174
+ *
175
+ * Privacy: the sid is an opaque per-session id, held in memory only and
176
+ * never persisted; beacons carry playback QoE numbers, never identifiers
177
+ * beyond the sid. See the analytics plan (D11) for the full posture.
178
+ */
179
+ analytics?: boolean | {
180
+ endpoint?: string;
181
+ };
167
182
  }
168
183
 
169
184
  declare interface Credential_2 {
@@ -559,6 +574,16 @@ export declare interface PlaybackStats {
559
574
  isLive?: boolean;
560
575
  /** Whether playback is at/near the live edge (within the live sync window). */
561
576
  atLiveEdge?: boolean;
577
+ /** Cumulative media segment bytes fetched this session (hls.js engine only). */
578
+ bytesLoaded?: number;
579
+ /** Cumulative manifest/playlist bytes fetched this session (hls.js engine only). */
580
+ playlistBytesLoaded?: number;
581
+ /** Cumulative ABR rendition switches this session (hls.js engine only). */
582
+ renditionSwitches?: number;
583
+ /** Bitrate of the current rendition in kbps, when known. */
584
+ renditionBitrateKbps?: number;
585
+ /** Duration of the most recent DRM license acquisition in ms (0 = none yet). */
586
+ licenseTimeMs?: number;
562
587
  }
563
588
 
564
589
  export declare interface Player {
@@ -693,6 +718,16 @@ export declare interface StreamDescriptor {
693
718
  liveStartsAt?: string;
694
719
  /** Filled by the player once a media playlist with EXT-X-PART-INF is seen. */
695
720
  isLowLatency?: boolean;
721
+ /**
722
+ * Analytics session binding minted by havik-streams (present when the
723
+ * server has analytics enabled). The sid is an opaque per-playback-session
724
+ * id — non-secret by design (DRM remains the access gate) — echoed in CMCD
725
+ * query params on CDN requests and carried by QoE beacons. It lives only in
726
+ * memory for the duration of the session and is never persisted.
727
+ */
728
+ analytics?: {
729
+ sid?: string;
730
+ };
696
731
  /** Any unrecognized top-level fields from the playback response (forward-compat). */
697
732
  extensions?: Record<string, unknown>;
698
733
  }
package/dist/index.d.ts CHANGED
@@ -164,6 +164,21 @@ export declare interface CreatePlayerOptions {
164
164
  * differs from that convention.
165
165
  */
166
166
  eventsBaseUrl?: string;
167
+ /**
168
+ * QoE beacons + CMCD session attribution. Active only when the playback
169
+ * response carries an analytics sid (the server-side flag) — without one
170
+ * this option does nothing. Default: true, with the beacons endpoint
171
+ * derived from {@link baseUrl} by hostname convention (`feed[-dev].…` →
172
+ * `beacons[-dev].…`). Pass `false` to opt out entirely, or
173
+ * `{ endpoint }` to point at a non-conventional beacons host.
174
+ *
175
+ * Privacy: the sid is an opaque per-session id, held in memory only and
176
+ * never persisted; beacons carry playback QoE numbers, never identifiers
177
+ * beyond the sid. See the analytics plan (D11) for the full posture.
178
+ */
179
+ analytics?: boolean | {
180
+ endpoint?: string;
181
+ };
167
182
  }
168
183
 
169
184
  declare interface Credential_2 {
@@ -559,6 +574,16 @@ export declare interface PlaybackStats {
559
574
  isLive?: boolean;
560
575
  /** Whether playback is at/near the live edge (within the live sync window). */
561
576
  atLiveEdge?: boolean;
577
+ /** Cumulative media segment bytes fetched this session (hls.js engine only). */
578
+ bytesLoaded?: number;
579
+ /** Cumulative manifest/playlist bytes fetched this session (hls.js engine only). */
580
+ playlistBytesLoaded?: number;
581
+ /** Cumulative ABR rendition switches this session (hls.js engine only). */
582
+ renditionSwitches?: number;
583
+ /** Bitrate of the current rendition in kbps, when known. */
584
+ renditionBitrateKbps?: number;
585
+ /** Duration of the most recent DRM license acquisition in ms (0 = none yet). */
586
+ licenseTimeMs?: number;
562
587
  }
563
588
 
564
589
  export declare interface Player {
@@ -693,6 +718,16 @@ export declare interface StreamDescriptor {
693
718
  liveStartsAt?: string;
694
719
  /** Filled by the player once a media playlist with EXT-X-PART-INF is seen. */
695
720
  isLowLatency?: boolean;
721
+ /**
722
+ * Analytics session binding minted by havik-streams (present when the
723
+ * server has analytics enabled). The sid is an opaque per-playback-session
724
+ * id — non-secret by design (DRM remains the access gate) — echoed in CMCD
725
+ * query params on CDN requests and carried by QoE beacons. It lives only in
726
+ * memory for the duration of the session and is never persisted.
727
+ */
728
+ analytics?: {
729
+ sid?: string;
730
+ };
696
731
  /** Any unrecognized top-level fields from the playback response (forward-compat). */
697
732
  extensions?: Record<string, unknown>;
698
733
  }