Vinyl
    Preparing search index...

    Class AutoResetControllerImpl

    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.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    logPrefix: string

    A string prefix for all log statements made by this target.

    Accessors

    • get "[toStringTag]"(): string

      Returns string

    • get disposed(): boolean

      Returns boolean

    Methods

    • Clears this object.

      Returns void

    • Dispatches an event.

      Type Parameters

      • K extends "reset"

      Parameters

      • type: K

        The key of the event within EventMap

      • event: AutoResetControllerEventMap[K]

        If the passed event is read-only, then it may be re-used/cached. Otherwise, it should be a new event object every dispatch. If no target property is set on the event, the target will be set to this host.

      Returns void

    • 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