JSPM

browser-media-mime-type

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 300
  • Score
    100M100P100Q92440F
  • License MIT

mime type lookup for browser video and audio

Package Exports

  • browser-media-mime-type

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browser-media-mime-type) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

browser-media-mime-type

stable

A simple mime-type lookup for <video> and <audio> formats in modern browsers.

Please open a PR or issue if you feel something is missing from the list.

Sourced from:

Example

var mime = require('brwoser-media-mime-type')

mime('.mp4')
//=> 'video/mp4'

mime('mp3')
//=> 'audio/mpeg'

Usage

NPM

type = lookup(extension)

Takes the case-insensitive extension string, with or without a leading dot, and returns a mime type that might be applicable for that extension.

require('browser-media-mime-type/mime-types.josn')

You can require the JSON for the raw mime types hash.

License

MIT, see LICENSE.md for details.