X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fserver-config-manager.ts;h=d16a88f65d2987f6cbc75a4a037aa8c380bb7573;hb=daa0226b0a2ae1d19b342c2b7a54267d2fd8d30e;hp=d759f85e17c3ee1187eb56dc1e41bb3620224fb9;hpb=a9bfa85d2cdf13670aaced740da5b493fbeddfce;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts index d759f85e1..d16a88f65 100644 --- a/server/lib/server-config-manager.ts +++ b/server/lib/server-config-manager.ts @@ -3,11 +3,12 @@ import { CONFIG, isEmailEnabled } from '@server/initializers/config' import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '@server/initializers/constants' import { isSignupAllowed, isSignupAllowedForCurrentIP } from '@server/lib/signup' import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' +import { PluginModel } from '@server/models/server/plugin' import { HTMLServerConfig, RegisteredExternalAuthConfig, RegisteredIdAndPassAuthConfig, ServerConfig } from '@shared/models' import { Hooks } from './plugins/hooks' import { PluginManager } from './plugins/plugin-manager' import { getThemeOrDefault } from './plugins/theme-utils' -import { VideoTranscodingProfilesManager } from './transcoding/video-transcoding-profiles' +import { VideoTranscodingProfilesManager } from './transcoding/default-transcoding-profiles' /** * @@ -45,7 +46,11 @@ class ServerConfigManager { client: { videos: { miniature: { + displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR, preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME + }, + resumableUpload: { + maxChunkSize: CONFIG.CLIENT.VIDEOS.RESUMABLE_UPLOAD.MAX_CHUNK_SIZE } }, menu: { @@ -63,7 +68,12 @@ class ServerConfigManager { licence: CONFIG.DEFAULTS.PUBLISH.LICENCE }, p2p: { - enabled: CONFIG.DEFAULTS.P2P.ENABLED + webapp: { + enabled: CONFIG.DEFAULTS.P2P.WEBAPP.ENABLED + }, + embed: { + enabled: CONFIG.DEFAULTS.P2P.EMBED.ENABLED + } } }, @@ -130,6 +140,10 @@ class ServerConfigManager { enabled: CONFIG.LIVE.ENABLED, allowReplay: CONFIG.LIVE.ALLOW_REPLAY, + latencySetting: { + enabled: CONFIG.LIVE.LATENCY_SETTING.ENABLED + }, + maxDuration: CONFIG.LIVE.MAX_DURATION, maxInstanceLives: CONFIG.LIVE.MAX_INSTANCE_LIVES, maxUserLives: CONFIG.LIVE.MAX_USER_LIVES, @@ -145,6 +159,9 @@ class ServerConfigManager { port: CONFIG.LIVE.RTMP.PORT } }, + videoStudio: { + enabled: CONFIG.VIDEO_STUDIO.ENABLED + }, import: { videos: { http: { @@ -264,6 +281,7 @@ class ServerConfigManager { getRegisteredThemes () { return PluginManager.Instance.getRegisteredThemes() .map(t => ({ + npmName: PluginModel.buildNpmName(t.name, t.type), name: t.name, version: t.version, description: t.description, @@ -275,6 +293,7 @@ class ServerConfigManager { getRegisteredPlugins () { return PluginManager.Instance.getRegisteredPlugins() .map(p => ({ + npmName: PluginModel.buildNpmName(p.name, p.type), name: p.name, version: p.version, description: p.description,