@vindral/web-sdk 4.8.1 → 4.8.2-10-g2eaf67d3

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-10-g2eaf67d3",
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
  */
@@ -1136,6 +1143,8 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1136
1143
  private offscreenCanvasElement?;
1137
1144
  private webCodecsRenditionSupport;
1138
1145
  private hasCalledConnect;
1146
+ /** The next join is a rejoin after congestion or fatal QoS, which asks for a short burst. */
1147
+ private shortBurstRejoin;
1139
1148
  /** The last upgrade check held, so the hold is logged once. */
1140
1149
  private upgradeHeld;
1141
1150
  private hasRequestedAudioSession;
@@ -1457,6 +1466,12 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1457
1466
  * since another backlog or stall costs more than a few seconds at low quality.
1458
1467
  */
1459
1468
  private lowerTargetForRejoin;
1469
+ /**
1470
+ * The join burst: the buffer target, or 0 when bursts are off. A link too thin for the target's burst, or a rejoin
1471
+ * after congestion or fatal QoS, gets a short burst instead, so it starts in the edge's live group without
1472
+ * resending history into a link that can't take it.
1473
+ */
1474
+ private joinBurstMs;
1460
1475
  private onPingTimeout;
1461
1476
  private emitLanguagesIfChanged;
1462
1477
  private updateTextTracks;
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 "./B_i2EMYc.js";
2
+ import "./iEs3KMee.js";
3
+ import { t } from "./CPv-eJJ_.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
  */
@@ -1138,6 +1145,8 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1138
1145
  private offscreenCanvasElement?;
1139
1146
  private webCodecsRenditionSupport;
1140
1147
  private hasCalledConnect;
1148
+ /** The next join is a rejoin after congestion or fatal QoS, which asks for a short burst. */
1149
+ private shortBurstRejoin;
1141
1150
  /** The last upgrade check held, so the hold is logged once. */
1142
1151
  private upgradeHeld;
1143
1152
  private hasRequestedAudioSession;
@@ -1459,6 +1468,12 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1459
1468
  * since another backlog or stall costs more than a few seconds at low quality.
1460
1469
  */
1461
1470
  private lowerTargetForRejoin;
1471
+ /**
1472
+ * The join burst: the buffer target, or 0 when bursts are off. A link too thin for the target's burst, or a rejoin
1473
+ * after congestion or fatal QoS, gets a short burst instead, so it starts in the edge's live group without
1474
+ * resending history into a link that can't take it.
1475
+ */
1476
+ private joinBurstMs;
1462
1477
  private onPingTimeout;
1463
1478
  private emitLanguagesIfChanged;
1464
1479
  private updateTextTracks;
@@ -1,5 +1,5 @@
1
- import "./DlCbtbuA.js";
2
- import { t as e } from "./ClhqVgMJ.js";
1
+ import "./iEs3KMee.js";
2
+ import { t as e } from "./CPv-eJJ_.js";
3
3
  //#region src/vindral-player-component.ts
4
4
  e();
5
5
  //#endregion