pause() does not work if called too quickly after play()
MobileVLCKit 3.4.1b9
var doPause = false
if !audioPlayer!.isPlaying {
audioPlayer!.play()
doPause = true
}
audioPlayer!.position = seekTo
if doPause {
self.audioPlayer!.pause() // this pause is usually ignored.
}
This works:
DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) {
self.audioPlayer!.pause()
}
I suspect it's also due to #129 (closed)