From 51353d9a035fb6b81f903a8b5f391292841649fd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 9 Nov 2021 10:11:20 +0100 Subject: Refactor video views Introduce viewers attribute for live videos Count views for live videos Reduce delay to see the viewer update for lives Add ability to configure video views buffer interval and view ip expiration --- client/src/app/shared/shared-main/video/video.model.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/src/app/shared/shared-main') diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index b11316471..472a8c810 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts @@ -57,6 +57,9 @@ export class Video implements VideoServerModel { url: string views: number + // If live + viewers?: number + likes: number dislikes: number nsfw: boolean @@ -150,6 +153,7 @@ export class Video implements VideoServerModel { this.url = hash.url this.views = hash.views + this.viewers = hash.viewers this.likes = hash.likes this.dislikes = hash.dislikes -- cgit v1.2.3