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 🙏

© 2025 – Pkg Stats / Ryan Hefner

elm-media

v1.0.4

Published

an elm native package exposing the javascript media DOM functions and Media Fragments

Downloads

28

Readme

Elm-Media

An experimental Elm wrapper for the HTML5 Media API.

Getting Started

This project includes native code, so unless it gets white-listed by the powers that be, it will have to be installed manually.

Installing Manually

Instructions for installing an unpublished module can be found here

Better Documentation

Since this package contains native code and therefore can't be pubished to Elm Packages, you can't read the documentation I wrote easily.

You can however preview it by uploading documentation.json to here

Goals & Feedback

My goal is for this library to be included, eventually, as an official way to write media players in elm. This is a crucially important part of the web api, in use on almost all of the biggest sites on the web, including youtube, facebook, twitter, linked in, as well as many of the smallest. Any site that uses anything other than the default browser players (and you really shouldn't be using the defaults, unless you're Apple and you want to make your media Safari only) uses this api, mostly by using third party players. This is a huge portion of web pages and web apps.

For people making a single-purpose media app, such as a podcast player, ports is probably a fine way to do this, although this library certainly makes it easier and safer (once it's gotten some code review and feedback).

However, the real benefit comes from the ability to create media players as a reusable view, that a user can configure and reuse. The only way to do this is with a native wrapping of the API, as packages with ports cannot be included. My goal was to create this package to help enable elm developers to develop reusable view players, so that the community as a whole can have awesome, rich media support.

This is the first public release, and I need some feedback. It's still missing a lot of features, but I'd appreciate any feedback, particularly bugs and API design.

Thank Yous

This package wouldn't exist without the help, brain-pickings and encouragement of Richard Feldman. I think everyone in the community owes a debt of gratitude to Richard, whether for his training, elm-css, elm-test, or anything else. This library is no different.

I also want to thank the members of the Elm NYC meetup for their encouragement and design suggestions. Ian Mackenzie, in particular, already pointed out something to me in one of my examples that caused me to refactor quite a bit. As always, he was smarter than I and his point was even better than I initially saw.