ENGLISH·COURSE API
    Preparing search index...

    The three calls the resume rule makes on a player, and nothing else.

    Deliberately structural rather than a Vidstack type. The rule is the part of this feature worth testing hardest, and it stays testable without a media pipeline — jsdom has none — only while it can be driven by three spies. The wrapper builds one of these from its MediaPlayerInstance ref.

    type ResumablePlayer = {
        pause: () => void;
        play: () => void;
    }
    Index

    Properties

    Properties

    pause: () => void

    Commands are fire-and-forget: an implementation MUST observe whatever promise the underlying player returns and discard its rejection.

    The player's embed providers reject every pending promise when their provider is destroyed — on unmount, which is a learner navigating away or a test finishing. An implementation written as () => ref.current?.pause() type-checks against this void return and leaks that rejection on every call, which fails a whole test run and, in the browser, reaches error reporting as noise. resumablePlayerFrom is the implementation that gets this right; see its remarks.

    play: () => void

    Fire-and-forget; see pause.