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

@samvera/ramp

v5.1.0

Published

Ramp (React Avalon Media Player), React component library for rendering a media player for a IIIF 3.0 spec Manifest

Readme

@samvera/ramp

Netlify Status CircleCI

A ReactJS component library of interactive components created to display audio/video resources in IIIF Presentation 3.0 manifests. These components are designed and built with reusability, customizability, and accessibility in mind.

This is the renamed NPM component library previously known as @samvera/iiif-react-media-player

Documentation

For full documentation of the component library, visit GitHub Wiki

Demo site showcasing all the components at https://ramp.avalonmediasystem.org/

Installation Guide:

With React (NPM package)

For React applications using a build tool (Webpack, Vite, etc.).

Prerequisites

Please ensure you have the following installed:

  • Node.js (>= 20.x)
  • react and react-dom (version compatibility with each Ramp version listed below)
  • NPM or Yarn

React Version Compatibility

  • @samvera/ramp v5.0.0 and later require React 19
  • @samvera/ramp v3.3.0 to v4.0.2 support React 18. Note: @samvera/ramp v3.3.0 works with both React 17 and React 18. If upgrading to React 18, update both react and react-dom to the same version.
  • For older versions of @samvera/ramp, use React 17.

For ReactJS upgrade instructions, see the official upgrade guides for React 18 and for React 19 as needed.

Steps

  1. Add @samvera/ramp components library from NPM into your application:
yarn add @samvera/ramp
npm install @samvera/ramp

From @samvera/ramp v5.x, VideoJS is included as a dependency and does not need to be installed separately.

For @samvera/ramp versions < 5.x, install the recommended VideoJS version for your Ramp version:

yarn add video.js@<version>
npm install video.js@<version>
  1. Import the library into your application:
import { IIIFPlayer, MediaPlayer, StructuredNavigation, Transcript } from "@samvera/ramp";

// For @samvera/ramp versions < v5.0.0 import VideoJS styles from installed library
// import "video.js/dist/video-js.css";

// Import starter styles (includes VideoJS CSS for @samvera/ramp >= 5.0.0)
import "@samvera/ramp/dist/ramp.css";
  1. Example use of the components from the component library:
const App = () => {
  // Get your manifest from somewhere
  const manifestUrl = "https://some-manifest-url-here.json";

  // Transcript props
  const props = {
    playerID: 'player-id',
    transcripts: [
      {
        canvasId: 0,
        items: [ { title: "Title", url: "https://some-transcript-url-here.json" } ]
      }
    ]
  }

  return (
    <IIIFPlayer manifestUrl={manifestUrl}>
      <MediaPlayer enableFileDownload={false} />
      <StructuredNavigation />
      <Transcript {...props} />
    </IIIFPlayer>
  );
}

export default App;

Without React (Standalone bundle)

For plain HTML/JS applications (Rails, PHP, etc.) with no React or build tools. The standalone bundle uses Preact internally to keep the file size small, but exposes the full React API so the app can render components using React.createElement.

Steps

  1. In your HTML page, load the bundle and styles directly from unpkg (no download or build step required):
<link rel="stylesheet" href="https://unpkg.com/@samvera/ramp/dist/ramp.css" />
<script src="https://unpkg.com/@samvera/ramp/dist/ramp.standalone.umd.js"></script>

To pin to a specific version, include it in the URL:

<link rel="stylesheet" href="https://unpkg.com/@samvera/[email protected]/dist/ramp.css" />
<script src="https://unpkg.com/@samvera/[email protected]/dist/ramp.standalone.umd.js"></script>

Alternatively, download both files from the latest release and serve them locally.

<link rel="stylesheet" href="ramp.css" />
<script src="ramp.standalone.umd.js"></script>
  1. In the HTML page, render the player:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <link rel="stylesheet" href="https://unpkg.com/@samvera/ramp/dist/ramp.css" />
</head>

<body>
  <script src="https://unpkg.com/@samvera/ramp/dist/ramp.standalone.umd.js"></script>
  <div id="root"></div>
  <script>
    // Import components and React
    const { IIIFPlayer, MediaPlayer, StructuredNavigation, React, ReactDOM } = RampIIIF;
    // Parse Manifest URL
    const manifestUrl = new URLSearchParams(window.location.search).get('iiif-content');

    if (!manifestUrl) {
      alert('No manifest URL provided. Add ?iiif-content=<url> to the page URL.');
    } else {
      let parsed;
      try {
        parsed = new URL(manifestUrl);
      } catch {
        alert('Invalid URL in iiif-content parameter.');
        parsed = null;
      }

      if (parsed) {
        const root = document.getElementById('root');
        const playerTree = React.createElement(
          IIIFPlayer,
          { manifestUrl },
          React.createElement(
            'div', { className: 'iiif-player-demo' },
            React.createElement(MediaPlayer),
            React.createElement(StructuredNavigation)
          )
        );

        ReactDOM.createRoot(root).render(playerTree);
      }
    }
  </script>
</body>
</html>

Questions

If you have any questions, reach out on the Samvera Community Slack:

  • #ramp — Ramp-specific questions and discussion
  • #avalon — broader Avalon media system discussion

Or, submit a new issue in the GitHub issues to report any issues or new feature requests.

Contributing

We welcome contributions! See CONTRIBUTING.md for setup instructions, development workflow, testing, and branch conventions.

This repository follows the Samvera Community Code of Conduct and language recommendations.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Contributors

See also the list of contributors to see others who participated in this project.

License

The library is available as open source under the terms of the Apache 2.0 License.

Acknowledgments