       }
     }
   }
-    
-  public override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
-        
-    guard let realObject = object where object != nil else {
+  
+  public override func observeValueForKeyPath(
+    keyPath: String?,
+    ofObject object: AnyObject?,
+    change: [String : AnyObject]?,
+    context: UnsafeMutablePointer<Void>) {
+      guard let realObject = object where object != nil else {
         return
-    }
-    
-    if !realObject.isKindOfClass(AVPlayer){
+      }
+      if !realObject.isKindOfClass(AVPlayer){
         return
-    }
-    
-    if ((realObject as! AVPlayer) != self.moviePlayer.player || keyPath! != "status"){
+      }
+      if ((realObject as! AVPlayer) != self.moviePlayer.player || keyPath! != "status"){
         return
-    }
-    
-    if self.moviePlayer.player?.status == AVPlayerStatus.ReadyToPlay{
+      }
+      if self.moviePlayer.player?.status == AVPlayerStatus.ReadyToPlay{
         self.movieReadyToPlay()
-    }
-    
+      }
   }
   
-  //override in subclass
+  // Override in subclass
   public func movieReadyToPlay(){
-        
+    print("test")
   }
-    
+  
   override public func viewDidLoad() {
     super.viewDidLoad()
   }
-
+  
   override public func didReceiveMemoryWarning() {
     super.didReceiveMemoryWarning()
   }

      }
    }
  }

  override public func viewDidAppear(animated: Bool) {
    moviePlayer.view.frame = videoFrame
    moviePlayer.showsPlaybackControls = false

      setMoviePlayer(contentURL)
    }
  }
  
  public var videoFrame: CGRect = CGRect()
  public var startTime: CGFloat = 0.0
  public var duration: CGFloat = 0.0
