I don't want to use a uislider, instead I want to use a progress view to show the progress of the song completed, just like spotify on the bottom.
@IBOutlet weak var progressbar: UIProgressView!
func playSong(){
self.player = AVPlayer(URL: NSURL(string: url)!)
print(url)
print("time \(CMTimeGetSeconds((self.player.currentItem?.asset.duration)!))") //I Get the correct time printed
self.player.volume = 1.0
self.player.rate = 1.0
self.player.play()
}