fethica / FRadioPlayer

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

Continue play from current stream, not pause #51

Closed ucelme closed 3 years ago

ucelme commented 4 years ago

Hello. How I can continue play audio from current stream, and not from paused location when I use player.togglePlaying()?

fethica commented 4 years ago

Hello!

You can add an extension to the FRadioPlayer that toggles playing using stop instead of pause:

extension FRadioPlayer {
    open func toggleStopPlaying() {
        isPlaying ? stop() : play()
    }
}