acceptable-dream-85180
08/23/2025, 7:12 PMcannot switch audio output, the current browser does not support it I think it comes from setActiveMediaDevicetall-airline-16756
08/23/2025, 7:12 PMtall-airline-16756
08/23/2025, 7:13 PMcannot switch audio output, the current browser does not support it pops up when your browser doesn’t support the feature needed to switch audio output devices. This usually happens because some browsers, like Safari and those on iOS, don’t fully support the setSinkId method.
Here are a few things you can try to fix it:
• Enable WebAudio Mix: You can turn on the webAudioMix option in your room configuration to help with compatibility:
const room = new Room({
webAudioMix: true
});
• Browser Detection: It’s a good idea to detect the browser and handle unsupported ones smoothly. For example:
import { getBrowser } from 'livekit-client';
const browser = getBrowser();
if (kind === 'audiooutput' && (browser?.name === 'Safari' || browser?.os === 'iOS')) {
console.warn('Audio output switching not supported on this browser');
return;
}
• Feature Detection: Before trying to switch audio output, check if the setSinkId method exists:
if ('setSinkId' in HTMLMediaElement.prototype) {
await room.switchActiveDevice('audiooutput', deviceId);
} else {
console.warn('Audio output switching not supported on this browser');
}
If you want, I’m here to help with implementing any of these—just let me know!
Sources: packages/react/src/components/controls/MediaDeviceSelect.tsx | README.md