Progressive Video Download on iOS
Asked Answered
T

1

8

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

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

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

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?

EDIT: 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!

Trafficator answered 2/7, 2012 at 13:46 Comment(2)
Did you have any luck implementing this?Wag
With AVPlayer I think can play a URL directly, which, if I'm not mistaken, does progressive downloading. You can download the file itself in the background on another thread and then the next time they play the file, you can play the local version. Not exactly what you had in mind but maybe it will work?Olpe
D
4

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

Dartboard answered 23/7, 2014 at 18:6 Comment(1)
I would still like to have progressive download implemented since I want to send this file to DLNA TV, is there any luck in this still ?Leery

© 2022 - 2024 — McMap. All rights reserved.