         self.delegate = nil
 
         NotificationCenter.default.removeObserver(self)
-
         self.playerView?.layer.removeObserver(self, forKeyPath: PlayerReadyForDisplayKey, context: &PlayerLayerObserverContext)
-
-//        self.player.removeObserver(self, forKeyPath: PlayerRateKey, context: &PlayerObserverContext)
 
         self.player.pause()
         self.setupPlayerItem(nil)

        self.playerView.fillMode = AVLayerVideoGravityResizeAspect
        self.playerView.playerLayer.isHidden = true
        self.view = self.playerView
        self.playerView.layer.addObserver(self, forKeyPath: PlayerReadyForDisplayKey, options: ([.new, .old]), context: &PlayerLayerObserverContext)

        NotificationCenter.default.addObserver(self, selector: #selector(applicationWillResignActive(_:)), name: NSNotification.Name.UIApplicationWillResignActive, object: UIApplication.shared)
        NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground(_:)), name: NSNotification.Name.UIApplicationDidEnterBackground, object: UIApplication.shared)

    private func commonInit() {
        self.player = AVPlayer()
        self.player.actionAtItemEnd = .pause
        
        self.playbackLoops = false
        self.playbackFreezesAtEnd = false
