Skip to content

Commit

Permalink
Add m4b mime type (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorte committed May 9, 2023
1 parent cd8001e commit 57fbf6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 1.0.5
# 1.0.5-wip

* Add m4b mimeType lookup by extension.
* Add `text/markdown` mimeType lookup by extension.

# 1.0.4
Expand Down
3 changes: 2 additions & 1 deletion lib/src/default_extension_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,9 @@ const Map<String, String> defaultExtensionMap = <String, String>{
'm3a': 'audio/mpeg',
'm3u': 'audio/x-mpegurl',
'm3u8': 'application/vnd.apple.mpegurl',
// Source: https://www.rfc-editor.org/rfc/rfc4337#page-3
// Source: https://datatracker.ietf.org/doc/html/rfc4337#section-2
'm4a': 'audio/mp4',
'm4b': 'audio/mp4',
'm4u': 'video/vnd.mpegurl',
'm4v': 'video/x-m4v',
'ma': 'application/mathematica',
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mime
version: 1.0.5
version: 1.0.5-wip
description: >-
Utilities for handling media (MIME) types, including determining a type from
a file extension and file contents.
Expand Down
1 change: 1 addition & 0 deletions test/mime_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void main() {
_expectMimeType('file.ogg', 'audio/ogg');
_expectMimeType('file.aiff', 'audio/x-aiff');
_expectMimeType('file.m4a', 'audio/mp4');
_expectMimeType('file.m4b', 'audio/mp4');
_expectMimeType('file.toml', 'application/toml');
_expectMimeType('file.md', 'text/markdown');
_expectMimeType('file.markdown', 'text/markdown');
Expand Down

0 comments on commit 57fbf6e

Please sign in to comment.