return !!enabled.find((e: string) => e === algorithm)
}
+ getUserVideoQuota () {
+ return this.form.value['user']['videoQuota']
+ }
+
isSignupEnabled () {
return this.form.value['signup']['enabled'] === true
}
return this.form.value['followings']['instance']['autoFollowIndex']['enabled'] === true
}
- computeQuotaWithTranscoding () {
- const transcodingConfig = this.serverConfig.transcoding
-
- const resolutions = transcodingConfig.enabledResolutions
- const higherResolution = VideoResolution.H_4K
- let multiplier = 0
-
- for (const resolution of resolutions) {
- multiplier += resolution / higherResolution
- }
-
- if (transcodingConfig.hls.enabled) multiplier *= 2
-
- return multiplier * parseInt(this.form.value['user']['videoQuota'], 10)
- }
-
- isTranscodingInformationDisplayed () {
- const formVideoQuota = parseInt(this.form.value['user']['videoQuota'], 10)
- return this.serverConfig.transcoding.enabledResolutions.length !== 0 &&
- formVideoQuota > 0
- }
-
buildLandingPageOptions () {
this.defaultLandingPageOptions = this.menuService.buildCommonLinks(this.serverConfig)
.links