mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 09:06:42 +02:00
feat(mukke): support all common audio formats for upload and playback
Expand accepted audio formats beyond MP3/WAV/OGG to include FLAC, AAC, M4A, AIFF, OPUS, WMA, WebM, ALAC, APE, WavPack, DSF, and DFF. The HTML5 Audio player already handles whatever the browser supports. Changes: - BeatUploader: accept audio/* instead of hardcoded format list - shared-storage: add MIME type mappings for all common audio formats Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c3927c85f8
commit
7a1ae1284c
2 changed files with 38 additions and 6 deletions
|
|
@ -75,6 +75,17 @@ export function getContentType(filename: string): string {
|
|||
'.wav': 'audio/wav',
|
||||
'.ogg': 'audio/ogg',
|
||||
'.m4a': 'audio/mp4',
|
||||
'.aac': 'audio/aac',
|
||||
'.flac': 'audio/flac',
|
||||
'.aiff': 'audio/aiff',
|
||||
'.aif': 'audio/aiff',
|
||||
'.opus': 'audio/opus',
|
||||
'.wma': 'audio/x-ms-wma',
|
||||
'.alac': 'audio/mp4',
|
||||
'.ape': 'audio/x-ape',
|
||||
'.wv': 'audio/x-wavpack',
|
||||
'.dsf': 'audio/dsf',
|
||||
'.dff': 'audio/dff',
|
||||
|
||||
// Video
|
||||
'.mp4': 'video/mp4',
|
||||
|
|
@ -127,7 +138,24 @@ export const DOCUMENT_EXTENSIONS = ['.pdf', '.doc', '.docx', '.xls', '.xlsx', '.
|
|||
/**
|
||||
* Common allowed extensions for audio
|
||||
*/
|
||||
export const AUDIO_EXTENSIONS = ['.mp3', '.wav', '.ogg', '.m4a'];
|
||||
export const AUDIO_EXTENSIONS = [
|
||||
'.mp3',
|
||||
'.wav',
|
||||
'.ogg',
|
||||
'.m4a',
|
||||
'.aac',
|
||||
'.flac',
|
||||
'.aiff',
|
||||
'.aif',
|
||||
'.opus',
|
||||
'.wma',
|
||||
'.webm',
|
||||
'.alac',
|
||||
'.ape',
|
||||
'.wv',
|
||||
'.dsf',
|
||||
'.dff',
|
||||
];
|
||||
|
||||
/**
|
||||
* Common allowed extensions for video
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue