diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-10 14:23:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-10 14:23:59 +0200 |
commit | 7815dc450ea9f8fd63e2234b6215013a132e6229 (patch) | |
tree | faee269ef011930dd71d52035cdd2af8e6f2b004 /client/src/assets/player/shared | |
parent | bc3bd960e3d240a1a02bbda7530659424ad70685 (diff) | |
download | PeerTube-7815dc450ea9f8fd63e2234b6215013a132e6229.tar.gz PeerTube-7815dc450ea9f8fd63e2234b6215013a132e6229.tar.zst PeerTube-7815dc450ea9f8fd63e2234b6215013a132e6229.zip |
Prevent invalid end watch section warnings
Diffstat (limited to 'client/src/assets/player/shared')
-rw-r--r-- | client/src/assets/player/shared/peertube/peertube-plugin.ts | 6 |
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 | }) |