Merge branch 'release/2.1.0' into develop

pull/2472/head
Chocobozzz 2020-02-07 09:10:59 +01:00
commit 338eb9d33a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 8 additions and 1 deletions

View File

@ -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))
} }
} }

View File

@ -406,6 +406,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 }
@ -797,6 +800,8 @@ function buildVideoMimetypeExt () {
'video/x-matroska': '.mkv', 'video/x-matroska': '.mkv',
'video/avi': '.avi', 'video/avi': '.avi',
'video/x-m4v': '.m4v', 'video/x-m4v': '.m4v',
// Could be anything
'application/octet-stream': null,
'video/m4v': '.m4v' 'video/m4v': '.m4v'
}) })
} }