我不想使用uislider,而是想使用进度视图来显示完成的歌曲的进度,就像底部的spotify一样。
@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()
}