From e4bf78561763cd84d22ebceb6f371cccf9a356d8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 6 Nov 2020 16:42:23 +0100 Subject: Handle views for live videos --- server/initializers/constants.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index e712f02a8..a93fe3c51 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -316,7 +316,11 @@ const CONSTRAINTS_FIELDS = { } } -let VIDEO_VIEW_LIFETIME = 60000 * 60 // 1 hour +let VIEW_LIFETIME = { + VIDEO: 60000 * 60, // 1 hour + LIVE: 60000 * 5 // 5 minutes +} + let CONTACT_FORM_LIFETIME = 60000 * 60 // 1 hour const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { @@ -726,7 +730,8 @@ if (isTestInstance() === true) { REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR = 1 - VIDEO_VIEW_LIFETIME = 1000 // 1 second + VIEW_LIFETIME.VIDEO = 1000 // 1 second + VIEW_LIFETIME.LIVE = 1000 * 5 // 5 second CONTACT_FORM_LIFETIME = 1000 // 1 second JOB_ATTEMPTS['email'] = 1 @@ -838,7 +843,7 @@ export { JOB_COMPLETED_LIFETIME, HTTP_SIGNATURE, VIDEO_IMPORT_STATES, - VIDEO_VIEW_LIFETIME, + VIEW_LIFETIME, CONTACT_FORM_LIFETIME, VIDEO_PLAYLIST_PRIVACIES, PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME, -- cgit v1.2.3