Use server config to display supported videos ext

pull/3958/head
Chocobozzz 2021-04-27 09:24:36 +02:00
parent 7695987e9d
commit 0c12054ae3
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,7 @@
i18n-labelText labelText="Allow additional extensions"
>
<ng-container ngProjectAs="description">
<span i18n>Allows users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, .m2ts, .mxf, or .nut videos.</span>
<span i18n>Allows users to upload {{ additionalVideoExtensions }} videos.</span>
</ng-container>
</my-peertube-checkbox>
</div>

View File

@ -20,6 +20,8 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {
transcodingProfiles: SelectOptionsItem[] = []
resolutions: ResolutionOption[] = []
additionalVideoExtensions = ''
constructor (
private configService: ConfigService,
private editConfigurationService: EditConfigurationService
@ -35,6 +37,8 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {
ngOnChanges (changes: SimpleChanges) {
if (changes['serverConfig']) {
this.transcodingProfiles = this.buildAvailableTranscodingProfile()
this.additionalVideoExtensions = this.serverConfig.video.file.extensions.join(' ')
}
}