How to design the backend (server side) for an iPhone app that streams music
Was reading this article http://cocoawi开发者_如何学运维thlove.com/2010/03/streaming-mp3aac-audio-again.html , wanted to know of how has this to be implemented on the server side, and is it as simple as just putting the file in the htdocs folder getting the URL to that file or does it have more stuff involved
It will work with a media document just sitting on a server.
That being said, Apple really wants you to use HTTP Live Streaming instead of letting a file be progressively downloaded and streamed. Their docs state: 'iPhone and iPad apps that send large amounts of audio or video data over cellular networks are required to use HTTP Live Streaming.'
Fortunately, HTTP Live Streaming is just a method of cutting up your file and Apple provides tools to do this. Then you just place the cut up file and a metafile on your server in htdocs.
You could also look at something like Soundcloud. They have an iPhone streaming library on github to stream songs from their service.
精彩评论