I'm using Jukebox library to stream remote music. Musics that I stream are 60 min long. When I try to seek them, it takes like 30-40 seconds to play. I changed some codes in the library to make them play immediately for the first time. It worked, but it does not speed up seeking.
public func seek(toSecond second: Int, shouldPlay: Bool = false) {
guard let player = player, let item = currentItem else {return}
player.seek(to: CMTimeMake(Int64(second), 1))
item.update()
if shouldPlay {
if #available(iOS 10.0, *) {
player.playImmediately(atRate: 1.0)
} else {
player.play()
}
if state != .playing {
state = .playing
}
}
delegate?.jukeboxPlaybackProgressDidChange(self)
}