Skip to main content

getOutputDevice

since 1.5.0

Description​

The currently configured output device if changed via setOutputDevice. Assumes setOutputDevice has been used. In the web version this functionality relies on experimental APIs and might not yet be available in all browsers. https://caniuse.com/mdn-api_audiocontext_sinkid

getOutputDevice(): Promise<ISynthOutputDevice | null>

Returns​

The custom configured output device which was set via setOutputDevice or null if the default outputDevice is used. The output device might change dynamically if devices are connected/disconnected (e.g. bluetooth headset).

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
updateOutputDeviceUI(await api.getOutputDevice())