Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = AVPlayer(url: videoURL as URL)
- player?.actionAtItemEnd = .none
- let playerLayer = AVPlayerLayer(player: player)
- playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
- playerLayer.frame = self.view.frame
- self.view.layer.addSublayer(playerLayer)
- player?.play()
Add Comment
Please, Sign In to add comment