Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mhijack/b17d18f883b327218be9e8b71882b634 to your computer and use it in GitHub Desktop.
Save mhijack/b17d18f883b327218be9e8b71882b634 to your computer and use it in GitHub Desktop.
periodicTimeObserver = player.addPeriodicTimeObserver(forInterval: CMTime(value: CMTimeValue(1), timescale: 2), queue: DispatchQueue.main) {[weak self] (progressTime) in
print("periodic time: \(CMTimeGetSeconds(progressTime))")
self?.updatePlaybackProgress(progressTime: progressTime)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment