# comark-media [![npm version](https://comark-ui.onmax.me/badge.svg?source=npm-version&package=comark-media&icon=npm)](https://npmx.dev/package/comark-media) [![npm downloads](https://comark-ui.onmax.me/badge.svg?source=npm-downloads&package=comark-media&period=month&icon=npm)](https://npmx.dev/package/comark-media) [![license](https://comark-ui.onmax.me/badge.svg?label=license&value=MIT)](https://npmx.dev/package/comark-media) [![docs](https://comark-ui.onmax.me/badge.svg?label=docs&value=comark-ui.onmax.me)](https://comark-ui.onmax.me/media) Videos and audio written as images, as GitLab does. Both get controls on the shadcn/ui tokens, with the browser's own as their fallback. A GitHub attachment link alone in a paragraph plays too, as on GitHub, and a PDF written as an image becomes a link to it. A [Comark](https://comark.dev) plugin for HTML, Vue, React, and Svelte. ```sh pnpm add comark comark-media ``` ```ts import { createHtmlRenderer } from "@comark/html"; import media, { components } from "comark-media/html"; const render = createHtmlRenderer({ plugins: [media()], components }); ``` ```md ![Signing in with a passkey](./login.mp4) ![The spinner while the build runs](./spinner.webm){autoplay loop muted poster="./spinner.png"} ![The new alert sound](./alert.mp3) ![The signed contract](./contract.pdf) https://github.com/user-attachments/assets/2f3c0e3e-1c4b-4c3a-9a6b-0b1e2f3a4b5c ``` An image ending in `.mp4`, `.webm`, `.mov`, or `.m4v` becomes `