Interface AVAudioPlayerDelegate


  • public interface AVAudioPlayerDelegate
    A protocol for delegates of AVAudioPlayer
    • Method Detail

      • audioPlayerBeginInterruption

        @Deprecated
        default void audioPlayerBeginInterruption​(@NotNull
                                                  @NotNull AVAudioPlayer player)
        Deprecated.
        audioPlayerBeginInterruption: is called when the audio session has been interrupted while the player was playing. The player will have been paused. API-Since: 2.2 Deprecated-Since: 8.0
      • audioPlayerDecodeErrorDidOccurError

        default void audioPlayerDecodeErrorDidOccurError​(@NotNull
                                                         @NotNull AVAudioPlayer player,
                                                         @Nullable
                                                         @Nullable NSError error)
        if an error occurs while decoding it will be reported to the delegate.
      • audioPlayerDidFinishPlayingSuccessfully

        default void audioPlayerDidFinishPlayingSuccessfully​(@NotNull
                                                             @NotNull AVAudioPlayer player,
                                                             boolean flag)
        audioPlayerDidFinishPlaying:successfully: is called when a sound has finished playing. This method is NOT called if the player is stopped due to an interruption.
      • audioPlayerEndInterruption

        @Deprecated
        default void audioPlayerEndInterruption​(@NotNull
                                                @NotNull AVAudioPlayer player)
        Deprecated.
        audioPlayerEndInterruption: is called when the preferred method, audioPlayerEndInterruption:withFlags:, is not implemented. API-Since: 2.2 Deprecated-Since: 6.0
      • audioPlayerEndInterruptionWithFlags

        @Deprecated
        default void audioPlayerEndInterruptionWithFlags​(@NotNull
                                                         @NotNull AVAudioPlayer player,
                                                         long flags)
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 6.0
      • audioPlayerEndInterruptionWithOptions

        @Deprecated
        default void audioPlayerEndInterruptionWithOptions​(@NotNull
                                                           @NotNull AVAudioPlayer player,
                                                           long flags)
        Deprecated.
        audioPlayerEndInterruption:withOptions: is called when the audio session interruption has ended and this player had been interrupted while playing. Currently the only flag is AVAudioSessionInterruptionFlags_ShouldResume. API-Since: 6.0 Deprecated-Since: 8.0