Skip to content

Commit

Permalink
Fix Ogg Opus MIME-type to be 'audio/ogg; codecs=opus'
Browse files Browse the repository at this point in the history
In line with RFC 7845.
  • Loading branch information
Borewit committed Oct 13, 2024
1 parent 0e91f7b commit fc6d696
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
}

Expand Down
2 changes: 1 addition & 1 deletion supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit fc6d696

Please sign in to comment.