Skip to main content

getAudioOutput

function getAudioOutput(devices, savedAudioOutput?): MediaDeviceInfoLike | undefined;

Selects the saved audio output or a default if exist.

It check first if a saved audio output localStorage is exist in current devices and if it's not exist, it fetches the first audio output as default.

Parameters

ParameterType
devicesIndexedDevices
savedAudioOutput?MediaDeviceInfoLike

Returns

MediaDeviceInfoLike | undefined