Add 4k conf in transcoding in admin panel
This commit is contained in:
parent
a80e84f047
commit
00aa1f0d9b
|
@ -309,8 +309,8 @@
|
||||||
<ng-container formGroupName="resolutions">
|
<ng-container formGroupName="resolutions">
|
||||||
<div class="form-group" *ngFor="let resolution of resolutions">
|
<div class="form-group" *ngFor="let resolution of resolutions">
|
||||||
<my-peertube-checkbox
|
<my-peertube-checkbox
|
||||||
[inputName]="getResolutionKey(resolution)" [formControlName]="resolution"
|
[inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
|
||||||
i18n-labelText labelText="Resolution {{resolution}} enabled"
|
i18n-labelText labelText="Resolution {{resolution.label}} enabled"
|
||||||
></my-peertube-checkbox>
|
></my-peertube-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val
|
||||||
export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
||||||
customConfig: CustomConfig
|
customConfig: CustomConfig
|
||||||
|
|
||||||
resolutions: string[] = []
|
resolutions: { id: string, label: string }[] = []
|
||||||
transcodingThreadOptions: { label: string, value: number }[] = []
|
transcodingThreadOptions: { label: string, value: number }[] = []
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
@ -30,11 +30,30 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
this.resolutions = [
|
this.resolutions = [
|
||||||
this.i18n('240p'),
|
{
|
||||||
this.i18n('360p'),
|
id: '240p',
|
||||||
this.i18n('480p'),
|
label: this.i18n('240p')
|
||||||
this.i18n('720p'),
|
},
|
||||||
this.i18n('1080p')
|
{
|
||||||
|
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 = [
|
this.transcodingThreadOptions = [
|
||||||
|
@ -140,8 +159,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const resolution of this.resolutions) {
|
for (const resolution of this.resolutions) {
|
||||||
defaultValues.transcoding.resolutions[resolution] = 'false'
|
defaultValues.transcoding.resolutions[resolution.id] = 'false'
|
||||||
formGroupData.transcoding.resolutions[resolution] = null
|
formGroupData.transcoding.resolutions[resolution.id] = null
|
||||||
}
|
}
|
||||||
|
|
||||||
this.buildForm(formGroupData)
|
this.buildForm(formGroupData)
|
||||||
|
|
|
@ -262,7 +262,8 @@ function customConfig (): CustomConfig {
|
||||||
'360p': CONFIG.TRANSCODING.RESOLUTIONS[ '360p' ],
|
'360p': CONFIG.TRANSCODING.RESOLUTIONS[ '360p' ],
|
||||||
'480p': CONFIG.TRANSCODING.RESOLUTIONS[ '480p' ],
|
'480p': CONFIG.TRANSCODING.RESOLUTIONS[ '480p' ],
|
||||||
'720p': CONFIG.TRANSCODING.RESOLUTIONS[ '720p' ],
|
'720p': CONFIG.TRANSCODING.RESOLUTIONS[ '720p' ],
|
||||||
'1080p': CONFIG.TRANSCODING.RESOLUTIONS[ '1080p' ]
|
'1080p': CONFIG.TRANSCODING.RESOLUTIONS[ '1080p' ],
|
||||||
|
'2160p': CONFIG.TRANSCODING.RESOLUTIONS[ '2160p' ]
|
||||||
},
|
},
|
||||||
hls: {
|
hls: {
|
||||||
enabled: CONFIG.TRANSCODING.HLS.ENABLED
|
enabled: CONFIG.TRANSCODING.HLS.ENABLED
|
||||||
|
|
|
@ -156,7 +156,8 @@ const CONFIG = {
|
||||||
get '360p' () { return config.get<boolean>('transcoding.resolutions.360p') },
|
get '360p' () { return config.get<boolean>('transcoding.resolutions.360p') },
|
||||||
get '480p' () { return config.get<boolean>('transcoding.resolutions.480p') },
|
get '480p' () { return config.get<boolean>('transcoding.resolutions.480p') },
|
||||||
get '720p' () { return config.get<boolean>('transcoding.resolutions.720p') },
|
get '720p' () { return config.get<boolean>('transcoding.resolutions.720p') },
|
||||||
get '1080p' () { return config.get<boolean>('transcoding.resolutions.1080p') }
|
get '1080p' () { return config.get<boolean>('transcoding.resolutions.1080p') },
|
||||||
|
get '2160p' () { return config.get<boolean>('transcoding.resolutions.2160p') }
|
||||||
},
|
},
|
||||||
HLS: {
|
HLS: {
|
||||||
get ENABLED () { return config.get<boolean>('transcoding.hls.enabled') }
|
get ENABLED () { return config.get<boolean>('transcoding.hls.enabled') }
|
||||||
|
|
|
@ -62,6 +62,7 @@ export interface CustomConfig {
|
||||||
'480p': boolean
|
'480p': boolean
|
||||||
'720p': boolean
|
'720p': boolean
|
||||||
'1080p': boolean
|
'1080p': boolean
|
||||||
|
'2160p': boolean
|
||||||
}
|
}
|
||||||
hls: {
|
hls: {
|
||||||
enabled: boolean
|
enabled: boolean
|
||||||
|
|
Loading…
Reference in New Issue
Block a user