Interface AudioFocusListener

  • All Implemented Interfaces:

    
    public interface AudioFocusListener
    
                        

    Interface 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onAudioFocusGain() Called when the application gains audio focus.
      abstract Unit onAudioFocusLoss() Called when the application loses audio focus.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.