private isDurationConstraintValid (streamingStartTime: number) {
const maxDuration = CONFIG.LIVE.MAX_DURATION
// No limit
- if (maxDuration === null) return true
+ if (maxDuration < 0) return true
const now = new Date().getTime()
const max = streamingStartTime + maxDuration
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)