Skip to content

Instantly share code, notes, and snippets.

@pgpt10
Last active February 25, 2019 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgpt10/2bd1560098b1c5eeb1955eb7fc5a7a1e to your computer and use it in GitHub Desktop.
Save pgpt10/2bd1560098b1c5eeb1955eb7fc5a7a1e to your computer and use it in GitHub Desktop.
let controller = AVPlayerViewController()
controller.player = player //AVPlayer object
self.present(controller, animated: true) {[weak self] in
DispatchQueue.main.async {
player?.play()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment