Questions tagged [avassetdownloadtask]

27 questions
13
votes
3 answers

dyld not found AVAssetDownladTask

Trying to add offline HLS (a new ios 10 feature) to an app. I'm trying the following in swift in order for the app to still function on ios 9 without the offline HLS Functionality. Works fine on ios10 and compiles for ios9 too. @available(iOS…
NickDK
  • 999
  • 10
  • 24
7
votes
4 answers

Downloading and playing offline HLS Content - iOS 10

Since iOS 10, Apple has provided the support for downloading HLS (m3u8) video for offline viewing. My question is: Is it necessary that we can only download HLS when it is being played ? Or we can just download when user press download button and…
NSPratik
  • 4,714
  • 7
  • 51
  • 81
7
votes
3 answers

Get the size of an AVAssetDownloadTask before downloading

I'm currently implementing offline streaming with FairPlay streaming. Therefor I'm downloading streams using an AVAssetDownloadTask. I want to give the users feedback about the size of the download which starts to begin: Are you sure you want to…
Antoine
  • 23,526
  • 11
  • 88
  • 94
6
votes
2 answers

What causes AVAssetCache to report not playable offline for a fully downloaded asset?

I'm working on an iOS app that plays FairPlay-encrypted audio via HLS, and supports both downloading and streaming. And I'm unable to play downloaded content when in airplane mode. If I create an AVURLAsset from the local URL when the download…
6
votes
1 answer

How can I prevent iOS from auto-deleting HLS content saved for offline playback?

HLS offline playback was announced at this session in WWDC 2016, in iOS 10. But at about the 21:20 mark, the presenter is talking about how the downloaded files shouldn't be moved from where the AVAssetDownloadTask puts them, because the system…
5
votes
2 answers

Cache HLS video while playing with AVAssetDownloadTask

I am trying cache an HLS stream while I am playing it. I was following the Apple documentation on this (the section Playing Offline…
5
votes
1 answer

How can I use AVAssetDownloadTask to download a FairPlay-encrypted AVURLAsset instance that has not yet been streamed?

I'm trying to use AVAssetDownloadTask to download and play FairPlay-encrypted audio content offline. I kept getting an error like this in urlSession:task:didCompleteWithError:: Error Domain=AVFoundationErrorDomain Code=-11863 "Operation Stopped"…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
3
votes
2 answers

AVAssetDownloadTask iOS13

Tried iOS13.0 and iOS13.1 and still not working, I tried both AVAggregateAssetDownloadTask and AVAssetDownloadURLSession but none of them working. Not any delegate was called to tell me error of finish, and I found downloaded cache was only 25Kb…
Chan Gu
  • 41
  • 5
3
votes
0 answers

Download with AVAssetDownloadTask gets me an error on URLSession - iOS 10.x

I'm following Apple Media Playback Programming Guide example. The following code works on iOS 11, but crash on iOS 10. I setup the download as following: func setupAssetDownload(for item: DownloadItem) { let url = URL(string: item.urlVideo!)! …
jherran
  • 3,337
  • 8
  • 37
  • 54
2
votes
1 answer

Swift - Restoring pending M3U8 download not working

I am creating a function to download M3u8 files in iOS. I can download the M3u8 but I want the ability to restore a pending download if the app is paused or quit. Below is the main documentation I used but I can't get the restore function to work as…
STerrier
  • 3,755
  • 1
  • 16
  • 41
2
votes
3 answers

Proper way to detect user cancelled downloads using AVAssetDownloadDelegate

hoping someone has some incite, we've tried posting in the Apple forums, but they were no help. Trying to find the correct way to detect a user cancelled download/extract the error code from the AVAssetDownloadTask object using the…
CA Bearsfan
  • 454
  • 4
  • 20
2
votes
1 answer

is it possible to "Pause" and "Resume" AVAssetDownloadTask?

so far i found only two options for downloading video either "Resume" or "cancel"/"Suspend". is there any possible way to pause downloading video in middle and resume the download from where it stopped. I am using below code to download and store…
Code cracker
  • 3,105
  • 6
  • 37
  • 67
2
votes
1 answer

NSURLSessions and HLS video cacheing - partial downloads can't be deleted

I am attempting to cache an HLS video stream (not live) while a user watches it. To do this we set up an AvAssetDownloadTask similar to how apple recommends…
2
votes
0 answers

Download performance of AVAssetDownloadTask

I'm using AVAssetDownloadTask to download some FairPlay-encrypted audio. As per guidelines, the audio is split up into small chunks to allow switching between bitrates during streaming. Our chunks are about 6 seconds each, which means less than 100…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
2
votes
1 answer

Offline Fairplay AVAssetDownloadTask got unknown error callback while downloading (only happened on iOS 10.2)

We're building offline fairplay content for our client app; we implemented that feature by referencing to Apple sample download manager AssetPersistenceManager class in HLSCatalog demo app. There is one function, and two call back in…
untouchable
  • 206
  • 1
  • 11
1
2