AVPlayer / AVPlayerItem timeout

Hi there! I have a question if I can increase an timeout for the AVPlayerItem. The problem is that sometimes if the video file (.mp4) takes more than 20s to load from server the AVPlayer will fail to load with such a status:i

ERROR: avItemStatus: 2, playerStatus: waitingToPlayAtSpecifiedRate, avPlayer error:Optional(Error Domain=AVFoundationErrorDomain Code=-11819 "Vorgang kann nicht abgeschlossen werden" UserInfo={NSLocalizedDescription=Vorgang kann nicht abgeschlossen werden, NSLocalizedRecoverySuggestion=Später erneut versuchen.}), avItemError: Optional(Error Domain=AVFoundationErrorDomain Code=-11819 "Vorgang kann nicht abgeschlossen werden" UserInfo={NSLocalizedDescription=Vorgang kann nicht abgeschlossen werden, NSLocalizedRecoverySuggestion=Später erneut versuchen.}), avItemErrorLog: nil



(sorry for the german)

This is easy to replicate if you set a Network Link Conditioner and try to load long video. The interesting part is that this happens only in Release mode, while the Debug mode is allways able to load an item — it just waits until the item is loaded.


Is it possible to somehow handle this problem? Please help, because the player part is the most important part for app.

Replies

Sorry, Is there any update of this issue? This issue happend when set option AVURLAssetPreferPreciseDurationAndTimingKey = true on AVURLAsset