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 to forward 30 seconds #76

Closed dardaniaa0 closed 2 years ago

dardaniaa0 commented 2 years ago

func radioPlayer(_ player: FRadioPlayer, playTimeDidChange currentTime: TimeInterval, duration: TimeInterval) { guard !isSliderSliding else { return } print("playTimeDidChange currentTime: (currentTime) totalTime: (duration)") currentTimeLabel = formatSecondsToString(currentTime) timeSlider = Float(currentTime / duration) }

// Button

let increase = appPlayer.player.currentTime + 30 if increase < appPlayer.player.duration{ appPlayer.player.currentTime = increase }

Skips the label timer but not audio.

Branch: FS