         
         
         ManifestLoader.instance.addCallback { (videos:[AerialVideo]) -> Void in
-            self.playNextVideo(player);
+            self.playNextVideo();
         };
     }
     

    
    func playerItemFailedtoPlayToEnd(aNotification: NSNotification) {
        NSLog("AVPlayerItemFailedToPlayToEndTimeNotification \(aNotification)");
        guard let player = self.player else {
            return;
        }
        
        playNextVideo(player);
    }
    
    func playerItemNewErrorLogEntryNotification(aNotification: NSNotification) {


        debugLog("playing next video for player \(player)");
        

    }
    
    // MARK: - Playing Videos
    
    func playNextVideo() {
        
        let player = AVPlayer()
        // play another video
        let oldPlayer = self.player
        self.player = player
        self.playerView.player = self.player
        
        if (oldPlayer == AerialView.previewPlayer) {
            AerialView.previewPlayer = self.player
        }
        
        
        let randomVideo = ManifestLoader.instance.randomVideo();
        
        guard let video = randomVideo else {
