From fc6d69667b2b2a4078c7f2b49aaf95b90a161ddb Mon Sep 17 00:00:00 2001 From: Borewit Date: Sun, 13 Oct 2024 20:09:05 +0200 Subject: [PATCH] Fix Ogg Opus MIME-type to be 'audio/ogg; codecs=opus' In line with RFC 7845. --- core.d.ts | 2 +- core.js | 2 +- supported.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core.d.ts b/core.d.ts index 1768cc04..6adac9b4 100644 --- a/core.d.ts +++ b/core.d.ts @@ -213,7 +213,7 @@ export type MimeType = | 'video/3gpp' | 'audio/mpeg' | 'audio/mp4' // RFC 4337 - | 'audio/opus' + | 'audio/ogg; codecs=opus' | 'video/ogg' | 'audio/ogg' | 'application/ogg' diff --git a/core.js b/core.js index fdaa4d00..ad02b1c7 100644 --- a/core.js +++ b/core.js @@ -529,7 +529,7 @@ export class FileTypeParser { if (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) { return { ext: 'opus', - mime: 'audio/opus', + mime: 'audio/ogg; codecs=opus', }; } diff --git a/supported.js b/supported.js index b64f5b59..57857f7e 100644 --- a/supported.js +++ b/supported.js @@ -200,9 +200,9 @@ export const mimeTypes = [ 'video/3gpp', 'audio/mpeg', 'audio/mp4', // RFC 4337 - 'audio/opus', 'video/ogg', 'audio/ogg', + 'audio/ogg; codecs=opus', 'application/ogg', 'audio/x-flac', 'audio/ape',