Streaming songs to connected devices using gamekit

跟風遠走 提交于 2019-12-08 09:28:58

问题


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:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/1221073/streaming-songs-to-connected-devices-using-gamekit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!