@oddin-gg/havik-player 2.10.0 → 2.11.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
@@ -57,6 +57,29 @@ export declare interface CatalogMatch {
57
57
  tournamentUrn: string;
58
58
  tournamentName: string;
59
59
  sport: string;
60
+ /**
61
+ * The two sides, home first, as the server sends them. Absent when no
62
+ * usable team survives parsing: the server sent no `teams` (an older
63
+ * havik-streams), or every entry lacked both a URN and a name. A team with
64
+ * a URN but no name IS kept. `matchName` stays the display string.
65
+ */
66
+ teams?: CatalogTeam[];
67
+ }
68
+
69
+ /**
70
+ * One side of a match. `urn` is the server's competitor URN
71
+ * (`od:competitor:N`); `logoUrl` is an https image URL, present only when
72
+ * the deployment resolves team logos and this team has one.
73
+ *
74
+ * A `logoUrl` can still fail to load (the CDN may not have the file), so
75
+ * always render a fallback for a missing or broken image. Allow the logo
76
+ * hosts (`cdn.oddin.gg`, and `cdn.runestone.gg`) in a CSP `img-src`.
77
+ */
78
+ export declare interface CatalogTeam {
79
+ urn: string;
80
+ name: string;
81
+ isHome: boolean;
82
+ logoUrl?: string;
60
83
  }
61
84
 
62
85
  export declare interface CatalogTournament {
@@ -162,6 +185,15 @@ export declare interface CreatePlayerOptions {
162
185
  * playback has fallen well behind. Default: true. Live/LL only.
163
186
  */
164
187
  snapToLiveOnRefocus?: boolean;
188
+ /**
189
+ * DRM cold start: download the first init segment and parts while the
190
+ * first key is still being acquired, instead of after it (hls.js waits for
191
+ * the key before requesting any media). Bytes are handed to hls.js only
192
+ * when it asks for them, so nothing is appended earlier than before; only
193
+ * the network time leaves the critical path. Default: true. Ignored on
194
+ * clear streams, and when `hlsConfig.fLoader` is set.
195
+ */
196
+ mediaDuringKey?: boolean;
165
197
  /** Force an engine; 'auto' prefers hls.js wherever supported (incl. modern
166
198
  * Safari/iOS via ManagedMediaSource) and falls back to native HLS. Default: 'auto'. */
167
199
  engine?: 'auto' | 'hls' | 'native';
@@ -708,6 +740,12 @@ export declare interface MatchStatus {
708
740
  */
709
741
  statusRaw?: string;
710
742
  datePlannedStart?: string;
743
+ /**
744
+ * The match's teams as of this report (see {@link CatalogTeam}).
745
+ * `watchStatus` fires again when they change, so a logo the server
746
+ * resolves after the first read is re-reported with the same status.
747
+ */
748
+ teams?: CatalogTeam[];
711
749
  }
712
750
 
713
751
  /**
@@ -1181,7 +1219,11 @@ export declare interface WatchStatusOptions {
1181
1219
  baseUrl: string;
1182
1220
  matchUrn: string;
1183
1221
  credential: CredentialSource;
1184
- /** Fired whenever the status changes (and once on first read). */
1222
+ /**
1223
+ * Fired once on first read and then whenever the status, the teams (a logo
1224
+ * resolved after the first read) or the planned start change. Unchanged
1225
+ * polls (304 or an identical body) stay silent.
1226
+ */
1185
1227
  onChange: (status: MatchStatus) => void;
1186
1228
  /** Fired on a poll error; polling continues. */
1187
1229
  onError?: (err: PlaybackError) => void;
package/dist/index.d.ts CHANGED
@@ -57,6 +57,29 @@ export declare interface CatalogMatch {
57
57
  tournamentUrn: string;
58
58
  tournamentName: string;
59
59
  sport: string;
60
+ /**
61
+ * The two sides, home first, as the server sends them. Absent when no
62
+ * usable team survives parsing: the server sent no `teams` (an older
63
+ * havik-streams), or every entry lacked both a URN and a name. A team with
64
+ * a URN but no name IS kept. `matchName` stays the display string.
65
+ */
66
+ teams?: CatalogTeam[];
67
+ }
68
+
69
+ /**
70
+ * One side of a match. `urn` is the server's competitor URN
71
+ * (`od:competitor:N`); `logoUrl` is an https image URL, present only when
72
+ * the deployment resolves team logos and this team has one.
73
+ *
74
+ * A `logoUrl` can still fail to load (the CDN may not have the file), so
75
+ * always render a fallback for a missing or broken image. Allow the logo
76
+ * hosts (`cdn.oddin.gg`, and `cdn.runestone.gg`) in a CSP `img-src`.
77
+ */
78
+ export declare interface CatalogTeam {
79
+ urn: string;
80
+ name: string;
81
+ isHome: boolean;
82
+ logoUrl?: string;
60
83
  }
61
84
 
62
85
  export declare interface CatalogTournament {
@@ -162,6 +185,15 @@ export declare interface CreatePlayerOptions {
162
185
  * playback has fallen well behind. Default: true. Live/LL only.
163
186
  */
164
187
  snapToLiveOnRefocus?: boolean;
188
+ /**
189
+ * DRM cold start: download the first init segment and parts while the
190
+ * first key is still being acquired, instead of after it (hls.js waits for
191
+ * the key before requesting any media). Bytes are handed to hls.js only
192
+ * when it asks for them, so nothing is appended earlier than before; only
193
+ * the network time leaves the critical path. Default: true. Ignored on
194
+ * clear streams, and when `hlsConfig.fLoader` is set.
195
+ */
196
+ mediaDuringKey?: boolean;
165
197
  /** Force an engine; 'auto' prefers hls.js wherever supported (incl. modern
166
198
  * Safari/iOS via ManagedMediaSource) and falls back to native HLS. Default: 'auto'. */
167
199
  engine?: 'auto' | 'hls' | 'native';
@@ -708,6 +740,12 @@ export declare interface MatchStatus {
708
740
  */
709
741
  statusRaw?: string;
710
742
  datePlannedStart?: string;
743
+ /**
744
+ * The match's teams as of this report (see {@link CatalogTeam}).
745
+ * `watchStatus` fires again when they change, so a logo the server
746
+ * resolves after the first read is re-reported with the same status.
747
+ */
748
+ teams?: CatalogTeam[];
711
749
  }
712
750
 
713
751
  /**
@@ -1181,7 +1219,11 @@ export declare interface WatchStatusOptions {
1181
1219
  baseUrl: string;
1182
1220
  matchUrn: string;
1183
1221
  credential: CredentialSource;
1184
- /** Fired whenever the status changes (and once on first read). */
1222
+ /**
1223
+ * Fired once on first read and then whenever the status, the teams (a logo
1224
+ * resolved after the first read) or the planned start change. Unchanged
1225
+ * polls (304 or an identical body) stay silent.
1226
+ */
1185
1227
  onChange: (status: MatchStatus) => void;
1186
1228
  /** Fired on a poll error; polling continues. */
1187
1229
  onError?: (err: PlaybackError) => void;