 		playLayer.videoGravity = AVLayerVideoGravityResizeAspect
 		view.layer.addSublayer(playLayer)
 
-		NSNotificationCenter.defaultCenter().addObserver(self,
-			selector: Selector("playbackReachedEndNotification:"),
-			name: AVPlayerItemDidPlayToEndTimeNotification,
-			object: nil)
-
 		NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("applicationDidBecomeActiveNotification:"), name: UIApplicationDidBecomeActiveNotification, object: nil)
 		NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("applicationWillResignActiveNotification:"), name: UIApplicationWillResignActiveNotification, object: nil)
-
-		play()
     }
 
 	@objc
 	func applicationDidBecomeActiveNotification(note: NSNotification) {
-		play(1.0)
+		play(rate)
 	}
 
 	@objc

		NSNotificationCenter.defaultCenter().removeObserver(self)
	}

	func play(rate: Float = 1.0) {

		if let player = playControl {
			switch player.status {

		}
	}

	var rate: Float = 1.0 {
		didSet {
			play(rate)
		}
	}
	var loop: Bool = false

    override func viewDidLoad() {
        super.viewDidLoad()

