-1

I am working on an app where app iPhone music library & play song. I am able to play a selected song as below

//MARK:- Media Picker delegate
extension ViewController : MPMediaPickerControllerDelegate
{
    func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems mediaItemCollection: MPMediaItemCollection) {
         self.dismiss(animated: true, completion: nil)

         musicPlayer?.setQueue(with: mediaItemCollection)
         musicPlayerFirst?.play()
    }

    func mediaPickerDidCancel(_ mediaPicker: MPMediaPickerController) {
        self.dismiss(animated: true, completion: nil)
    }
}

But my requirement is that user can select another from iPhone library & play both songs side by side without affecting each other. The user can modify one playing song (Volume, Pitch etc) with given controls.

I can play one file & modify it.

Please suggest any idea how to play two files side by side.

Yannick Loriot
  • 7,107
  • 2
  • 33
  • 56
Gagan_iOS
  • 3,638
  • 3
  • 32
  • 51

1 Answers1

0

what about giving the mediaplayer a tag and check if its not the same that playing play side by side ( this is just an idea, not tested!)