hello ,i need to play songs from my music library in the background , while playing video.. Both audio and video will play at the same time... first i tried using mpmusicplayercontroller to play music , but when i play video , its stops playing song in background. after that i tried to play music using audiotoolbox."Audio Queues". now i can play audio and video at the same time ,but the song i am playing is static. i want to play song from ipod library and i need to provide the file path there, so is there any way to get the library song path? or any other idea? please suggest..!
views:
311answers:
1
+1
A:
While it may be possible, Apple doesn't want you to know how. They don't want people to be able to programmatically access the song data. It can lead to music sharing, which Apple tries not to make easy.
Maybe the way to do this is to have your videos be the thing that is static and get your songs through MPMusicPlayer. Of course, you'll have to play them with a different mechanism than MPMediaPlayer.
mahboudz
2009-09-09 05:00:02
i need a solution guys , its important , i need to play video and audio from different sources at a time ..please tell me something ...
Chris
2009-09-10 21:31:39
I think you're probably of luck. You can't get the path to library files via any public API. You could try playing the video in a UIWebView instead of MPMediaPlayer, but I suspect it'll end up the same. Short of embedding your own video decoder in the app, I don't think you'll be able to make it work the way you'd like.
Mark Bessey
2009-09-10 21:39:29
thanks for reply , is there any other way to do this...?
Chris
2009-09-10 21:54:25
You could download songs from the Internet and play them back (using AVAudioPlayer not MPMusicPlayer) while you play back the video.
mahboudz
2009-09-11 07:56:12