Issue with AssetDownloadTask for HLS stream

In my app I play HLS streams via AVPlayer. It works well! However, when I try to download those same HLS urls via MakeAssetDownloadTask I regularly come across the error:

Download error for identifier 21222: Error Domain=CoreMediaErrorDomain Code=-12938 "HTTP 404: File Not Found" UserInfo={NSDescription=HTTP 404: File Not Found, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "BackgroundAVAssetDownloadTask <CE9B10ED-E749-49FF-9942-3F8728210B20>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundAVAssetDownloadTask <CE9B10ED-E749-49FF-9942-3F8728210B20>.<1>}

I have a feeling that the AVPlayer has a way to resolve this that the MakeAssetDownloadTask lacks. I am wondering if any of you have come across this or have insight.

Thank you!

BTW this is using Xcode Version 15.3 (15E204a) and developing for visionOS 1.0.1

If theres any more info I can share I'm happy to do so.

So I’m pretty sure that the answer to my own question is that I can’t ignore 404 errors given that they’re temporarily not available. If I ignore these errors and allow the download to continue, it will successfully finish.

Issue with AssetDownloadTask for HLS stream
 
 
Q