1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Live views update

This commit is contained in:
Chocobozzz 2020-12-09 15:00:02 +01:00
parent 5cac83a78d
commit a800dbf345
No known key found for this signature in database
GPG key ID: 583A612D890159BE
9 changed files with 114 additions and 25 deletions

View file

@ -537,6 +537,8 @@ class LiveManager {
await federateVideoIfNeeded(video, false)
PeerTubeSocket.Instance.sendVideoViewsUpdate(video)
// Only keep not expired watchers
const newWatchers = watchers.filter(w => w > notBefore)
this.watchersPerVideo.set(videoId, newWatchers)