npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

comark-media

v0.11.0

Published

Videos and audio from image syntax, and GitHub attachment links that play. Both get controls on the shadcn/ui tokens. A Comark plugin.

Readme

comark-media

npm version npm downloads license docs

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. A Comark plugin for HTML, Vue, React, and Svelte.

pnpm add comark comark-media
import { createHtmlRenderer } from "@comark/html";
import media, { components } from "comark-media/html";

const render = createHtmlRenderer({ plugins: [media()], components });
![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)

https://github.com/user-attachments/assets/2f3c0e3e-1c4b-4c3a-9a6b-0b1e2f3a4b5c

An image ending in .mp4, .webm, .mov, or .m4v becomes <video controls playsinline preload="metadata">, and one ending in .mp3, .wav, .ogg, or .m4a becomes <audio controls preload="metadata">. The alt text labels the player. autoplay, loop, muted, poster, width, and height pass through. Give a video paired pixel dimensions like {width=1280 height=720} to reserve its room. media({ size: true }) measures remote videos without dimensions while parsing. Enable it only for trusted documents: requests follow redirects and can reach private networks. By default measurement reads only data URIs; media({ size: false }) disables it.

Players come with a play button, the time, a seek bar, and a mute button with a volume slider over it, and a settings panel for the speed and looping, drawn with the shared --comark-* tokens; a video's float over its bottom edge and add a full screen button, and on a touch screen spread over the video with the sound and settings in its top corner. A small script runs them. Until it does, and when a file can't play, the browser's own controls show instead, so the file plays without any script. Pass media({ controls: "native" }) to keep the browser's controls and leave the script out.

comark-zoom never zooms a video and comark-chips never turns an attachment link into a chip, in any plugin order.

The plugin adds every problem to meta.issues, so a host can reject a document before publishing it, such as a file without alt text or autoplay without muted.

Renderers

| Renderer | Import | | --- | --- | | @comark/html | comark-media/html: the styles are inlined | | @comark/vue | comark-media/vue | | @comark/react | comark-media/react | | @comark/svelte | comark-media/svelte |

Each entry exports the parse plugin as default and the renderer's components. The Vue, React, and Svelte components add the styles and start the players when they mount; import comark-media/style.css with your styles so a server-rendered page doesn't shift. The styles read the shared --comark-* tokens and sit in a comark CSS layer, so any plain rule of your own wins.