-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http/file-server, media_types: new addition application/mp4
to mime db overrides video/mp4
and breaks some net players
#5433
Comments
Thank you for testing Currently, the value of the content-type header is determined from the extension in the URL. Instead, we should gather all possible content-types for a given extension (i.e. something like a version of Any thoughts, @kitsonk? |
Looks like this is affected by this change in the upstream jshttp/mime-db@48e4115 |
@NaitLee Do you know if those players send |
I think we should just return |
in my test, none of android vlc, mpv, and other numerous players i've tested send i'm wondering if in my mind the preference can be |
Looks like there's a line that implements the preference of Line 37 in 702f048
The line exists from the beginning of the package: https://github.com/denoland/std/pull/2286/files#diff-92e0917a6de42a1319f4f29e026ba39b73bf1dc70dececdcbced2d732b018d99R60 |
Describe the bug
New addition
application/mp4
tomedia_types/vendor/db.ts
(#2286) overridesvideo/mp4
for thecontentType
function. Asfile-server
specifiescontent-type
by that function and the db, it breaks some network-capable video players which expecting the mimetype to bevideo/*
, because the received mimetypeapplication/mp4
is unexpected, they won't play the video anymoreSteps to Reproduce
file-server
inside a folder with some mp4content-type
is the new additionapplication/mp4
, as it winsvideo/mp4
. This breaks some network players as stated, as they don't identifyapplication/mp4
; they only know aboutvideo/mp4
Expected behavior
file-server
, without the mimetype updatevideo/mp4
is by far the most preferred, it always worked for most (if not all) network playersEnvironment
@std/media_types
after the commit 6d58a57@std/http
0.224.1 and aboveP.S.
I think we need a smarter
contentType
function or mimetypes db that has preference over the "best" mimetype for certain file extensions. I see a similar problem had happened onapplication/javascript
overtext/javascript
(#5186), probably there are far more media types are affected.Likely that most players affected by this are proprietary, so fixing all the players is not feasible.
The text was updated successfully, but these errors were encountered: