                                   name: kCMTimebaseNotification_EffectiveRateChanged as NSNotification.Name,
                                   object: player.currentItem)
         }
+        player.currentItem?.asset.removeObserver(self, forKeyPath: #keyPath(AVAsset.duration))
     }
 }

                                     context: nil)
                
                if let new = newItem {
                    center.addObserver(
                        self,
                        selector: #selector(SystemPlayerObserver.didPlayToEnd),

            if let token = timebaseRangeToken {
                center.removeObserver(token)
            }
            
            guard let timebase: CMTimebase = newValue() else { return }
            
            weak var this = self
