 
     open override func mute(_ enabled: Bool) {
         player?.volume = enabled ? .zero : 1.0
-    }
-
-    open override func observeValue(forKeyPath keyPath: String?, of _: Any?,
-                                    change _: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
-        guard let context = context else { return }
-
-        switch context {
-        case &kvoBufferingContext:
-            handleBufferingEvent(keyPath)
-        default:
-            break
-        }
     }
 
     private func updateState(_ newState: PlaybackState) {

            player.observe(\.currentItem?.status, options: .new, changeHandler: handleStatusChangedEvent),
            player.observe(\.currentItem?.loadedTimeRanges, options: .new, changeHandler: handleLoadedTimeRangesEvent),
            player.observe(\.currentItem?.seekableTimeRanges, options: .new, changeHandler: handleSeekableTimeRangesEvent),
            player.observe(\.isExternalPlaybackActive, options: .new, changeHandler: handleExternalPlaybackActiveEvent),
            player.observe(\.rate, options: .new, changeHandler: handlePlayerRateChanged),
        ]

        player.addObserver(self, forKeyPath: "currentItem.playbackLikelyToKeepUp",
                            options: .new, context: &kvoBufferingContext)
        player.addObserver(self, forKeyPath: "currentItem.playbackBufferEmpty",
                            options: .new, context: &kvoBufferingContext)

        NotificationCenter.default.addObserver(
            self,
            selector: #selector(AVFoundationPlayback.playbackDidEnd),
            name: NSNotification.Name.AVPlayerItemDidPlayToEndTime,
            object: player.currentItem)
    }

    private func maximizePlayer(view: UIView, changes: NSKeyValueObservedChange<CGRect>) {

        "mp4": "video/mp4",
        "m3u8": "application/x-mpegurl",
    ]

    private(set) var seekToTimeWhenReadyToPlay: TimeInterval?
    
