Expo Audio only playing through headphones

Please provide the following:

  1. SDK Version: 37.0.0
  2. Platforms(Android/iOS/web/all): Android

Hey everyone. I’ve implemented an audio player in my app using Expo Audio.
After publishing the app I’ve found that some users were experiencing a bug where they would hear the audio only if they had headphones plugged, otherwise it would look like it’s playing but it would have no sound.

After testing different possibilities I’ve found that the bug is only solved if I set shouldDuckAndroid to undefined. If I set it to true or false the bug persists. Is there something I’m missing? Have you experienced a similar bug?
This has the side-effect of causing an error in setAudioModeAsync which makes any of the things that I try to set up in it not work.

This is what I have in setAudioModeAsync():

await Audio.setAudioModeAsync({
  staysActiveInBackground: true,
  interruptionModeAndroid: INTERRUPTION_MODE_ANDROID_DUCK_OTHERS,
  shouldDuckAndroid: false,
});

EDIT: This only fixes it for a couple of devices but not for all of them.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.