Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    The fake context: node factories, decode, resume/suspend/close, a manual clock.

    Index
    currentTime: number = 0
    state: "suspended" | "running" | "closed"
    destination: AudioDestinationNode = ...
    listener: FakeAudioListener = ...
    sources: FakeBufferSource[] = []
    gains: FakeGainNode[] = []
    panners: FakePannerNode[] = []
    streamDestinations: FakeMediaStreamDestination[] = []
    onstatechange: (() => void) | null = null
    resumeCalls: number = 0
    resumeSucceeds: boolean = true

    What resume() does: flip to running (default) or stay suspended.

    resumeNeverSettles: boolean = false

    Leave the resume() promise UNSETTLED, which is what a real context blocked by an autoplay policy does — it neither resolves nor rejects until the policy is satisfied. A mock that always settles makes every .then()/.catch() path look reachable when it is not.

    decodeCalls: number = 0