From 7815dc450ea9f8fd63e2234b6215013a132e6229 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 May 2023 14:23:59 +0200 Subject: Prevent invalid end watch section warnings --- client/src/app/+login/login.component.ts | 2 -- client/src/app/shared/shared-share-modal/video-share.component.ts | 2 -- client/src/assets/player/shared/peertube/peertube-plugin.ts | 6 ++++-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'client/src') diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts index c03af38f2..ba0d412d6 100644 --- a/client/src/app/+login/login.component.ts +++ b/client/src/app/+login/login.component.ts @@ -197,8 +197,6 @@ The link will expire within 1 hour.` } private handleError (err: any) { - console.log(err) - if (this.authService.isOTPMissingError(err)) { this.otpStep = true diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts index 43229c330..1b69aa2d0 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.ts +++ b/client/src/app/shared/shared-share-modal/video-share.component.ts @@ -203,8 +203,6 @@ export class VideoShareComponent { // --------------------------------------------------------------------------- async onUpdate () { - console.log('on update') - if (this.playlist) { this.playlistUrl = await this.getPlaylistUrl() this.playlistEmbedUrl = await this.getPlaylistEmbedUrl() 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 { }) this.player.on('seeked', () => { - // Don't take into account small seek events - if (Math.abs(this.player.currentTime() - lastCurrentTime) < 3) return + const diff = Math.floor(this.player.currentTime()) - lastCurrentTime + + // Don't take into account small forwards + if (diff > 0 && diff < 3) return lastViewEvent = 'seek' }) -- cgit v1.2.3