StreamingKit icon indicating copy to clipboard operation
StreamingKit copied to clipboard

Problem with playing the next song

Open philippbatura opened this issue 7 years ago • 2 comments

I have a trouble with playing queue of local (saved on device) song. I'm using this cocoapod - https://github.com/tumtumtum/StreamingKit. My first item in queue starts to play one more time after its finished. It has stopReason status NONE . Other elements has statuses .eof or .pendingNext and this is correct behaviour. What should I do in that case? All remote urls are playing correctly. Thanks!

`func audioPlayer(_ audioPlayer: STKAudioPlayer, didFinishPlayingQueueItemId queueItemId: NSObject, with stopReason: STKAudioPlayerStopReason, andProgress progress: Double, andDuration duration: Double) {

if stopReason == .eof || stopReason == .pendingNext {
    checkNextTrack()
}

if stopReason == .none {
    print("NONE")
}

if stopReason == .error || stopReason == .userAction || stopReason == .disposed {
    stop()
    resetAudioPlayer()
}`

philippbatura avatar Jul 07 '17 10:07 philippbatura

The only thing we did on that was log the error code.

NSLog(@"Error = %ld", (long)errorCode);

doriansgithub avatar Jul 07 '17 15:07 doriansgithub

Hi @philippbatura Is this issue this pending?

diegostamigni avatar Mar 27 '19 18:03 diegostamigni