customConfig: CustomConfig
resolutions: { id: string, label: string, description?: string }[] = []
+ liveResolutions: { id: string, label: string, description?: string }[] = []
transcodingThreadOptions: { label: string, value: number }[] = []
languageItems: SelectOptionsItem[] = []
}
]
+ this.liveResolutions = this.resolutions.filter(r => r.id !== '0p')
+
this.transcodingThreadOptions = [
{ value: 0, label: $localize`Auto (via ffmpeg)` },
{ value: 1, label: '1' },
enabled: null
}
},
+ live: {
+ enabled: null,
+
+ transcoding: {
+ enabled: null,
+ threads: TRANSCODING_THREADS_VALIDATOR,
+ resolutions: {}
+ }
+ },
autoBlacklist: {
videos: {
ofUsers: {
const defaultValues = {
transcoding: {
resolutions: {}
+ },
+ live: {
+ transcoding: {
+ resolutions: {}
+ }
}
}
+
for (const resolution of this.resolutions) {
defaultValues.transcoding.resolutions[resolution.id] = 'false'
formGroupData.transcoding.resolutions[resolution.id] = null
}
+ for (const resolution of this.liveResolutions) {
+ defaultValues.live.transcoding.resolutions[resolution.id] = 'false'
+ formGroupData.live.transcoding.resolutions[resolution.id] = null
+ }
+
this.buildForm(formGroupData)
this.loadForm()
this.checkTranscodingFields()
return this.form.value['transcoding']['enabled'] === true
}
+ isLiveEnabled () {
+ return this.form.value['live']['enabled'] === true
+ }
+
+ isLiveTranscodingEnabled () {
+ return this.form.value['live']['transcoding']['enabled'] === true
+ }
+
isSignupEnabled () {
return this.form.value['signup']['enabled'] === true
}