@vindral/web-sdk 4.8.1 → 4.8.2-1-gaf59eb9e

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.8.1",
2
+ "version": "4.8.2-1-gaf59eb9e",
3
3
  "name": "@vindral/web-sdk",
4
4
  "main": "./legacy.umd.js",
5
5
  "module": "./legacy.es.js",
package/player.d.ts CHANGED
@@ -49,6 +49,11 @@ type VoidKeys<Record> = MatchingKeys<Record, void>;
49
49
  type EventListenerReturnType = (() => void) | void;
50
50
  declare class Emitter<TEvents, TEmits = TEvents, ArgLessEvents extends VoidKeys<TEvents> = VoidKeys<TEvents>, ArgEvents extends Exclude<keyof TEvents, ArgLessEvents> = Exclude<keyof TEvents, ArgLessEvents>, ArgLessEmits extends VoidKeys<TEmits> = VoidKeys<TEmits>, ArgEmits extends Exclude<keyof TEmits, ArgLessEmits> = Exclude<keyof TEmits, ArgLessEmits>> {
51
51
  private listeners;
52
+ /**
53
+ * Called when a listener or a deferred function throws. Rethrows by default, which stops the dispatch;
54
+ * an override that returns lets the remaining listeners and deferred functions run.
55
+ */
56
+ protected handleListenerError(error: unknown, _eventName: PropertyKey): void;
52
57
  emit<T extends ArgLessEmits>(eventName: T): void;
53
58
  emit<T extends ArgEmits>(eventName: T, args: TEmits[T]): void;
54
59
  /**
@@ -388,8 +393,9 @@ interface Options {
388
393
  * Note: the ReconnectState gets reset every time the client instance makes a successful connection.
389
394
  * This means the default reconnect handler will only stop reconnecting after 30 _consecutive_ failed connections.
390
395
  *
391
- * While the page is hidden, a failure counts toward `reconnectRetries` only when the server answered: the channel
392
- * is not live or not found, or the connect request got a 4xx other than 408 or 429. Retries back off up to 30 seconds.
396
+ * While the page is hidden or the browser reports offline, a failure counts toward `reconnectRetries` only when the
397
+ * server answered: the channel is not live or not found, or the connect request got a 4xx other than 408 or 429.
398
+ * Hidden retries back off up to 30 seconds; offline retries wait for the network to return, at most 30 seconds.
393
399
  *
394
400
  * ```typescript
395
401
  * // An example reconnect handler that will reconnect forever
@@ -1094,6 +1100,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1094
1100
  private static BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT;
1095
1101
  /** How long a pause on a visible page may still turn out to be the platform backgrounding us. */
1096
1102
  private static VISIBLE_PAUSE_DISCONNECT_DELAY;
1103
+ protected handleListenerError(error: unknown, eventName: PropertyKey): void;
1097
1104
  /**
1098
1105
  * Picture in picture
1099
1106
  */
package/player.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./ZUbKTiOB.js";
2
- import "./DlCbtbuA.js";
3
- import { t } from "./ClhqVgMJ.js";
1
+ import { t as e } from "./DyoeX7Rz.js";
2
+ import "./UL5Z8kzc.js";
3
+ import { t } from "./Bo90C4i_.js";
4
4
  export { t as registerComponents, e as registerDebugComponents };
package/react.d.ts CHANGED
@@ -51,6 +51,11 @@ type VoidKeys<Record> = MatchingKeys<Record, void>;
51
51
  type EventListenerReturnType = (() => void) | void;
52
52
  declare class Emitter<TEvents, TEmits = TEvents, ArgLessEvents extends VoidKeys<TEvents> = VoidKeys<TEvents>, ArgEvents extends Exclude<keyof TEvents, ArgLessEvents> = Exclude<keyof TEvents, ArgLessEvents>, ArgLessEmits extends VoidKeys<TEmits> = VoidKeys<TEmits>, ArgEmits extends Exclude<keyof TEmits, ArgLessEmits> = Exclude<keyof TEmits, ArgLessEmits>> {
53
53
  private listeners;
54
+ /**
55
+ * Called when a listener or a deferred function throws. Rethrows by default, which stops the dispatch;
56
+ * an override that returns lets the remaining listeners and deferred functions run.
57
+ */
58
+ protected handleListenerError(error: unknown, _eventName: PropertyKey): void;
54
59
  emit<T extends ArgLessEmits>(eventName: T): void;
55
60
  emit<T extends ArgEmits>(eventName: T, args: TEmits[T]): void;
56
61
  /**
@@ -390,8 +395,9 @@ interface Options {
390
395
  * Note: the ReconnectState gets reset every time the client instance makes a successful connection.
391
396
  * This means the default reconnect handler will only stop reconnecting after 30 _consecutive_ failed connections.
392
397
  *
393
- * While the page is hidden, a failure counts toward `reconnectRetries` only when the server answered: the channel
394
- * is not live or not found, or the connect request got a 4xx other than 408 or 429. Retries back off up to 30 seconds.
398
+ * While the page is hidden or the browser reports offline, a failure counts toward `reconnectRetries` only when the
399
+ * server answered: the channel is not live or not found, or the connect request got a 4xx other than 408 or 429.
400
+ * Hidden retries back off up to 30 seconds; offline retries wait for the network to return, at most 30 seconds.
395
401
  *
396
402
  * ```typescript
397
403
  * // An example reconnect handler that will reconnect forever
@@ -1096,6 +1102,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1096
1102
  private static BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT;
1097
1103
  /** How long a pause on a visible page may still turn out to be the platform backgrounding us. */
1098
1104
  private static VISIBLE_PAUSE_DISCONNECT_DELAY;
1105
+ protected handleListenerError(error: unknown, eventName: PropertyKey): void;
1099
1106
  /**
1100
1107
  * Picture in picture
1101
1108
  */
@@ -1,5 +1,5 @@
1
- import "./DlCbtbuA.js";
2
- import { t as e } from "./ClhqVgMJ.js";
1
+ import "./UL5Z8kzc.js";
2
+ import { t as e } from "./Bo90C4i_.js";
3
3
  //#region src/vindral-player-component.ts
4
4
  e();
5
5
  //#endregion