Explicitly selected output, or null before successful routing/after invalidation.
Last requested left-channel HID volume (0-255), or null before configuration/after reset. This is a local cache, not a hardware readback or acknowledgement.
Last requested right-channel HID volume (0-255), or null before configuration/after reset.
Passive check: never requests permission, creates an AudioContext, or plays sound. A hidden/incomplete device list yields null, not a false hardware diagnosis. True establishes routing, not inserted headphones or audible sound.
Route a live MediaStream to the selected headphone output, without buffering or decoding a file. Supply one audio track (mono or stereo). Call from a user action for autoplay permission. Resolves when connected, not when the stream ends. Replaces the previous stream. The caller owns the stream and its tracks; stop/reset/disconnect never stop them.
Call from a click. Uses the native output picker when available. Otherwise requests microphone permission to expose audio devices and immediately stops every capture track. Returns concrete outputs for user selection; it does not start playback or select a route.
Release playback, routing, pending volume promises and device listeners. A new selection is required.
Explicitly associate a concrete output with this controller. The caller/user establishes identity. Verifies routing without playing sound. Default/communications aliases are rejected. A failed change stops the old route and leaves playback disabled.
Set raw headphone HID volume bytes, independently of browser routing/playback. Right defaults to left. Finite values are clamped to 0-255 and rounded. Resolves when the HID report is sent; rejects on output failure or reset.
Disconnect playback and cancel pending resume work, preserving the output and caller-owned tracks.
Optional page-audio routing and playback. Listen for
change, then call checkSupport again. Browser audio labels cannot establish which HID controller owns an output. Selection is explicit.