Monotouch:在远程服务器上播放 MP3
我想播放远程服务器上的 MP3。 如何在 iOS 应用程序中播放 MP3?
I want to play a MP3 which is on a remote server.
What can i do to play the MP3 in a iOS application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AVPlayer 可以工作,如果您想要对媒体管道进行低级访问,您可以使用 AVAudioFile API,它可以让您自己流式传输数据,然后将其提供给音频解码器。
请参阅我的示例:
http://github.com/migueldeicaza/monotouch- samples/tree/master/StreamingAudio/
这是一个低级 API,请记住这一点。该示例从远程站点获取自己的文件。
The AVPlayer will work, if you want low-level access to the media pipeline, you can use the AVAudioFile APIs that let you stream the data yourself and then feed it to the audio decoders.
See my sample at:
http://github.com/migueldeicaza/monotouch-samples/tree/master/StreamingAudio/
This is a low-level API, just keep that in mind. The sample does its own file fetching from the remote site.
你可以试试AVPlayer。例如,
查看 MonoTouch 或有关更多详细信息,请参阅 Apple 文档。
You could try AVPlayer. For example,
Check out the MonoTouch or Apple documentation for more details.