xcode 如何在 iphone 中播放流音频文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5092020/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to play streaming audio file in iphone?
提问by STUPID PROGRAMMER
How to play streaming audio file in iphone?
如何在 iphone 中播放流音频文件?
I am trying to make an app which can play audio file from web server with Play Pause and stop functionality.... can any one have any idea about this ?
我正在尝试制作一个应用程序,该应用程序可以从具有播放暂停和停止功能的网络服务器播放音频文件......有人对此有任何想法吗?
回答by Matt Long
This is a lot simpler now with the advent of AVFoundation. Look at the AVPlayer class. It works great for streaming audio.
现在随着 AVFoundation 的出现,这变得简单多了。看看AVPlayer 类。它非常适合流式传输音频。
回答by Yorxxx
Check Matt Gallagher work:
检查马特加拉格尔的工作:
http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html
http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html
If this is more that you're willing to, the easy answer would be HTTP Live Streaming.
如果您更愿意这样做,那么简单的答案就是 HTTP Live Streaming。