aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared/peertube/peertube-plugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/shared/peertube/peertube-plugin.ts')
-rw-r--r--client/src/assets/player/shared/peertube/peertube-plugin.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts
index cf96b33ba..af2147749 100644
--- a/client/src/assets/player/shared/peertube/peertube-plugin.ts
+++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts
@@ -180,8 +180,10 @@ class PeerTubePlugin extends Plugin {
180 }) 180 })
181 181
182 this.player.on('seeked', () => { 182 this.player.on('seeked', () => {
183 // Don't take into account small seek events 183 const diff = Math.floor(this.player.currentTime()) - lastCurrentTime
184 if (Math.abs(this.player.currentTime() - lastCurrentTime) < 3) return 184
185 // Don't take into account small forwards
186 if (diff > 0 && diff < 3) return
185 187
186 lastViewEvent = 'seek' 188 lastViewEvent = 'seek'
187 }) 189 })