The following code has a video being played. But the video starts immediately when the view controller is launch. When the view controller is launch I would like the user to hit the play button for the video to play. Now the video plays as soon as the view controller is launched.
let path = NSBundle.mainBundle().pathForResource("x", ofType:"mp4")
let url = NSURL.fileURLWithPath(path!)
self.moviePlayer = MPMoviePlayerController(contentURL: url)
if let player = self.moviePlayer {
player.view.frame = CGRect(x: 55, y: 75, width: self.view.frame.size.width/2, height: self.view.frame.size.height / 5)
player.view.sizeToFit()
player.scalingMode = MPMovieScalingMode.AspectFit
player.fullscreen = false
player.controlStyle = MPMovieControlStyle.Default
player.movieSourceType = MPMovieSourceType.File
player.repeatMode = MPMovieRepeatMode.One
player.play()
self.view.addSubview(player.view)