Add getMimeType to Output & other small adjustments

This commit is contained in:
Vanilagy
2025-06-07 22:51:57 +02:00
parent 85bd7bdcf4
commit c7c57e2132
21 changed files with 330 additions and 101 deletions
+13
View File
@@ -93,3 +93,16 @@ export const extractSampleMetadata = (
vorbisBlockSize: currentBlocksize,
};
};
export const buildOggMimeType = (info: {
codecStrings: string[];
}) => {
let string = 'audio/ogg';
if (info.codecStrings) {
const uniqueCodecMimeTypes = [...new Set(info.codecStrings)];
string += `; codecs="${uniqueCodecMimeTypes.join(', ')}"`;
}
return string;
};