     }
     
     @IBAction func slidingRecognized(_ sender: Any) {
-        if let pan = sender as? UIPanGestureRecognizer {
-            let panPoint = pan.velocity(in: self.playbackControlView)
-            var newTime = (self.audioPlayer.progress + Double(panPoint.x / 140.0))
-            
-            if newTime <= 0 {
-                newTime = 0
-            }
-            else if newTime >= self.audioPlayer.duration {
-                newTime = self.audioPlayer.duration - 1
-                self.audioPlayer.pause()
-            }
-            
-            self.audioPlayer.seek(toTime: newTime)
-            updateTime()
+        if let pan = sender as? UIPanGestureRecognizer, let duration = pvMediaPlayer.duration {
+            
+            if pvMediaPlayer.checkIfNothingIsCurrentlyLoadedInPlayer() {
+                let panPoint = pan.velocity(in: self.playbackControlView)
+                let newTime = ((Double(self.progress.value) * duration) + Double(panPoint.x / 140.0))
+                self.progress.value = Float(newTime / duration)
+                self.pvMediaPlayer.seek(toTime: newTime)
+                updateTime()
+            } else {
+                let panPoint = pan.velocity(in: self.playbackControlView)
+                var newTime = (self.audioPlayer.progress + Double(panPoint.x / 140.0))
+                
+                if newTime <= 0 {
+                    newTime = 0
+                }
+                else if newTime >= duration {
+                    newTime = duration - 1
+                    self.audioPlayer.pause()
+                }
+                
+                self.pvMediaPlayer.seek(toTime: newTime)
+                updateTime()
+            }
+            
         }
     }
     

                    self.endTimePreview = nil
                }
            }
        }
    }
    

        super.viewDidLoad()
        
        self.navigationItem.backBarButtonItem = UIBarButtonItem(title:"Back", style:.plain, target:nil, action:nil)

        setupTimer()
        
        addObservers()
