The τ Player API
setAudioFocus.
setAudioFocus()
setAudioFocus()
Dart API: setAudioFocus.
focus:
parameter possible values are
focus:
parameter possible values areAudioFocus.requestFocus (request focus, but do not do anything special with others App)
AudioFocus.requestFocusAndStopOthers (your app will have exclusive use of the output audio)
AudioFocus.requestFocusAndDuckOthers (if another App like Spotify use the output audio, its volume will be lowered)
AudioFocus.requestFocusAndKeepOthers (your App will play sound above others App)
AudioFocus.requestFocusAndInterruptSpokenAudioAndMixWithOthers
AudioFocus.requestFocusTransient (for Android)
AudioFocus.requestFocusTransientExclusive (for Android)
AudioFocus.abandonFocus (Your App will not have anymore the audio focus)
Other parameters :
Please look to openAudioSession() to understand the meaning of the other parameters
Example:
</div>
Last updated