diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/assets/player/shared/peertube/peertube-plugin.ts | 4 |
1 files changed, 2 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 8b65903f9..a29a0921f 100644 --- a/client/src/assets/player/shared/peertube/peertube-plugin.ts +++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts | |||
@@ -159,7 +159,7 @@ class PeerTubePlugin extends Plugin { | |||
159 | }) | 159 | }) |
160 | 160 | ||
161 | this.player.one('ended', () => { | 161 | this.player.one('ended', () => { |
162 | const currentTime = Math.floor(this.player.duration()) | 162 | const currentTime = Math.round(this.player.duration()) |
163 | lastCurrentTime = currentTime | 163 | lastCurrentTime = currentTime |
164 | 164 | ||
165 | this.notifyUserIsWatching(currentTime, lastViewEvent) | 165 | this.notifyUserIsWatching(currentTime, lastViewEvent) |
@@ -168,7 +168,7 @@ class PeerTubePlugin extends Plugin { | |||
168 | }) | 168 | }) |
169 | 169 | ||
170 | this.videoViewInterval = setInterval(() => { | 170 | this.videoViewInterval = setInterval(() => { |
171 | const currentTime = Math.floor(this.player.currentTime()) | 171 | const currentTime = Math.round(this.player.currentTime()) |
172 | 172 | ||
173 | // No need to update | 173 | // No need to update |
174 | if (currentTime === lastCurrentTime) return | 174 | if (currentTime === lastCurrentTime) return |