foo-webview-sdk
    Preparing search index...

    Class MediaElementFollowerExperimental

    Keep a muted media element on foobar2000's timeline using PlaybackClock. Every 100 ms, drift up to 50 ms leaves time unchanged, drift below 250 ms adjusts playbackRate within 0.95–1.05, and larger drift or a seek aligns time. A track change pauses the element until the next setSource call. Selecting the same file again, with or without another |subsong:N suffix, keeps a loaded resource and only moves to the new timelineOffset; another file or null replaces it. Without that call the element stays paused on its last frame. Network errors renew the URL at most twice per explicit setSource call. The element must have no srcObject or source children. Do not change its source externally while following. preload is set to 'metadata'. Playback begins only after a complete host read, including at construction.

    Index
    • get error(): Error | null
      Experimental

      Latest current-source failure. setSource clears all failures; a successful resync clears play() and clock-read failures. Source failures require setSource.

      Returns Error | null

    • Experimental

      Pause and clear the element, release listeners and dispose an owned clock. Borrowed clocks remain active. Element settings are not restored; repeated disposal is harmless and late source/play results are ignored.

      Returns void

    • Experimental

      Subscribe to current-source failures; the returned function unsubscribes.

      Parameters

      • listener: (error: Error) => void

      Returns () => void

    • Experimental

      Pause, read a complete host snapshot, then align and resume if playing. A failed read rejects and keeps playback paused until a later resync succeeds; it does not consume the source's network retry budget.

      Returns Promise<void>

    • Experimental

      Issue and assign a local container URL; null pauses and clears the source. Resolves after assignment, before metadata or playback. A superseded call resolves without changing the new source; a current host failure rejects. The same file as the current resource, ignoring a |subsong:N suffix, keeps that resource unless it failed, and resolves at once. A new call resets the network retry budget. Decode errors and exhausted retries require an explicit new call; resync alone cannot repair the source.

      Parameters

      Returns Promise<void>

      Error if disposed, or ApiCallError for a host failure envelope.

      RangeError if timelineOffset is not finite.