I want to download HLS stream file in background.
I first download the m3u8
-file and parse it to get many urls (about 30 ~ 200). Then I create a background session. Last, for every url, I create a NSURLSeessionDownloadTask
, I create next task and download after the former one finished.
It works well when the app is in foreground. But in background, it stoped and not create new task after the current one finished.
So, How can I download the urls one by one in background? (I don't think play music in background to keep app active is a good idea)