[英]Streaming audio from iPhone
Does anybody know of a way to stream audio from a file being played back in an app over the internet in a standardized streaming audio format? 有没有人知道如何通过互联网以标准化流媒体音频格式从应用程序中播放的文件中流式传输音频? That is server up an Audio stream from the iPhone. 那是从iPhone服务器上的音频流。
You need a http server on you device, multiple packet audio files, like: 您的设备上需要一个http服务器,多个数据包音频文件,例如:
http://your.com/audio1.mp3
http://your.com/audio2.mp3
http://your.com/audio3.mp3
And m3u
file that shows the current realtime file... surely with a small delay, try 0.5 sec, the client opens http://your.com/play.m3u
and plays with AVPlayer
the stream. 并且显示当前实时文件的m3u
文件...确实有一点延迟,尝试0.5秒,客户端打开http://your.com/play.m3u
并使用AVPlayer
播放流。 Like that. 像那样。
In 4.0, just open the .m3u URL with the AVAudioPlayer
. 在4.0中,只需使用AVAudioPlayer
打开.m3u URL。 It was never simpler to stream audio. 流音频从未如此简单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.