         let thumbRect = self.slider.thumbRect(forBounds: self.slider.bounds, trackRect: trackRect, value: 0)
         let thumbWidth = thumbRect.size.width
         let point = gesture.location(in: self.slider)
+        let value = self.seekValueFromSliderTap(point: point, thumbWidth: thumbWidth)
+        self.slider.setValue(value, animated: true)
+        updatePlayer(playIfNeeded: isPlaying)
+    }
+    
+    private func seekValueFromSliderTap(point: CGPoint, thumbWidth: CGFloat) -> Float {
         var ratio: Float = 0.0
         if point.x < thumbWidth / 2 {
             ratio = 0.0

            ratio = Float((point.x - thumbWidth / 2) / (self.slider.bounds.size.width - thumbWidth))
        }
        let del = ratio * (self.slider.maximumValue - self.slider.minimumValue)
        let value = self.slider.minimumValue + del;
        self.slider.setValue(value, animated: true)
        updatePlayer(playIfNeeded: isPlaying)
    }
    
    @objc fileprivate func sliderValueChangeAction(slider: UISlider, event: UIEvent) {

            print("players current item is nil")
            return
        }
        self.updatePlayerWith(currentItem: currentItem,  playIfNeeded: playIfNeeded)
    }
    
    private func updatePlayerWith(currentItem: AVPlayerItem, playIfNeeded: Bool) {
        let duratoinInSeconds = CMTimeGetSeconds(currentItem.duration)
        let seconds = Float64(duratoinInSeconds) * Float64((self.slider.value))
        let time = CMTimeMakeWithSeconds(seconds, Int32(NSEC_PER_SEC))
