I have an app that uses AVPlayer
to play an AVPlayerItem
(video) from a remote URL. In iOS 6-8 I have been observing the AVPlayerItem's
value for loadedTimeRanges
to notify me when the playerItem
is ready to be played by the player. This also works when observing the value for the item's duration
, I believe.
After updating to iOS 9 beta, none of the values on AVPlayerItem
I observe ever makes it to the observeValueForKeyPath
-method. Just as if I'm not observing them at all. I am still being notified by the values on AVPlayer
, but not on AVPlayerItem
. Could this be a bug, or did something change in the environment here? I can't find anything about this..
For clarification, in iOS 6-8 the videos are starting to play as soon as there are any loaded time ranges. In iOS9 I am never notified when any time ranges have been loaded.
Update
After observing the value status
for AVPlayerItem
I have now confirmed that the item's status is changed to Failed
. By logging out the item's NSError
after failing, I get this:
Error Domain=AVFoundationErrorDomain Code=-11800
"The operation could not be completed"
UserInfo=0x146023c90 {NSUnderlyingError=0x144f547d0
"The operation couldn’t be completed. (OSStatus error -1022.)",
NSLocalizedFailureReason=An unknown error occurred (-1022),
NSLocalizedDescription=The operation could not be completed}