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

amalia.js-player

v1.3.4

Published

Metadata-enriched HTML5 video player (maintained fork of INA's amalia.js)

Readme

amalia.js-player

Metadata-enriched HTML5 video player — synchronize timelines, captions, overlays, storyboards and custom data with video.

This is a maintained fork of INA's amalia.js. The original project by the Institut National de l'Audiovisuel (INA) is no longer actively updated; this fork modernizes the build and dependencies so the library installs and runs on current Node.js and browsers, while preserving the original API. All credit for the original work goes to INA. Distributed under the MIT License.

Installation

npm install amalia.js-player

The compiled library ships in the build/ directory of the package:

  • build/js/amalia.js-player.min.js — core player
  • build/js/amalia.js-player-plugin-*.min.js — optional plugins (timeline, captions, overlay, text-sync, storyboard, editor, watermark, YouTube, d3)
  • build/css/amalia.js-player.min.css — player styles
  • build/fonts/ — icon webfont

Runtime dependencies

amalia.js-player is a jQuery plugin and expects jQuery (3.7.x), jQuery UI (1.13.x) and Raphaël (2.3.x) to be loaded first.

Usage

Load the dependencies and the player, then attach it to a container element:

<!-- runtime dependencies -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/jquery-ui-dist/jquery-ui.min.js"></script>
<script src="node_modules/raphael/raphael.min.js"></script>

<!-- player core + styles -->
<link  href="node_modules/amalia.js-player/build/css/amalia.js-player.min.css" rel="stylesheet">
<script src="node_modules/amalia.js-player/build/js/amalia.js-player.min.js"></script>

<!-- optional: a plugin -->
<script src="node_modules/amalia.js-player/build/js/amalia.js-player-plugin-timeline.min.js"></script>

<div id="player" style="height: 350px;"></div>

<script>
  $(function () {
    $("#player").mediaPlayer({
      autoplay: false,
      src: "media/example.mp4",
      controlBar: { sticky: true },
      plugins: {
        dataServices: ["data/example-timeline.json"],
        list: [
          {
            className: "fr.ina.amalia.player.plugins.TimelinePlugin",
            container: "#player",
            parameters: { metadataId: "example", title: "My timeline" }
          }
        ]
      }
    });
  });
</script>

Interactive playground

Live demo: https://alex-andreiev.github.io/amalia.js/ (GitHub Pages, served from docs/).

Open playground.html in a browser (after npm run build) for a live configurator: it embeds the player with a free public sample video and exposes the player parameters as form controls that apply changes in real time, with the generated mediaPlayer() config shown alongside. It also demonstrates the extra control-bar widgets this fork adds (below): editable subtitles, a download button, and a playlist with previous/next and a selectable menu.

The hosted demo lives in docs/ (page + a copy of the build). Regenerate it after changes with npm run pages.

More complete, runnable examples (timeline, captions, overlay, text-sync, editor, watermark, webfont) are in the samples/ directory.

Control-bar widgets

This fork adds reusable control-bar widgets. They're registered automatically when the library loads; enable them by listing them in controlBar.widgets. Setting widgets replaces the defaults, so include the standard ones (TimeLabel, PlayButton, PauseButton, VolumeControlBar, FullscreenButton) alongside the extras.

| Widget | Class | What it does | |---|---|---| | Subtitles toggle | CaptionsButton | "CC" button that shows/hides the captions overlay. Param defaultState: false starts hidden. | | Download | DownloadButton | Downloads the current source. Fetches it as a blob (saves the file) for same-origin / CORS-enabled URLs; falls back to opening the URL otherwise. | | Playlist prev/next | PlaylistButton | Skip buttons. Param direction: 'prev' \| 'next'. On click fires ajs:playlist:prev / ajs:playlist:next on the player container. | | Playlist menu | PlaylistMenuButton | List icon opening a popup of all videos. Param items: [labels]. Selecting one fires ajs:playlist:select (with its index); listens for ajs:playlist:changed to highlight the current entry. |

The playlist widgets are UI-only — the host page owns the list and switches the source. The pattern (used in playground.html): keep an array of URLs + a current index, handle the ajs:playlist:* events by calling player.setSrc(url, true), auto-advance on the player's ENDED event, and re-broadcast ajs:playlist:changed so the menu stays in sync. Full class names are under fr.ina.amalia.player.plugins.controlBar.widgets.*.

Build from source

$ npm install
$ npm run build   # or: npx grunt

The compiled library is written to the build/ directory. The default Grunt task runs JSHint, then bundles and minifies the JavaScript (UglifyJS) and compiles the SCSS (Dart Sass).

What changed in this fork

This fork brings the original 2015–2023 codebase up to date so it builds and installs on modern toolchains:

  • Node.js 18+ / npm 10 — the build tooling was upgraded from the Node 0.11 era (Grunt 0.41.6, UglifyJS, JSHint, copy/clean/watch plugins all to current majors).
  • Dart Sass replaces the unmaintained, native node-sass/libsass (which no longer builds on modern Node). A few latent SCSS bugs that old libsass silently tolerated were fixed.
  • Runtime libraries upgraded to the latest versions compatible with the player: jQuery 3.7.x, jQuery UI 1.13.x, Raphaël 2.3.x.
  • Unused/abandoned build dependencies removed to cut install size and known vulnerabilities.
  • New control-bar widgets — subtitles (CC) toggle, download, and playlist (prev/next + selectable menu). See Control-bar widgets.
  • MIT licensed, consistent with the upstream relicensing.

See releases.md for the version history.

License

MIT © Institut National de l'Audiovisuel (INA) and contributors.