fethica / FRadioPlayer

A simple radio player framework for iOS, macOS, tvOS.
https://fethica.github.io/FRadioPlayer/
MIT License
283 stars 59 forks source link

How could i know when state of audio is still playing? #62

Open AlexGZC opened 3 years ago

AlexGZC commented 3 years ago

How could i know when state of audio is still playing?

I tried with two function, but both doesnt work

func radioPlayer(_ player: FRadioPlayer, playerStateDidChange state: FRadioPlayerState) { if state == .loadingFinished && !player.isPlaying{ print("ansdfhkdhf") } }

func radioPlayer(_ player: FRadioPlayer, playbackStateDidChange state: FRadioPlaybackState) {
    if state == .playing && !player.isPlaying{
        print("ansdfhkdhf")
    }
}