Interface AudioFocusLossListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Handles permanent audio focus loss instead of the SDK's default pause behavior.
Applications may use this callback when playback is coordinated with another audio source, or when focus loss should trigger application-specific work such as closing the player, updating UI, or recording playback state. Once a listener is set, the application is responsible for pausing or stopping playback when appropriate.
Transient focus loss and ducking continue to be handled automatically and are not reported here.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled on the player application thread when permanent audio focus loss is received.
-
Method Details
-
onAudioFocusLost
void onAudioFocusLost()Called on the player application thread when permanent audio focus loss is received.
-