I'm trying to catch an error on AVPlayer (Swift 2.2) when streaming url is server down with no success.
I did add status and rate observers but their respond is not the expected. It states that player status is ready to play.
playerItem = AVPlayerItem(URL: NSURL(string: streaminglink)!)
playerItem.addObserver(self, forKeyPath: "timedMetadata", options: .New, context: nil)
player = AVPlayer(playerItem:playerItem)
player.addObserver(self, forKeyPath: "status", options: NSKeyValueObservingOptions(), context: nil)
player.addObserver(self, forKeyPath: "rate", options: .New, context: nil)
player.rate = 1.0
player.play()
Any hints will be helpful. Thanks.