         }
 
         if let updatedPlayerItem = self._playerItem {
-            self.addPlayerItemObservers(updatedPlayerItem)
+            self.addPlayerItemObservers()
             NotificationCenter.default.addObserver(self, selector: #selector(playerItemDidPlayToEndTime(_:)), name: .AVPlayerItemDidPlayToEndTime, object: updatedPlayerItem)
             NotificationCenter.default.addObserver(self, selector: #selector(playerItemFailedToPlayToEndTime(_:)), name: .AVPlayerItemFailedToPlayToEndTime, object: updatedPlayerItem)
         }


    override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {

        if context == &PlayerItemObserverContext {

            // PlayerStatusKey

            if keyPath == PlayerKeepUpKey {

                // PlayerKeepUpKey

                if let item = self._playerItem,
                    item.isPlaybackLikelyToKeepUp {
                    self.bufferingState = .ready
                    if self.playbackState == .playing {
                        self.playFromCurrentTime()
                    }
                }

                if let status = change?[NSKeyValueChangeKey.newKey] as? NSNumber,
                    let playerStatus: AVPlayerStatus = AVPlayerStatus(rawValue: status.intValue) {
                    switch playerStatus {
                    case .readyToPlay:
                        self._playerView.player = self._avplayer
                    case .failed:
                        self.playbackState = PlaybackState.failed
                    default:
                        break
                    }
                }

            } else if keyPath == PlayerEmptyBufferKey {

                // PlayerEmptyBufferKey

                if let item = self._playerItem,
                    item.isPlaybackBufferEmpty {
                    self.bufferingState = .delayed
                }

                if let status = change?[NSKeyValueChangeKey.newKey] as? NSNumber,
                    let playerStatus: AVPlayerStatus = AVPlayerStatus(rawValue: status.intValue) {
                    switch playerStatus {
                    case .readyToPlay:
                        self._playerView.player = self._avplayer
                    case .failed:
                        self.playbackState = PlaybackState.failed
                    default:
                        break
                    }
                }

            } else if keyPath == PlayerLoadedTimeRangesKey {

                // PlayerLoadedTimeRangesKey

                if let item = self._playerItem {
                    self.bufferingState = .ready

                    let timeRanges = item.loadedTimeRanges
                    if let timeRange = timeRanges.first?.timeRangeValue {
                        let bufferedTime = CMTimeGetSeconds(CMTimeAdd(timeRange.start, timeRange.duration))
                        if _lastBufferTime != bufferedTime {
                            self.executeClosureOnMainQueueIfNecessary {
                                self.playerDelegate?.playerBufferTimeDidChange(bufferedTime)
                            }
                            _lastBufferTime = bufferedTime
                        }
                    }

                    let currentTime = CMTimeGetSeconds(item.currentTime())
                    let passedTime = _lastBufferTime - currentTime
                    
                    if (passedTime >= self.bufferSize ||
                        _lastBufferTime == maximumDuration ||
                        timeRanges.first == nil)
                        && self.playbackState == .playing
                    {
                        self.play()
                    }

                }

            }

        } else if context == &PlayerObserverContext {
            
            // PlayerTimeControlStatusKey
            


    fileprivate func setupPlayerItem(_ playerItem: AVPlayerItem?) {

        self.removePlayerItemObservers()
        
        if let currentPlayerItem = self._playerItem {
            NotificationCenter.default.removeObserver(self, name: .AVPlayerItemDidPlayToEndTime, object: currentPlayerItem)
            NotificationCenter.default.removeObserver(self, name: .AVPlayerItemFailedToPlayToEndTime, object: currentPlayerItem)
        }
