diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-09 10:11:20 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-11-09 15:00:31 +0100 |
commit | 51353d9a035fb6b81f903a8b5f391292841649fd (patch) | |
tree | 75acb6eea5e043bf2e15a6a5a92e9a3c5967b156 /shared/models/activitypub | |
parent | 221ee1adc916684d4881d2a9c4c01954dcde986e (diff) | |
download | PeerTube-51353d9a035fb6b81f903a8b5f391292841649fd.tar.gz PeerTube-51353d9a035fb6b81f903a8b5f391292841649fd.tar.zst PeerTube-51353d9a035fb6b81f903a8b5f391292841649fd.zip |
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
Diffstat (limited to 'shared/models/activitypub')
-rw-r--r-- | shared/models/activitypub/activity.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts index 548d8858e..d6284e283 100644 --- a/shared/models/activitypub/activity.ts +++ b/shared/models/activitypub/activity.ts | |||
@@ -6,7 +6,6 @@ import { DislikeObject } from './objects/dislike-object' | |||
6 | import { APObject } from './objects/object.model' | 6 | import { APObject } from './objects/object.model' |
7 | import { PlaylistObject } from './objects/playlist-object' | 7 | import { PlaylistObject } from './objects/playlist-object' |
8 | import { VideoCommentObject } from './objects/video-comment-object' | 8 | import { VideoCommentObject } from './objects/video-comment-object' |
9 | import { ViewObject } from './objects/view-object' | ||
10 | 9 | ||
11 | export type Activity = | 10 | export type Activity = |
12 | ActivityCreate | | 11 | ActivityCreate | |
@@ -53,7 +52,7 @@ export interface BaseActivity { | |||
53 | 52 | ||
54 | export interface ActivityCreate extends BaseActivity { | 53 | export interface ActivityCreate extends BaseActivity { |
55 | type: 'Create' | 54 | type: 'Create' |
56 | object: VideoObject | AbuseObject | ViewObject | DislikeObject | VideoCommentObject | CacheFileObject | PlaylistObject | 55 | object: VideoObject | AbuseObject | DislikeObject | VideoCommentObject | CacheFileObject | PlaylistObject |
57 | } | 56 | } |
58 | 57 | ||
59 | export interface ActivityUpdate extends BaseActivity { | 58 | export interface ActivityUpdate extends BaseActivity { |
@@ -100,6 +99,7 @@ export interface ActivityView extends BaseActivity { | |||
100 | type: 'View' | 99 | type: 'View' |
101 | actor: string | 100 | actor: string |
102 | object: APObject | 101 | object: APObject |
102 | expires: string | ||
103 | } | 103 | } |
104 | 104 | ||
105 | export interface ActivityDislike extends BaseActivity { | 105 | export interface ActivityDislike extends BaseActivity { |