Audio Focus Manager allows the creation and destruction of Audio Focus Sessions.
Audio Focus Manager allows the creation and destruction of Audio Focus Sessions. Specifically, it prevent multiple audio sources from playing at the same time by letting one audio source play normally while lowering the volume (also known as ducking), pausing, or stopping other audio sources.
/*Assume session is an AudioFocusSession objectDetroys session and returns a promise resolving to a AudioFocusStatus type*/const status = AudioFocusManager.destroyAudioFocusSessionAsync(session).then((status) => {return status;}).catch((error) => console.log(error));
Gets the default audio focus session. The default audio focus session is a singleton instance that is defaulted to if an audio stream does not link an audio focus session explicitly.