Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Play Video in AVPlayer ViewController Sample Code Swift

let videoURL = URL(string: "https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
let player = AVPlayer(url: videoURL!)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.present(playerViewController, animated: true) {
    playerViewController.player!.play()
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Play #Video #AVPlayer #ViewController #Sample #Code #Swift
ADD COMMENT
Topic
Name
2+3 =