Mime type & MP3 improvements

This commit is contained in:
Vanilagy
2025-02-02 17:21:57 +01:00
parent ffd0835e9a
commit 35c4d384cf
4 changed files with 24 additions and 7 deletions
+7 -1
View File
@@ -210,7 +210,13 @@ export class IsobmffDemuxer extends Demuxer {
override async getMimeType() {
await this.readMetadata();
let string = this.isQuickTime ? 'video/quicktime' : 'video/mp4';
const base = this.tracks.some(x => x.info?.type === 'video')
? 'video/'
: this.tracks.some(x => x.info?.type === 'audio')
? 'audio/'
: 'application/';
let string = base + (this.isQuickTime ? 'quicktime' : 'mp4');
if (this.tracks.length > 0) {
const codecMimeTypes = await Promise.all(this.tracks.map(x => x.inputTrack!.getCodecMimeType()));