Search code examples
audiokit

equivalent of audioPlayer.isPlaying() in AudioKit


I am using the AudioKit's AudioPlayer!. My earlier version of the code had audioPlayer.isPlaying flag to check if the player is still playing or paused/stopped. Now that isPlaying flag has been removed, can someone please guide me on what is the equivalent code?

thanks, -Vittal


Solution

  • Try isStarted

    From AudioPlayer+Playback:

    /// Synonym for isPlaying
    public var isStarted: Bool { status == .playing }