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.