From 9f832127b28735461ccfe227276cb9a646275227 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:17:08 +0200 Subject: [PATCH] Fix comments (workaround gh weirdness) (#1518) Signed-off-by: Timo K --- src/livekit/MediaDevicesContext.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/livekit/MediaDevicesContext.tsx b/src/livekit/MediaDevicesContext.tsx index 38e30214..1605edf3 100644 --- a/src/livekit/MediaDevicesContext.tsx +++ b/src/livekit/MediaDevicesContext.tsx @@ -127,13 +127,15 @@ export const MediaDevicesProvider: FC = ({ children }) => { const [numCallersUsingNames, setNumCallersUsingNames] = useState(0); const usingNames = numCallersUsingNames > 0; - // Use output device names for output devices on all platforms except FF. - const useOutputNames = usingNames && !isFirefox(); - - // Setting the audio device to sth. else than 'undefined' breaks echo-cancellation + // Setting the audio device to something other than 'undefined' breaks echo-cancellation // and even can introduce multiple different output devices for one call. const alwaysUseDefaultAudio = isFirefox(); + // On FF we dont need to query the names + // (call enumerateDevices + create meadia stream to trigger permissions) + // for ouput devices because the selector wont be shown on FF. + const useOutputNames = usingNames && !isFirefox(); + const [audioInputSetting, setAudioInputSetting] = useAudioInput(); const [audioOutputSetting, setAudioOutputSetting] = useAudioOutput(); const [videoInputSetting, setVideoInputSetting] = useVideoInput();