Interface AudioFocusListener
-
- All Implemented Interfaces:
public interface AudioFocusListenerInterface for handling audio focus changes in video playback.
This listener provides callbacks for when the application gains or loses audio focus, allowing the video player to respond appropriately by adjusting playback state or volume levels.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonAudioFocusGain()Called when the application gains audio focus. abstract UnitonAudioFocusLoss()Called when the application loses audio focus. -
-
Method Detail
-
onAudioFocusGain
abstract Unit onAudioFocusGain()
Called when the application gains audio focus.
This typically occurs when the user returns to the app or when other audio sources stop playing. The video player should resume normal audio playback when this is called.
-
onAudioFocusLoss
abstract Unit onAudioFocusLoss()
Called when the application loses audio focus.
This can happen when another app starts playing audio, a phone call comes in, or other system audio events occur. The video player should typically mute or pause audio playback when this is called.
-
-
-
-