Support wma and wav audio files
This commit is contained in:
parent
bc053fb303
commit
99d362de0c
2 changed files with 6 additions and 1 deletions
|
@ -293,6 +293,8 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
|
||||||
}
|
}
|
||||||
|
|
||||||
private isAudioFile (filename: string) {
|
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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,6 +403,9 @@ const MIMETYPES = {
|
||||||
'audio/mp3': '.mp3',
|
'audio/mp3': '.mp3',
|
||||||
'application/ogg': '.ogg',
|
'application/ogg': '.ogg',
|
||||||
'audio/ogg': '.ogg',
|
'audio/ogg': '.ogg',
|
||||||
|
'audio/x-ms-wma': '.wma',
|
||||||
|
'audio/wav': '.wav',
|
||||||
|
'audio/x-flac': '.flac',
|
||||||
'audio/flac': '.flac'
|
'audio/flac': '.flac'
|
||||||
},
|
},
|
||||||
EXT_MIMETYPE: null as { [ id: string ]: string }
|
EXT_MIMETYPE: null as { [ id: string ]: string }
|
||||||
|
|
Loading…
Reference in a new issue