 
     private var player: AVPlayer!
     private var playerView: PlayerView!
-
+    private var timeObserver: AnyObject!
+    
     // MARK: object lifecycle
 
     public convenience init() {

        self.player.actionAtItemEnd = .Pause
        self.player.addObserver(self, forKeyPath: PlayerRateKey, options: ([NSKeyValueObservingOptions.New, NSKeyValueObservingOptions.Old]) , context: &PlayerObserverContext)
        
        self.player.addPeriodicTimeObserverForInterval(CMTimeMake(1, 100), queue: dispatch_get_main_queue()) { [unowned self] time in
            self.delegate?.playerCurrentTimeDidChange(self)
        }


    }

    deinit {
        self.player.removeTimeObserver(timeObserver)
        self.playerView?.player = nil
        self.delegate = nil

