开发者

Streaming Audio FROM iPhone to Browser. Ideas?

开发者 https://www.devze.com 2022-12-08 10:06 出处:网络
I have seen plenty of articles and SO questions about streaming TO an iPhone app, but my question is the r开发者_JAVA百科everse, that is, streaming FROM an iPhone app.

I have seen plenty of articles and SO questions about streaming TO an iPhone app, but my question is the r开发者_JAVA百科everse, that is, streaming FROM an iPhone app.

I have audio content in an iPhone app, that I want to stream to a browser. So the idea is that the browser can connect to a server running on the iphone. The server on the iphone will give the audio to the browser. The browser will play the endless stream.

I already have seamless looping content on the phone with AudioQueue. I already know how to setup a server running on the phone with CocoaHTTPServer. Is there a third piece that can make the AudioQueue (or a FileStream) stream to a browser connected to the internal iPhone server?

Anybody have any thoughts on how to implement this?


Well, there are a few good open source projects to dissect, port, or imitate for this. What I would suggest is looking at how Icecast and streamTranscoderv3 operate together. The latter will take an audio source and send it to an Icecast server as a source. Port parts of both and run them locally on the iPhone and you'd have a solution. I imagine that Bonjour could be used so that other systems on the LAN could find and listen to the iPhone.

Or send the streamTranscoder output to an Icecast server elsewhere and make it available for the world.

Unfortunately, neither project is over engineered - the code isn't super modular but it is comprehensible and modestly cross platform.

0

精彩评论

暂无评论...
验证码 换一张
取 消