{"repo":"eloquence/markdown-it-html5-media","free":true,"listed":false,"github":"https://github.com/eloquence/markdown-it-html5-media","clone":"git clone https://github.com/eloquence/markdown-it-html5-media.git","description":"Minimalist <video>/<audio> plugin for markdown-it, using image syntax","language":"JavaScript","stars":27,"topics":["markdown-it","markdown","html5","video","audio","commonmark"],"license":"CC0-1.0","category":"media-processing","readme_excerpt":"markdown-it-html5-media Minimalist &lt;video /&lt;audio plugin for markdown-it, using image syntax. Inspired by markdown-it-html5-embed. Key differences: - Only supports image syntax: , which is what the CommonMark folks seem to favor - Tokenizes video and audio to tokens of the 'video' and 'audio' type (useful for working with, e.g., rich text editors that process these tokens) - No library dependency for file type detection, just a simple extension check for commonly used video/audio formats. - Transpiled version: 10KB unminified vs. 169KB unminified Basic usage Output: Custom attributes You can pass any string that will be rendered instead of the default attributes shown above. Output: Media type detection This module detects the media type by examining the file extension (case-insensitive). The valid audio and video extensions are defined here. If you need to perform an identical media type detection outside the module, you can import the guessMediaType function (docs): Custom messages You can customize the fallback text. This text will only be shown to users whose browser does not support HTML5 video or audio at all. %s is used as a substitution marker for the filename or the description. Output: If you only want to change some of the text, you can import the messages object from the module and partially alter its contents: Translation Markdown-It supports passing along environment options, like so: This library will look up messages using the language key as in the exam","default_branch":null,"files":null,"tree":[],"storefront":"/r/eloquence","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/eloquence/markdown-it-html5-media/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}