diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-06 16:42:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | e4bf78561763cd84d22ebceb6f371cccf9a356d8 (patch) | |
tree | 7d8ea6ed53810d1dfcc2cfa5e3150da8e87e4645 /server/initializers/constants.ts | |
parent | 529f037294d9917a62235f8162887a8edc04c32f (diff) | |
download | PeerTube-e4bf78561763cd84d22ebceb6f371cccf9a356d8.tar.gz PeerTube-e4bf78561763cd84d22ebceb6f371cccf9a356d8.tar.zst PeerTube-e4bf78561763cd84d22ebceb6f371cccf9a356d8.zip |
Handle views for live videos
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 11 |
1 files changed, 8 insertions, 3 deletions
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 = { | |||
316 | } | 316 | } |
317 | } | 317 | } |
318 | 318 | ||
319 | let VIDEO_VIEW_LIFETIME = 60000 * 60 // 1 hour | 319 | let VIEW_LIFETIME = { |
320 | VIDEO: 60000 * 60, // 1 hour | ||
321 | LIVE: 60000 * 5 // 5 minutes | ||
322 | } | ||
323 | |||
320 | let CONTACT_FORM_LIFETIME = 60000 * 60 // 1 hour | 324 | let CONTACT_FORM_LIFETIME = 60000 * 60 // 1 hour |
321 | 325 | ||
322 | const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { | 326 | const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { |
@@ -726,7 +730,8 @@ if (isTestInstance() === true) { | |||
726 | 730 | ||
727 | REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR = 1 | 731 | REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR = 1 |
728 | 732 | ||
729 | VIDEO_VIEW_LIFETIME = 1000 // 1 second | 733 | VIEW_LIFETIME.VIDEO = 1000 // 1 second |
734 | VIEW_LIFETIME.LIVE = 1000 * 5 // 5 second | ||
730 | CONTACT_FORM_LIFETIME = 1000 // 1 second | 735 | CONTACT_FORM_LIFETIME = 1000 // 1 second |
731 | 736 | ||
732 | JOB_ATTEMPTS['email'] = 1 | 737 | JOB_ATTEMPTS['email'] = 1 |
@@ -838,7 +843,7 @@ export { | |||
838 | JOB_COMPLETED_LIFETIME, | 843 | JOB_COMPLETED_LIFETIME, |
839 | HTTP_SIGNATURE, | 844 | HTTP_SIGNATURE, |
840 | VIDEO_IMPORT_STATES, | 845 | VIDEO_IMPORT_STATES, |
841 | VIDEO_VIEW_LIFETIME, | 846 | VIEW_LIFETIME, |
842 | CONTACT_FORM_LIFETIME, | 847 | CONTACT_FORM_LIFETIME, |
843 | VIDEO_PLAYLIST_PRIVACIES, | 848 | VIDEO_PLAYLIST_PRIVACIES, |
844 | PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME, | 849 | PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME, |