Giter Club home page Giter Club logo

Comments (6)

khellang avatar khellang commented on July 30, 2024 1

Hi @drasive! 👋🏻

The version was pushed in a hurry and the commit was never pushed properly to GitHub. It's there now; 8942472.

Sorry about that 😅

from mimetypes.

khellang avatar khellang commented on July 30, 2024 1

Yeah, I noticed that. Honestly, this package just picks the first media type from mime-db's list. I guess I'll have to introduce a way to override certain media types, unless we can find a good heuristic for which to pick by default.

from mimetypes.

tcbyrd avatar tcbyrd commented on July 30, 2024 1

The other day I started a discussion about GitHub Pages' handling of .mp4 files because I think video/mp4 is a more sensible default.

(hi from Pages team). I tend to agree. I have a PR open internally to prefer video/mp4 for .mp4 extensions. This would have the side effect of making the user have to use a different extension for application/mp4, but since the latter is newer that feels more practical to me since it doesn't break long-standing assumptions about .mp4 files being videos. If there's no objections I'll change it on the Pages side at least.

from mimetypes.

khellang avatar khellang commented on July 30, 2024

The differences between the code released and the code in this repository are not backwards compatible. E.g. getting the MIME type for a file with ".mp4" extension returns "application/mp4" in v2.4.1 instead of "video/mp4".

mp4 is officially registered with IANA as application/mp4. See jshttp/mime-db#207

from mimetypes.

gosko avatar gosko commented on July 30, 2024

Hi @khellang, mp4 is also registered with IANA as video/mp4, so mime-db has multiple entries associated with .mp4 in its DB. I believe consumers of mime-db need some logic to decide which one has precedence. I noticed mime-score seems to prefer application/ but I'm not sure why.

The other day I started a discussion about GitHub Pages' handling of .mp4 files because I think video/mp4 is a more sensible default. If my understanding is wrong I'd be happy to learn more!

(Just commenting here because I haven't seen many other discussions about this recent change to mime-db. I expect this will cause more things to break once there is a new release of mime-db)

from mimetypes.

gosko avatar gosko commented on July 30, 2024

Excellent! Hope your PR is accepted!

from mimetypes.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.