Skip to content

Instantly share code, notes, and snippets.

@kjartanvest
Created May 24, 2017 13:13
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 kjartanvest/44ea9545ec9dc40996c62d18ea2a31df to your computer and use it in GitHub Desktop.
Save kjartanvest/44ea9545ec9dc40996c62d18ea2a31df to your computer and use it in GitHub Desktop.
// Configure AVPlayerViewController with an AVPlayer
let avPlayerViewController = AVPlayerViewController()
avPlayerViewController.player = AVPlayer(url: videoUrl!)
// Present the avplayer view controller
self.present(avPlayerViewController, animated: true) {
avPlayerViewController.player?.play()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment