Setting Audio config to allowsRecordingIOS routes playback audio to headphones only
See original GitHub issueWhen i set the global Audio
Audio.setAudioModeAsync({ allowsRecordingIOS: true ... });
then all sounds are redirected to the Headphones on IOS.
This issue was described already in the forums (https://forums.expo.io/t/try-to-use-expo-audio-ios-play-with-receiver-but-not-speaker/699/13) but it seems has never been transferred to the issues.
As a workaround, i set it globally to false, and when i want to record stuff, i set it to true, and afterwards back. But actually that should not be the case. Tested on an IphoneX with IOs 12.1
Steps to reproduce
set on app start the audio to
Audio.setAudioModeAsync({ allowsRecordingIOS: true ... });
playback a video with the <video> tag. check that audio is not played through the speakers (no matter if headphones are there or not) but only when the headphone is connected through the headphone.
Expected behaviour Sound can be played through the speakers and recorded at the same time.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Any workaround?
This is an expected behavior of the iOS system. An appropriate note is already added to the docs: