import { AuthService, ScreenService, ServerService, User } from '@app/core'
import { FormReactive } from '@app/shared/shared-forms'
import { USER_ROLE_LABELS } from '@shared/core-utils/users'
-import { HTMLServerConfig, UserAdminFlag, UserRole, VideoResolution } from '@shared/models'
+import { HTMLServerConfig, UserAdminFlag, UserRole } from '@shared/models'
import { SelectOptionsItem } from '../../../../../types/select-options-item.model'
@Directive()
]
}
- isTranscodingInformationDisplayed () {
- const formVideoQuota = parseInt(this.form.value['videoQuota'], 10)
-
- return this.serverConfig.transcoding.enabledResolutions.length !== 0 &&
- formVideoQuota > 0
- }
-
- 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['videoQuota'], 10)
- }
-
resetPassword () {
return
}
+ getUserVideoQuota () {
+ return this.form.value['videoQuota']
+ }
+
protected buildAdminFlags (formValue: any) {
return formValue.byPassAutoBlock ? UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST : UserAdminFlag.NONE
}