Skip to content

Commit

Permalink
feat(audio-device-selector): remove earpiece from selector
Browse files Browse the repository at this point in the history
  • Loading branch information
frankemax committed May 7, 2024
1 parent 993bd26 commit 478bd51
Showing 1 changed file with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,24 @@ const AudioDeviceSelectorModal = () => {
<Styled.Container>
<Styled.DeviceSelectorTitle>{t('mobileSdk.audio.deviceSelector.title')}</Styled.DeviceSelectorTitle>
<Styled.ButtonContainer>
{audioDevices.map((ad) => (
<Styled.OptionsButton
onPress={() => {
AudioModule.setAudioDevice(ad.uid);
getAudioDevicesIOS();
dispatch(hide());
}}
key={ad.uid}
selected={ad.selected}
>
{ad.name}
</Styled.OptionsButton>
))}
{audioDevices.map((ad) => {
if (ad.type !== 'EARPIECE') {
return (
<Styled.OptionsButton
onPress={() => {
AudioModule.setAudioDevice(ad.uid);
getAudioDevicesIOS();
dispatch(hide());
}}
key={ad.uid}
selected={ad.selected}
>
{ad.name}
</Styled.OptionsButton>
);
}
return null;
})}
</Styled.ButtonContainer>
</Styled.Container>
</Modal>
Expand Down

0 comments on commit 478bd51

Please sign in to comment.