- SDK Version: 39
- Platforms(Android/iOS/web/all): Android
I have built a media player with the help of expo-av library. When media is playing, if I hit the volume up/down controls of device (both on real device and emulator), it only affect in-call setting, I want only controlling the media volume. Here the configuration of playback object below;
useEffect(() => {
const loadAudioAv = async () => {
await Audio.setAudioModeAsync({
allowsRecordingIOS: false,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
playsInSilentModeIOS: true,
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
shouldDuckAndroid: true,
staysActiveInBackground: true,
playThroughEarpieceAndroid: true
})
}
loadAudioAv();
}, []);
How can I configure this for desired behaviour?