File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ var TYPE_SCORES = {
25
25
// prefer font/woff over application/font-woff
26
26
font : 2 ,
27
27
28
+ // prefer video/mp4 over audio/mp4 over application/mp4
29
+ // See https://www.rfc-editor.org/rfc/rfc4337.html#section-2
30
+ audio : 2 ,
31
+ video : 3 ,
32
+
28
33
default : 0
29
34
}
30
35
Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ describe('mimeTypes', function () {
158
158
assert . strictEqual ( mimeTypes . lookup ( '.xml' ) , 'application/xml' )
159
159
} )
160
160
161
+ it ( 'should return mime type for ".mp4"' , function ( ) {
162
+ assert . strictEqual ( mimeTypes . lookup ( '.mp4' ) , 'video/mp4' )
163
+ } )
164
+
161
165
it ( 'should work without the leading dot' , function ( ) {
162
166
assert . strictEqual ( mimeTypes . lookup ( 'html' ) , 'text/html' )
163
167
assert . strictEqual ( mimeTypes . lookup ( 'xml' ) , 'application/xml' )
You can’t perform that action at this time.
0 commit comments