fix: loadAudioDevices accesses .devices from response object
API.listAudioDevices() returns {devices: [...]} not the array
directly. The response also uses card numbers hw:X,Y format.
This commit is contained in:
@@ -455,7 +455,7 @@ async function loadAudioDevices(){
|
||||
const outSel=document.getElementById('audioOutputDevice');
|
||||
if(!inSel||!outSel)return;
|
||||
const devs=await API.listAudioDevices();
|
||||
const opts=(devs||[]).map(d=>{
|
||||
const opts=((devs&&devs.devices)||[]).map(d=>{
|
||||
const id='hw:'+d.card+','+d.device;
|
||||
return '<option value="'+id+'">'+d.name+' ('+d.desc+')</option>';
|
||||
}).join('')||'<option value="">No devices</option>';
|
||||
|
||||
Reference in New Issue
Block a user