         }
     }
 
-
     private func handlePlayerRateChanged() {
         if player?.rate == 0 && playerStatus != .unknown && state != .idle {
             updateState(.paused)


    private func removeObservers() {
        guard let player = player, player.observationInfo != nil else { return }
        player.removeObserver(self, forKeyPath: "currentItem.status")
        player.removeObserver(self, forKeyPath: "currentItem.loadedTimeRanges")
        player.removeObserver(self, forKeyPath: "currentItem.seekableTimeRanges")
        player.removeObserver(self, forKeyPath: "currentItem.playbackLikelyToKeepUp")

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

    private var kvoLoadedTimeRangesContext = 0
    private var kvoSeekableTimeRangesContext = 0
    private var kvoBufferingContext = 0
