Hello I have set my UISliderminimum value to 0.00. Then I set it\'s max value in this way.
self.viewPlayer.layer.addSublayer(playerLayer)
le
You can add an observer on the object of your AVPlayer like this
player.addObserver(self, forKeyPath: "status", options: NSKeyValueObservingOptions.new, context: nil)
and you can check the status change with your AVPlayer like this
func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutableRawPointer) {
if keyPath == "status" {
print(player.status)
}
}