}
get videoExtensions () {
- return this.serverService.getConfig().video.file.extensions.join(',')
+ return this.serverConfig.video.file.extensions.join(', ')
}
ngOnInit () {
return this.videofileInput.nativeElement.files[0]
}
+ setVideoFile (files: FileList) {
+ this.videofileInput.nativeElement.files = files
+ this.fileChange()
+ }
+
getAudioUploadLabel () {
const videofile = this.getVideoFile()
if (!videofile) return this.i18n('Upload')
}
const privacy = this.firstStepPrivacyId.toString()
- const nsfw = this.serverService.getConfig().instance.isNSFW
+ const nsfw = this.serverConfig.instance.isNSFW
const waitTranscoding = true
const commentsEnabled = true
const downloadEnabled = true
previewfile: this.previewfileUpload
})
- this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
-
this.videoUploadObservable = this.videoService.uploadVideo(formData).subscribe(
event => {
if (event.type === HttpEventType.UploadProgress) {
}
private isAudioFile (filename: string) {
- return filename.endsWith('.mp3') || filename.endsWith('.flac') || filename.endsWith('.ogg')
+ const extensions = [ '.mp3', '.flac', '.ogg', '.wma', '.wav' ]
+
+ return extensions.some(e => filename.endsWith(e))
}
}