fix(setAudioOutputDeviceId): check if supported

This commit is contained in:
Pawel Domas 2021-01-05 17:11:53 -06:00 committed by Paweł Domas
parent 28fa1f5dbe
commit 97dc07810c
1 changed files with 6 additions and 0 deletions

View File

@ -267,6 +267,12 @@ export function setAudioOutputDeviceId(
logger.debug(`setAudioOutputDevice: ${String(newLabel)}[${newId}]`);
if (!JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
logger.warn('Adjusting audio output is not supported');
return Promise.resolve();
}
return JitsiMeetJS.mediaDevices.setAudioOutputDevice(newId)
.then(() => {
const newSettings = {