Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Playing multiple songs #78

Open
shuuja opened this issue Jul 24, 2017 · 7 comments
Open

Playing multiple songs #78

shuuja opened this issue Jul 24, 2017 · 7 comments

Comments

@shuuja
Copy link

shuuja commented Jul 24, 2017

Jukebox playing multiple songs. Play one song and let it play on background, play another song from the list and both songs start playing

@RajChanchal
Copy link

I have resolved this error, you can install the pod from my commit:
write following line in podfile:
pod 'Jukebox' , :git => 'https://github.com/RajChanchal/Jukebox.git', :branch => 'master'

@Tommecpe
Copy link

Tommecpe commented Dec 7, 2018

@RajChanchal thank-you for you work,

Can you explain what did you change on your branch to solve the issue, I'm trying to merge your changes with mine :)

@RajChanchal
Copy link

@Tommecpe kindly check following two commits for the changes I did:

RajChanchal@bcbab28
RajChanchal@3a73f4d

@Tommecpe
Copy link

Tommecpe commented Dec 7, 2018

Wahoo thank-you for the response in no time !!
Unfortunately I've already integrated your commit few months ago (I didn't remember it at the first time 🙄)
And I still have some time more than one stream played in parallel :/ I'll dig on it a bit more to try to find a solution.

@RajChanchal
Copy link

I didn't notice any of such after the commits, but if you can reoccur the situation, do share with me as well here on the thread, I may have missed handling the states somewhere too. Thanks

@Tommecpe
Copy link

Tommecpe commented Dec 7, 2018

Ok,

It might be around

NotificationCenter.default.addObserver(self, selector: #selector(Jukebox.handleStall), name: NSNotification.Name.AVPlayerItemPlaybackStalled, object: nil)

@objc func handleStall() {
      self.stop()
      self.play()
}

@RajChanchal
Copy link

Hello @Tommecpe , that's already handled here: RajChanchal@b04243b

If you check my commits, they are follow up after the above commits. I think, it would be better if you fork my work and check if that works fine for your case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants