tags:

views:

254

answers:

3

I want to play the song from one iphone to the other, it is like the user from device A selects a song from his IPod and plays it, while the users on Device B can also listen to that song using their own iphone which is connected to the Device A using either the Game Kit or wifi. So is it possible to stream the song from the ipod library to the other devices or not.

+1  A: 

From the point of view of copyright protection, I don't think this is possible - legally, that is.

It might be possible technically, in that you may be able to send the raw bytes of the song file over wifi or bluetooth and then decode and play them on the second device, but that surely won't get past Apple's reviewers.

Jasarien
+2  A: 

This is not possible technically, because you can't get to the audio data -- either as a decoded PCM stream or as the original encoded AAC or MP3 files -- via the MPMusicPlayerController or any other public API. Therefore device A is not in a position to send audio data over the network to device B.

Device B could receive and play streamed audio from the network, of course, since that's what apps like Pandora, Last.fm, and AOL Radio do. But for device A to send the data, it would have to use some source other than its own iPod library.

invalidname
A: 

I have been trying to do the same thing, in which the user selects a items from their library (an MPMediaItem) which is just a load of metadata, and it sends it. I plan on accessing the m4a/mp3 files by:

  1. Getting Full Filesystem access (I CANNOT FIND HOW TO DO THIS)
  2. Find the right database in the /var/mobile/Media/iTunes_Control/ folder
  3. Using the Database and my metadata, i then plan on finding the path of the music file, which is somewhere in the /var/mobile/Media/iTunes_Control/Music/
  4. Then I plan on chunking the data and sending it over gamekit
ckrames1234
You will not get full filesystem access on a non-jailbroken device.
Ole Begemann
yeah, i realized this, and I plan on either submitting the app to Rock Your Phone, Cydia, or something of the like. I really need to find out how to do it, even if it has to be on a jailbroken device.
ckrames1234