AudioPlayerManager
AudioPlayerManager copied to clipboard
Provide functions which seeks a playing track by a given timer diference
The bahvior can be already implemented with the following snippet, but a little bit of syntx suggar would be nice. Improves #20
guard let _currentTimeInSeconds = AudioPlayerManager.shared.currentTrack?.currentTimeInSeconds() else {
return
}
var newTimeInSeconds = _currentTimeInSeconds - 10
if (newTimeInSeconds < 0) {
newTimeInSeconds = 0
}
let time = CMTimeMake(Int64(newTimeInSeconds), 1)
AudioPlayerManager.shared.seek(toTime: time)