Amazon Vinyl
    Preparing search index...

    Function createStallDetector

    • Watches a media element after a seek/play and drives it back into a playing state. Some WebKit versions stall: the play head freezes inside buffered data and playback never resumes (often with a stale low readyState). This polls the play head and, while the element should be advancing:

      • if it's frozen inside buffered data, nudges currentTime forward to prod a resume;
      • if there's no data at the playhead, waits (it's legitimately buffering, or between sources).

      When the play head progresses it calls StallDetectorOptions.fabricatePlaying if playback resumed without a playing event (or after the detector revived it), then stops. It also stops on pause/ended/emptied or after StallDetectorOptions.maxAttempts.

      Start it after a seek or play only when playback is intended — a paused element won't advance.

      Parameters

      Returns () => void