     /// - Parameters:
     ///   - time: The time to switch to move the playback.
     ///   - completionHandler: call block handler after seeking
-    open func seek(to time: CMTime , completionHandler: @escaping () -> Swift.Void) {
-        if let playerItem =  self._playerItem {
+    open func seek(to time: CMTime, completionHandler: @escaping () -> Void) {
+        if let playerItem = self._playerItem {
             return playerItem.seek(to: time, completionHandler: { (seeked) in
                 completionHandler()
             })
-        }else{
+        } else {
             _seekTimeRequested = time
         }
     }

        _hasAutoplayActivated = false
        if autoplay {
            playbackState = .playing
        }else{
            playbackState = .stopped
        }
        


        self._playerItem = playerItem

        if let seek = _seekTimeRequested, self._playerItem != nil {
            _seekTimeRequested = nil
            self.seek(to: seek)
        }

        self._playerItem?.addObserver(self, forKeyPath: PlayerEmptyBufferKey, options: [.new, .old], context: &PlayerItemObserverContext)
        self._playerItem?.addObserver(self, forKeyPath: PlayerKeepUpKey, options: [.new, .old], context: &PlayerItemObserverContext)
        self._playerItem?.addObserver(self, forKeyPath: PlayerStatusKey, options: [.new, .old], context: &PlayerItemObserverContext)
        self._playerItem?.addObserver(self, forKeyPath: PlayerLoadedTimeRangesKey, options: [.new, .old], context: &PlayerItemObserverContext)

        if let updatedPlayerItem = self._playerItem {
            NotificationCenter.default.addObserver(self, selector: #selector(playerItemDidPlayToEndTime(_:)), name: .AVPlayerItemDidPlayToEndTime, object: updatedPlayerItem)
