iOS上的渐进式视频下载 [英] Progressive Video Download on iOS

查看:269
本文介绍了iOS上的渐进式视频下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力实施视频中的渐进式下载我可以通过AVPlayer播放的iOS应用程序。我已经实现了一个可以将文件下载到iPad的下载器模块。但是,我发现我无法播放仍在写入的文件

I am trying to implement Progressive Downloading of a video in my iOS application that can be played through AVPlayer. I have already implemented a downloader module that can download the files to the iPad. However, I have discovered I cannot play a file that is still being written to

因此,据我所知,我唯一的解决方案是通过下载列表文件'chunks',然后继续播放每个文件,因为它们已准备好(即:已下载),可能使用HLS

So, as far as I can tell, my only solution would be through downloading a list of file 'chunks' and then keep playing through every file as they are ready (ie: downloaded), probably using HLS

搜索我遇到了这个问题通过hls实现渐进式下载但除此之外,我发现没有另一种方式

Searching I have come across this question which implements the progressive download through hls but other than that, I can find no other way

但是,我一直在看到如何配置Web服务器以利用iOS支持进行HTTP渐进式下载的搜索结果,但没有提及如何做来自iOS方面

However, I keep coming across search results that say how to configure web servers to leverage the iOS support for HTTP Progressive Downloading, but with no mention of how to do it from the iOS side

那么,任何人对此都有任何想法和/或经验吗?

So, any one have any ideas and/or experience about this?

编辑:我还发现可以采用其他方式实现它(即:流式传输,然后编写流式传输数据到磁盘)由此问题但仍然无法让它工作,因为它似乎不适用于非本地资产!

I have also found there could be a way of doing it other way around (ie: streaming, then writing streamed data to disk) which was suggested by this question but still cannot get it to work as it seems it does not work with non-local assets!

推荐答案

从你说的话,您可能想要更改方法并尝试流式传输文件。下载和播放同时,我会说是流媒体的定义。我讨厌当人们发布Apple文档的链接时,但是在这个例子中阅读这些文档中的一小部分将比以往任何时候都更有帮助。如果你已经在使用连接和视频,那么这一切都有意义,你只需要改变你的方法。
链接: https:// developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html

From what you say, you might want to change approach and attempt to stream the file. Downloading and playing at the same time, I would say is the definition of Streaming. I hate when people post links to the Apple documentation but in this instance reading a tiny bit of this documentation will help you more than I ever can. It should all make sense if you are lready working with connections and video, you just need to change your approach. The link: https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html

这篇关于iOS上的渐进式视频下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆