I'd like to build simple iOS app for play a non-live HLS video stream.
The important thing is we want to be able to specify how many segments to download when the video begins playing.
When the app opens, it should ask for two things: a url to the hls stream and number of segments to download.
When you hit submit, the app should start playing the video. But the player should make sure once the specified number of segments are downloaded, the video stops and NO further segments are downloaded.
You can assume each segment is 4 seconds long.
This is current built prototype app source, please check this and update it(Fix bug).
[login to view URL]
It is need to pod install for run.