@oddin-gg/havik-player 2.19.0 → 2.21.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
@@ -622,6 +622,8 @@ export declare type FrameToHost = {
622
622
  type: 'oddin:error';
623
623
  code: PlaybackErrorCode;
624
624
  message: string;
625
+ /** Set with code GEO_DENIED: the viewer's country the server refused (alpha-2). */
626
+ country?: string;
625
627
  };
626
628
 
627
629
  /**
@@ -872,10 +874,15 @@ export declare class PlaybackError extends Error {
872
874
  * far-future matches.
873
875
  */
874
876
  readonly liveStartsAtMs?: number;
877
+ /**
878
+ * Set for GEO_DENIED: the viewer's country the server refused, as an
879
+ * upper-case ISO 3166-1 alpha-2 tag (e.g. "RU"). Absent on every other code.
880
+ */
881
+ readonly country?: string;
875
882
  constructor(code: PlaybackErrorCode, httpStatus: number, message: string, init?: PlaybackErrorInit);
876
883
  }
877
884
 
878
- export declare type PlaybackErrorCode = 'INVALID_URN' | 'NOT_FOUND' | 'GONE' | 'TOO_EARLY' | 'UNAVAILABLE' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'DRM_CLIENT' | 'RATE_LIMITED' | 'INTERNAL' | 'NETWORK' | 'TIMEOUT' | 'ABORTED';
885
+ export declare type PlaybackErrorCode = 'INVALID_URN' | 'NOT_FOUND' | 'GEO_DENIED' | 'GONE' | 'TOO_EARLY' | 'UNAVAILABLE' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'DRM_DEVICE_REVOKED' | 'DRM_CLIENT' | 'RATE_LIMITED' | 'INTERNAL' | 'NETWORK' | 'TIMEOUT' | 'ABORTED';
879
886
 
880
887
  export declare interface PlaybackErrorInit {
881
888
  retryAfterMs?: number;
@@ -888,6 +895,11 @@ export declare interface PlaybackErrorInit {
888
895
  * matches without a separate catalog call.
889
896
  */
890
897
  liveStartsAtMs?: number;
898
+ /**
899
+ * The viewer's country as the server saw it (upper-case ISO 3166-1 alpha-2),
900
+ * carried on a GEO_DENIED body so the player can name it.
901
+ */
902
+ country?: string;
891
903
  cause?: unknown;
892
904
  }
893
905
 
@@ -1328,7 +1340,7 @@ export declare interface WatchStatusOptions {
1328
1340
  onChange: (status: MatchStatus) => void;
1329
1341
  /**
1330
1342
  * Fired on a poll error. Polling continues, except after a terminal answer
1331
- * about the URN itself (`NOT_FOUND`, `GONE`, `INVALID_URN`): the watcher
1343
+ * about the URN itself (`NOT_FOUND`, `GONE`, `GEO_DENIED`, `INVALID_URN`): the watcher
1332
1344
  * stops on its own and this is the last call it makes.
1333
1345
  */
1334
1346
  onError?: (err: PlaybackError) => void;
package/dist/index.d.ts CHANGED
@@ -622,6 +622,8 @@ export declare type FrameToHost = {
622
622
  type: 'oddin:error';
623
623
  code: PlaybackErrorCode;
624
624
  message: string;
625
+ /** Set with code GEO_DENIED: the viewer's country the server refused (alpha-2). */
626
+ country?: string;
625
627
  };
626
628
 
627
629
  /**
@@ -872,10 +874,15 @@ export declare class PlaybackError extends Error {
872
874
  * far-future matches.
873
875
  */
874
876
  readonly liveStartsAtMs?: number;
877
+ /**
878
+ * Set for GEO_DENIED: the viewer's country the server refused, as an
879
+ * upper-case ISO 3166-1 alpha-2 tag (e.g. "RU"). Absent on every other code.
880
+ */
881
+ readonly country?: string;
875
882
  constructor(code: PlaybackErrorCode, httpStatus: number, message: string, init?: PlaybackErrorInit);
876
883
  }
877
884
 
878
- export declare type PlaybackErrorCode = 'INVALID_URN' | 'NOT_FOUND' | 'GONE' | 'TOO_EARLY' | 'UNAVAILABLE' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'DRM_CLIENT' | 'RATE_LIMITED' | 'INTERNAL' | 'NETWORK' | 'TIMEOUT' | 'ABORTED';
885
+ export declare type PlaybackErrorCode = 'INVALID_URN' | 'NOT_FOUND' | 'GEO_DENIED' | 'GONE' | 'TOO_EARLY' | 'UNAVAILABLE' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'DRM_DEVICE_REVOKED' | 'DRM_CLIENT' | 'RATE_LIMITED' | 'INTERNAL' | 'NETWORK' | 'TIMEOUT' | 'ABORTED';
879
886
 
880
887
  export declare interface PlaybackErrorInit {
881
888
  retryAfterMs?: number;
@@ -888,6 +895,11 @@ export declare interface PlaybackErrorInit {
888
895
  * matches without a separate catalog call.
889
896
  */
890
897
  liveStartsAtMs?: number;
898
+ /**
899
+ * The viewer's country as the server saw it (upper-case ISO 3166-1 alpha-2),
900
+ * carried on a GEO_DENIED body so the player can name it.
901
+ */
902
+ country?: string;
891
903
  cause?: unknown;
892
904
  }
893
905
 
@@ -1328,7 +1340,7 @@ export declare interface WatchStatusOptions {
1328
1340
  onChange: (status: MatchStatus) => void;
1329
1341
  /**
1330
1342
  * Fired on a poll error. Polling continues, except after a terminal answer
1331
- * about the URN itself (`NOT_FOUND`, `GONE`, `INVALID_URN`): the watcher
1343
+ * about the URN itself (`NOT_FOUND`, `GONE`, `GEO_DENIED`, `INVALID_URN`): the watcher
1332
1344
  * stops on its own and this is the last call it makes.
1333
1345
  */
1334
1346
  onError?: (err: PlaybackError) => void;