resolutions: { id: string, label: string, description?: string }[] = []
liveResolutions: { id: string, label: string, description?: string }[] = []
transcodingThreadOptions: { label: string, value: number }[] = []
+ liveMaxDurationOptions: { label: string, value: number }[] = []
languageItems: SelectOptionsItem[] = []
categoryItems: SelectOptionsItem[] = []
{ value: 4, label: '4' },
{ value: 8, label: '8' }
]
+
+ this.liveMaxDurationOptions = [
+ { value: 0, label: $localize`No limit` },
+ { value: 1000 * 3600, label: $localize`1 hour` },
+ { value: 1000 * 3600 * 3, label: $localize`3 hours` },
+ { value: 1000 * 3600 * 5, label: $localize`5 hours` },
+ { value: 1000 * 3600 * 10, label: $localize`10 hours` }
+ ]
}
get videoQuotaOptions () {
ngOnInit () {
this.serverConfig = this.serverService.getTmpConfig()
this.serverService.getConfig()
- .subscribe(config => this.serverConfig = config)
+ .subscribe(config => {
+ this.serverConfig = config
+ })
const formGroupData: { [key in keyof CustomConfig ]: any } = {
instance: {
live: {
enabled: null,
+ maxDuration: null,
+ allowReplay: null,
+
transcoding: {
enabled: null,
threads: TRANSCODING_THREADS_VALIDATOR,
}
}
+ hasConsistentOptions () {
+ if (this.hasLiveAllowReplayConsistentOptions()) return true
+
+ return false
+ }
+
+ hasLiveAllowReplayConsistentOptions () {
+ if (this.isTranscodingEnabled() === false && this.isLiveEnabled() && this.form.value['live']['allowReplay'] === true) {
+ return false
+ }
+
+ return true
+ }
+
private updateForm () {
this.form.patchValue(this.customConfig)
}