improve logging

This commit is contained in:
Malte Jürgens
2022-08-02 12:41:32 +02:00
parent 8bd4d1896a
commit fdb6145bbd
8 changed files with 55 additions and 25 deletions

View File

@@ -16,10 +16,12 @@ const getAudioDevice = async (nameOfAudioDevice) => {
let devices = await navigator.mediaDevices.enumerateDevices();
audioDevice = devices.find(({ label }) => label === nameOfAudioDevice);
if (!audioDevice)
console.log(`Did not find '${nameOfAudioDevice}', trying again in 100ms`);
console.log(
`dsa: Did not find '${nameOfAudioDevice}', trying again in 100ms`
);
await sleep(100);
}
console.log(`Found '${nameOfAudioDevice}'`);
console.log(`dsa: Found '${nameOfAudioDevice}'`);
return audioDevice;
};