@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/legacy.d.ts CHANGED
@@ -52,6 +52,11 @@ type VoidKeys<Record> = MatchingKeys<Record, void>;
52
52
  type EventListenerReturnType = (() => void) | void;
53
53
  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>> {
54
54
  private listeners;
55
+ /**
56
+ * Called when a listener or a deferred function throws. Rethrows by default, which stops the dispatch;
57
+ * an override that returns lets the remaining listeners and deferred functions run.
58
+ */
59
+ protected handleListenerError(error: unknown, _eventName: PropertyKey): void;
55
60
  emit<T extends ArgLessEmits>(eventName: T): void;
56
61
  emit<T extends ArgEmits>(eventName: T, args: TEmits[T]): void;
57
62
  /**
@@ -411,8 +416,9 @@ export interface Options {
411
416
  * Note: the ReconnectState gets reset every time the client instance makes a successful connection.
412
417
  * This means the default reconnect handler will only stop reconnecting after 30 _consecutive_ failed connections.
413
418
  *
414
- * While the page is hidden, a failure counts toward `reconnectRetries` only when the server answered: the channel
415
- * 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.
419
+ * While the page is hidden or the browser reports offline, a failure counts toward `reconnectRetries` only when the
420
+ * server answered: the channel is not live or not found, or the connect request got a 4xx other than 408 or 429.
421
+ * Hidden retries back off up to 30 seconds; offline retries wait for the network to return, at most 30 seconds.
416
422
  *
417
423
  * ```typescript
418
424
  * // An example reconnect handler that will reconnect forever
@@ -1230,6 +1236,7 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
1230
1236
  private static BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT;
1231
1237
  /** How long a pause on a visible page may still turn out to be the platform backgrounding us. */
1232
1238
  private static VISIBLE_PAUSE_DISCONNECT_DELAY;
1239
+ protected handleListenerError(error: unknown, eventName: PropertyKey): void;
1233
1240
  /**
1234
1241
  * Picture in picture
1235
1242
  */
@@ -1272,6 +1279,8 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
1272
1279
  private offscreenCanvasElement?;
1273
1280
  private webCodecsRenditionSupport;
1274
1281
  private hasCalledConnect;
1282
+ /** The next join is a rejoin after congestion or fatal QoS, which asks for a short burst. */
1283
+ private shortBurstRejoin;
1275
1284
  /** The last upgrade check held, so the hold is logged once. */
1276
1285
  private upgradeHeld;
1277
1286
  private hasRequestedAudioSession;
@@ -1593,6 +1602,12 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
1593
1602
  * since another backlog or stall costs more than a few seconds at low quality.
1594
1603
  */
1595
1604
  private lowerTargetForRejoin;
1605
+ /**
1606
+ * The join burst: the buffer target, or 0 when bursts are off. A link too thin for the target's burst, or a rejoin
1607
+ * after congestion or fatal QoS, gets a short burst instead, so it starts in the edge's live group without
1608
+ * resending history into a link that can't take it.
1609
+ */
1610
+ private joinBurstMs;
1596
1611
  private onPingTimeout;
1597
1612
  private emitLanguagesIfChanged;
1598
1613
  private updateTextTracks;