我可以在 iOS 应用程序中流式传输 mp3 文件吗?或者我必须将内容下载到本地吗?
我正在设计一个应用程序,它能够播放与某些 pdf 相关的大量不同的 mp3 文件。我宁愿只流式传输 mp3 文件,这样我就不必担心他们将它们下载到设备上并占用大量空间。网络流媒体可以吗?或者我需要将内容本地化吗?我一直在摆弄 MPMoviePlayer 框架,但无法让它工作。
如果有人可以分享一些工作代码,那将非常有帮助。
谢谢!
I am designing an app that has the ability to play a large number of different mp3 files that are associated with some pdfs. I would rather just stream the mp3 files so I don't have to worry about allowing them to download them onto their device and fill up a bunch of space. Is network streaming possible? Or do I need to have the content local? I have been fiddling with the MPMoviePlayer framework, but I can't get it to work.
It would be very helpful if someone could share some working code.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您只需使用
MPMoviePlayerViewController
并将内容 URL 设置为远程媒体(视频或音频)的 URL。Yes, you can just use an
MPMoviePlayerViewController
and set the content URL to the URL of the remote media (video or audio).