mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-09 08:43:49 +02:00
Add getMimeType to Output & other small adjustments
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user