Use the first audio output device by default

It is the OS default audio output in Chrome.
auto_join_3.3
Mészáros Mihály 2020-04-23 22:05:38 +02:00
parent d06f44d1d4
commit e04d3c12bd
1 changed files with 12 additions and 1 deletions

View File

@ -2750,8 +2750,19 @@ export default class RoomClient
this.enableWebcam(); this.enableWebcam();
} }
this._updateAudioOutputDevices(); await this._updateAudioOutputDevices();
const { selectedAudioOutputDevice } = store.getState().settings;
if (!selectedAudioOutputDevice && this._audioOutputDevices !== {})
{
store.dispatch(
settingsActions.setSelectedAudioOutputDevice(
Object.keys(this._audioOutputDevices)[0]
)
);
}
store.dispatch(roomActions.setRoomState('connected')); store.dispatch(roomActions.setRoomState('connected'));
// Clean all the existing notifications. // Clean all the existing notifications.