简体   繁体   English

从iPhone流式传输音频

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM