I'm having this issue which another user on StackOverflow had (this is the post):
I'm doing the following:
- Create a new AVURLAssetwith a given URL. That URL points to a video on a remote web server.
- Attempt to load the tracks property by calling loadValuesAsynchronously(forKeys:completionHandler:)
- The initial request fails, because no internet connection exists
- I notice that
the request failed by calling statusOfValue(forKey:error:)
- I then wait
for the connection to re-appear (using some reachability code). As
soon as it does, I call
loadValuesAsynchronously(forKeys:completionHandler:)again.
Here's
   where the problems begin. I would imagine that the AVURLAsset goes ahead
   and attempts to reload the tracks property since it failed
   previously. However, this does not seem to happen.
   statusOfValue(forKey:error:) will still return AVKeyValueStatusFailed,
   although a working internet connection is available and the video is
   playable.
Is there a way to reset the state for this given property and to attempt another load? Is there another way to work around this? Or is the only option to recreate the AVURLAsset?
Thanks!
