fethica / FRadioPlayer

A simple radio player framework for iOS, macOS, tvOS.

Home Page:https://fethica.github.io/FRadioPlayer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Continue play from current stream, not pause

ucelme opened this issue · comments

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

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()
    }
}