Skip to content

Instantly share code, notes, and snippets.

@agammahajan1
Created August 30, 2020 12:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save agammahajan1/5ff1f9c4de360c6df34e8c5270d9873d to your computer and use it in GitHub Desktop.
let videoURL = URL(string: "Sample-Video-Url")
let player = AVPlayer(url: videoURL!)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.present(playerViewController, animated: true) {
playerViewController.player.play()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment