@vindral/web-sdk 4.1.7 → 4.1.8-1-g16a70656

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.1.7",
2
+ "version": "4.1.8-1-g16a70656",
3
3
  "name": "@vindral/web-sdk",
4
4
  "main": "./legacy.umd.js",
5
5
  "module": "./legacy.es.js",
package/player.d.ts CHANGED
@@ -788,18 +788,60 @@ interface QualityOfServiceModuleStatistics {
788
788
  timeSpentRatio: {
789
789
  [qualityIndex: string]: number;
790
790
  };
791
+ /**
792
+ * Ratio of time spent buffering to total active time (0-1).
793
+ * Provides a normalized buffering quality metric regardless of session length.
794
+ * A value of 0.05 means 5% of the active session was spent buffering.
795
+ */
796
+ bufferingRatio: number;
797
+ /**
798
+ * Number of buffering events per minute of active playback.
799
+ * Normalizes buffering event count for comparison across sessions of different durations.
800
+ */
801
+ bufferingEventsPerMinute: number;
802
+ /**
803
+ * Weighted average rendition index based on time spent at each level.
804
+ * Lower values indicate higher quality (index 0 is the highest quality).
805
+ * Example: 0.3 means mostly on the best quality with some time on lower qualities.
806
+ */
807
+ averageRenditionIndex: number;
808
+ /**
809
+ * Buffering ratio for the last minute of playback (0-1).
810
+ * Useful for detecting recent degradation vs overall session quality.
811
+ */
812
+ bufferingRatioPerMinute: number;
813
+ /**
814
+ * Number of rendition level changes (upgrades + downgrades) per minute.
815
+ * Measures ABR stability - lower values indicate a more stable experience.
816
+ */
817
+ renditionChangesPerMinute: number;
818
+ /**
819
+ * Average time in milliseconds spent buffering per buffering event.
820
+ * Helps distinguish many short buffering events from fewer long ones.
821
+ */
822
+ timePerBufferingEvent: number;
791
823
  }
792
824
  interface SyncModuleStatistics {
793
825
  drift: number | undefined;
794
826
  seekAdjustmentCount: number;
795
827
  timeshiftAdjustmentCount: number;
796
828
  seekTime: number;
829
+ /**
830
+ * Total time spent seeking in milliseconds for the entire session.
831
+ * High values indicate frequent or slow seeks, which may impact user experience.
832
+ */
833
+ totalSeekTime: number;
797
834
  seekToleranceMultiplier: number;
798
835
  currentSeekToleranceMs: number;
799
836
  currentAheadToleranceMs: number;
800
837
  isPlaybackRateAdjustmentEnabled: boolean;
801
838
  playbackRate: number;
802
839
  playbackRateAdjustmentCount: number;
840
+ /**
841
+ * Average absolute drift in milliseconds over a rolling window.
842
+ * Measures how far off sync the playback typically is, regardless of direction.
843
+ */
844
+ averageDrift: number;
803
845
  }
804
846
  interface VideoPlayerStatistics {
805
847
  renderedFrameCount: number;
@@ -885,6 +927,22 @@ type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["getUserAge
885
927
  * Average bitrate for the entire session in bits/second.
886
928
  */
887
929
  averageBitRate?: number;
930
+ /**
931
+ * Number of reconnections per hour of uptime.
932
+ * Measures connection stability over time. Lower is better.
933
+ * Excludes the initial connection, so a stable session will have a value of 0.
934
+ */
935
+ reconnectsPerHour: number;
936
+ /**
937
+ * Number of seek adjustments (seeks to catch up) per minute of active playback.
938
+ * High values indicate sync issues or network instability.
939
+ */
940
+ seekAdjustmentsPerMinute: number;
941
+ /**
942
+ * Number of timeshift adjustments per minute of active playback.
943
+ * Relevant for timeshift-enabled streams.
944
+ */
945
+ timeshiftAdjustmentsPerMinute: number;
888
946
  };
889
947
  declare class Vindral extends Emitter<PublicVindralEvents> {
890
948
  #private;
@@ -1324,7 +1382,12 @@ interface ConnectionStatistics {
1324
1382
  * Total number of connection attempts since instantiation.
1325
1383
  */
1326
1384
  connectionAttemptCount: number;
1327
- connectionProtocol: "vindral_ws" | "moq" | undefined;
1385
+ /**
1386
+ * Ratio of successful connections to total connection attempts (0-1).
1387
+ * A value of 1.0 means every connection attempt succeeded.
1388
+ */
1389
+ connectionSuccessRatio: number;
1390
+ connectionProtocol: "vindral_ws" | "moq" | "moq_ws" | undefined;
1328
1391
  }
1329
1392
  interface LanguageSwitchContext {
1330
1393
  /**
@@ -1778,6 +1841,12 @@ export declare class PlayButton extends VindralButton {
1778
1841
  get paused(): boolean;
1779
1842
  protected handleClick(_: Event): void;
1780
1843
  }
1844
+ /**
1845
+ * Full-featured Vindral player web component with built-in controls.
1846
+ *
1847
+ * {@include ../../docs/player.md}
1848
+ *
1849
+ */
1781
1850
  export declare class Player extends HTMLElement {
1782
1851
  #private;
1783
1852
  static observedAttributes: readonly ("title" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "duration" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "hide-ui-on-pause" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "max-initial-bit-rate" | "channel-id" | "channel-group-id" | "pip-available" | "is-pip" | "airplay-available" | "is-airplaying" | "media" | "languages" | "text-tracks" | "text-track" | "needs-user-input-video" | "needs-user-input-audio" | "authentication-token" | "volume-level" | "cast" | "airplay" | "pip" | "fullscreen" | "vu-meter" | "timeshift" | "timeshift-position" | "poster-src" | "url" | "offline" | "edge-url" | "target-buffer-time" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "min-buffer-time" | "max-buffer-time" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "ios-media-element-enabled" | "abr-enabled" | "size-based-resolution-cap-enabled" | "telemetry-enabled" | "video-codecs" | "drm-headers" | "drm-queryparams" | "drm-widevine-video-robustness" | "drm-widevine-audio-robustness" | "drm-playready-video-robustness" | "drm-playready-audio-robustness" | "webtransport-enabled" | "reconnect-retries" | "auto-instance-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
package/player.js CHANGED
@@ -31,7 +31,7 @@ var B = (c, a, t) => new Promise((i, s) => {
31
31
  }, p = (v) => v.done ? i(v.value) : Promise.resolve(v.value).then(o, u);
32
32
  p((t = t.apply(c, a)).next());
33
33
  });
34
- import { L as Tr, V as $o, i as Go, C as Ko, A as qo, a as Vo, b as Xo } from "./CQiPSKHx.js";
34
+ import { L as Tr, V as $o, i as Go, C as Ko, A as qo, a as Vo, b as Xo } from "./_9pZeC_n.js";
35
35
  import { E as ds } from "./Bx7s5QdT.js";
36
36
  import { CastSender as jo } from "./cast-sender.js";
37
37
  import { A as Yo, d as Jo } from "./CPEMXA01.js";
@@ -812,11 +812,7 @@ class Br extends HTMLElement {
812
812
  l(this, di);
813
813
  l(this, ci);
814
814
  m(this, "handleEvent", (t) => {
815
- switch (t.type) {
816
- case "keydown":
817
- n(this, S, Jr).call(this, t);
818
- break;
819
- }
815
+ t.type === "keydown" && n(this, S, Jr).call(this, t);
820
816
  });
821
817
  this.attachShadow({ mode: "open" }).appendChild(zr.content.cloneNode(!0));
822
818
  }
@@ -1480,7 +1476,7 @@ class ol {
1480
1476
  }
1481
1477
  f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), ne = new WeakMap(), _t = new WeakMap(), et = new WeakMap(), pi = new WeakMap(), xe = new WeakMap(), C = new WeakMap(), T = new WeakSet(), ia = function() {
1482
1478
  return B(this, null, function* () {
1483
- const { default: a } = yield import("./CZNJPKf5.js");
1479
+ const { default: a } = yield import("./h5LA1Y1W.js");
1484
1480
  if (d(this, Ce, a), !a.isSupported()) {
1485
1481
  e(this, C).warn("HLS not supported");
1486
1482
  return;
@@ -2717,7 +2713,9 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2717
2713
  const i = yield e(this, b).getApiClient().getChannels(e(this, ft));
2718
2714
  n(this, h, E).call(this, r.CHANNELS, JSON.stringify(i));
2719
2715
  }
2720
- d(this, Ot, window.setTimeout(() => void n(this, h, Sn).call(this), 1e4));
2716
+ d(this, Ot, window.setTimeout(() => {
2717
+ n(this, h, Sn).call(this);
2718
+ }, 1e4));
2721
2719
  });
2722
2720
  }, Cn = function() {
2723
2721
  !this.hasAttribute(r.USER_INTERACTING) || this.hasAttribute(r.UI_LOCKED) || (this.dispatchEvent(
@@ -3044,11 +3042,7 @@ class Ua extends HTMLElement {
3044
3042
  l(this, At, null);
3045
3043
  l(this, ht, null);
3046
3044
  m(this, "handleEvent", (t) => {
3047
- switch (t.type) {
3048
- case "keydown":
3049
- n(this, I, Da).call(this, t);
3050
- break;
3051
- }
3045
+ t.type === "keydown" && n(this, I, Da).call(this, t);
3052
3046
  });
3053
3047
  this.attachShadow({ mode: "open" }).appendChild(Ra.content.cloneNode(!0));
3054
3048
  }
@@ -4011,11 +4005,7 @@ class Za extends HTMLElement {
4011
4005
  l(this, ue, null);
4012
4006
  l(this, Wi, null);
4013
4007
  m(this, "handleEvent", (t) => {
4014
- switch (t.type) {
4015
- case "keydown":
4016
- n(this, U, so).call(this, t);
4017
- break;
4018
- }
4008
+ t.type === "keydown" && n(this, U, so).call(this, t);
4019
4009
  });
4020
4010
  this.attachShadow({ mode: "open" }).appendChild(Qa.content.cloneNode(!0));
4021
4011
  }
package/react.d.ts CHANGED
@@ -790,18 +790,60 @@ interface QualityOfServiceModuleStatistics {
790
790
  timeSpentRatio: {
791
791
  [qualityIndex: string]: number;
792
792
  };
793
+ /**
794
+ * Ratio of time spent buffering to total active time (0-1).
795
+ * Provides a normalized buffering quality metric regardless of session length.
796
+ * A value of 0.05 means 5% of the active session was spent buffering.
797
+ */
798
+ bufferingRatio: number;
799
+ /**
800
+ * Number of buffering events per minute of active playback.
801
+ * Normalizes buffering event count for comparison across sessions of different durations.
802
+ */
803
+ bufferingEventsPerMinute: number;
804
+ /**
805
+ * Weighted average rendition index based on time spent at each level.
806
+ * Lower values indicate higher quality (index 0 is the highest quality).
807
+ * Example: 0.3 means mostly on the best quality with some time on lower qualities.
808
+ */
809
+ averageRenditionIndex: number;
810
+ /**
811
+ * Buffering ratio for the last minute of playback (0-1).
812
+ * Useful for detecting recent degradation vs overall session quality.
813
+ */
814
+ bufferingRatioPerMinute: number;
815
+ /**
816
+ * Number of rendition level changes (upgrades + downgrades) per minute.
817
+ * Measures ABR stability - lower values indicate a more stable experience.
818
+ */
819
+ renditionChangesPerMinute: number;
820
+ /**
821
+ * Average time in milliseconds spent buffering per buffering event.
822
+ * Helps distinguish many short buffering events from fewer long ones.
823
+ */
824
+ timePerBufferingEvent: number;
793
825
  }
794
826
  interface SyncModuleStatistics {
795
827
  drift: number | undefined;
796
828
  seekAdjustmentCount: number;
797
829
  timeshiftAdjustmentCount: number;
798
830
  seekTime: number;
831
+ /**
832
+ * Total time spent seeking in milliseconds for the entire session.
833
+ * High values indicate frequent or slow seeks, which may impact user experience.
834
+ */
835
+ totalSeekTime: number;
799
836
  seekToleranceMultiplier: number;
800
837
  currentSeekToleranceMs: number;
801
838
  currentAheadToleranceMs: number;
802
839
  isPlaybackRateAdjustmentEnabled: boolean;
803
840
  playbackRate: number;
804
841
  playbackRateAdjustmentCount: number;
842
+ /**
843
+ * Average absolute drift in milliseconds over a rolling window.
844
+ * Measures how far off sync the playback typically is, regardless of direction.
845
+ */
846
+ averageDrift: number;
805
847
  }
806
848
  interface VideoPlayerStatistics {
807
849
  renderedFrameCount: number;
@@ -887,6 +929,22 @@ type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["getUserAge
887
929
  * Average bitrate for the entire session in bits/second.
888
930
  */
889
931
  averageBitRate?: number;
932
+ /**
933
+ * Number of reconnections per hour of uptime.
934
+ * Measures connection stability over time. Lower is better.
935
+ * Excludes the initial connection, so a stable session will have a value of 0.
936
+ */
937
+ reconnectsPerHour: number;
938
+ /**
939
+ * Number of seek adjustments (seeks to catch up) per minute of active playback.
940
+ * High values indicate sync issues or network instability.
941
+ */
942
+ seekAdjustmentsPerMinute: number;
943
+ /**
944
+ * Number of timeshift adjustments per minute of active playback.
945
+ * Relevant for timeshift-enabled streams.
946
+ */
947
+ timeshiftAdjustmentsPerMinute: number;
890
948
  };
891
949
  declare class Vindral extends Emitter<PublicVindralEvents> {
892
950
  #private;
@@ -1326,7 +1384,12 @@ interface ConnectionStatistics {
1326
1384
  * Total number of connection attempts since instantiation.
1327
1385
  */
1328
1386
  connectionAttemptCount: number;
1329
- connectionProtocol: "vindral_ws" | "moq" | undefined;
1387
+ /**
1388
+ * Ratio of successful connections to total connection attempts (0-1).
1389
+ * A value of 1.0 means every connection attempt succeeded.
1390
+ */
1391
+ connectionSuccessRatio: number;
1392
+ connectionProtocol: "vindral_ws" | "moq" | "moq_ws" | undefined;
1330
1393
  }
1331
1394
  interface LanguageSwitchContext {
1332
1395
  /**