Hello I have set my UISlider
minimum value to 0.00. Then I set it's max value in this way.
self.viewPlayer.layer.addSublayer(playerLayer)
let duration : CMTime = avPlayer.avPlayer.currentItem!.asset.duration
let seconds : Float64 = CMTimeGetSeconds(duration)
sliderBar.maximumValue=Float(seconds)
sliderBar!.isContinuous = false
sliderBar!.tintColor = UIColor.green
But I am getting this exception
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to set a slider's minimumValue (0.000000) to be larger than the maximumValue (nan)'
enter code here
I know after prepareForPlay()
to actual playing it takes some time to really play the video. So how can I detect when the player really started to play the video?
Please help me.
Thanks