Vinyl
    Preparing search index...

    Interface AutoResetController

    Notifies when playback should be reset and retried.

    The controller monitors for retry opportunities after an error is set:

    • Immediately on network 'online' events
    • After a timeout interval if online
    • Immediately on user playback actions (play, pause, seeking, playing)

    Each error triggers a single timeout. If another error occurs after a reset, setError() should be called again to schedule the next retry attempt.

    interface AutoResetController {
        clear(): void;
        hasAnyListeners(): boolean;
        hasListeners(type: "reset"): boolean;
        on<K extends "reset">(
            type: K,
            handler: EventHandler<AutoResetControllerEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
        setError(error: Error): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Methods

    • Clears this object.

      Returns void

    • Returns true if the event host has any listeners.

      Returns boolean

    • Returns true if the event host has any listeners for the given type.

      Parameters

      • type: "reset"

      Returns boolean

    • Sets the current playback error and begins monitoring for retry opportunities.

      Only SERVICE_INTERNAL ReportableErrors are monitored. Subsequent calls while an error is already set are ignored until the error is cleared via reset or clear().

      After a reset, if another error occurs, this method should be called again to schedule the next retry attempt.

      Parameters

      • error: Error

        The error to monitor for retry opportunities

      Returns void