auto_join_3.3
Håvar Aambø Fosstveit 2020-04-22 10:21:49 +02:00
parent 3fb24afe11
commit 66b513cf19
1 changed files with 8 additions and 11 deletions

View File

@ -1127,18 +1127,15 @@ export default class RoomClient
'changeAudioOutputDevice() | new selected [audio output device:%o]', 'changeAudioOutputDevice() | new selected [audio output device:%o]',
device); device);
const audioElements = document.getElementsByTagName('audio');
if (typeof audioElements[0].setSinkId === 'function')
const audioElements = document.getElementsByTagName("audio"); {
for( let i=0; i<audioElements.length; i++){ for (let i = 0; i < audioElements.length; i++)
if (typeof audioElements[0].setSinkId === 'function'){
if (i === 0) logger.debug('changeAudioOutputDevice()');
await audioElements[i].setSinkId(deviceId); await audioElements[i].setSinkId(deviceId);
} else { }
logger.debug('changeAudioOutputDevice() | setSinkId not implemented'); else
break; logger.debug('changeAudioOutputDevice() | setSinkId not implemented');
}
};
store.dispatch(settingsActions.setSelectedAudioOutputDevice(deviceId)); store.dispatch(settingsActions.setSelectedAudioOutputDevice(deviceId));