I am trying to use my android tv box (TX3 mini) like a radio. The app I build using react native and expo work and the audio does play when the app is in the background. The audio is coming through AV port and not through HDMI. However when I unplug the HDMI after launching the app, the audio stop working. Is this setting i have to configure in the Android box to keep the audio and the app running when HDMI (display) is unplug or something i have set in my app when coding? I look for setting in the code, but could not find one.
I am using import { Audio } from 'expo-av'
library.
Audio settings:
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
});
Once the app is running i want to disconnect the display and keep the audio playing on the speaker.
Let me know if you need more details and thanks for any input.
Thanks, A