1
0
Fork 0

Use server config to display supported videos ext

This commit is contained in:
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(' ')
}
}