this is the log of progress time and duration of song :
log progress time and duration - https://developer.apple.com/forums/content/attachment/685ef579-70d7-4864-9dd3-a9fdb7627d31
observer that I use to update the duration and progress time:
var timeObserver: Any?
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
		if let item = object as? AVPlayerItem, let keyPath = key, item == playerItem {
						
						switch keyPath {
						case "duration":
								let duration = Double(item.duration.seconds)
								
								print("Update display Duration in second: \(duration)")
								
								controller?.doUpdateDuration(duration: duration)
								self.timeObserver = player.addPeriodicTimeObserver(forInterval: interval, queue: .main, using: { time in
										
										self.playerDelegate?.updateProgresTime(time: time.seconds)
								})
								
						default:
								break
						}
						
				}
}