Video not playing on splash screen
<p>I am trying to show splash screen with video. For this i have two queries :</p>

<ol>
<li>i have created splash screen view controller and load it when app is launched. but  a white screen is displayed for few seconds before my splash screen VC shows any fix for it ?</li>
<li><p>The video i am showing on it is only showing black screen. I cant guess what i have done wrong. Below is the code for it. </p>

<pre><code>func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {

self.window = UIWindow(frame: UIScreen.mainScreen().bounds)

let vc = SplashScreenVC(nibName: "SplashScreenVC", bundle: nil)
let rootViewController = UINavigationController(rootViewController: vc)
self.window?.rootViewController = rootViewController
self.navigationController?.navigationBarHidden = true
self.window?.makeKeyAndVisible()

// Override point for customization after application launch.
return true
</code></pre>

<p>}</p>

<pre><code>class SplashScreenVC: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
self.navigationController?.navigationBarHidden = true
    playVideo()
}

func playVideo() {

  let moviePath = NSBundle.mainBundle().pathForResource("animationVideo", ofType: "mp4")
  let movieUrl = NSURL.fileURLWithPath(moviePath!)
  let moviePlayer : MPMoviePlayerController = MPMoviePlayerController(contentURL: movieUrl)
  moviePlayer.prepareToPlay()
  let vV = self.view.viewWithTag(SplashScreenUITags.videoView.rawValue)! as UIView
  moviePlayer.controlStyle = MPMovieControlStyle.None
  moviePlayer.scalingMode = MPMovieScalingMode.Fill
  moviePlayer.movieSourceType  = MPMovieSourceType.File;
  moviePlayer.view.frame = vV.bounds

  vV.addSubview(moviePlayer.view)
  moviePlayer.play()

  NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("moviePlayBackDidFinish:"), name: MPMoviePlayerPlaybackDidFinishNotification, object: moviePlayer)

}
}
</code></pre></li>
</ol>