mwg API
    Preparing search index...

    Interface Playable

    The surface mwg/audio needs from a playing sound - exactly what HTMLAudioElement already provides, named here so a test (or a game with its own audio backend) can supply a fake without a real Audio element existing, which nothing outside a browser can create.

    interface Playable {
        currentTime: number;
        loop: boolean;
        onended?: ((event: Event) => unknown) | null;
        volume: number;
        pause(): void;
        play(): void | Promise<void>;
    }
    Index
    currentTime: number
    loop: boolean
    onended?: ((event: Event) => unknown) | null

    Optional completion hook, matching HTMLAudioElement.onended. Backends without an end event can omit it; single-track Music remains fully usable there.

    volume: number