export class EditCustomConfigComponent extends FormReactive implements OnInit {
customConfig: CustomConfig
- resolutions: string[] = []
+ resolutions: { id: string, label: string }[] = []
transcodingThreadOptions: { label: string, value: number }[] = []
constructor (
super()
this.resolutions = [
- this.i18n('240p'),
- this.i18n('360p'),
- this.i18n('480p'),
- this.i18n('720p'),
- this.i18n('1080p')
+ {
+ id: '240p',
+ label: this.i18n('240p')
+ },
+ {
+ id: '360p',
+ label: this.i18n('360p')
+ },
+ {
+ id: '480p',
+ label: this.i18n('480p')
+ },
+ {
+ id: '720p',
+ label: this.i18n('720p')
+ },
+ {
+ id: '1080p',
+ label: this.i18n('1080p')
+ },
+ {
+ id: '2160p',
+ label: this.i18n('2160p')
+ }
]
this.transcodingThreadOptions = [
}
}
for (const resolution of this.resolutions) {
- defaultValues.transcoding.resolutions[resolution] = 'false'
- formGroupData.transcoding.resolutions[resolution] = null
+ defaultValues.transcoding.resolutions[resolution.id] = 'false'
+ formGroupData.transcoding.resolutions[resolution.id] = null
}
this.buildForm(formGroupData)