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

@samvera/ramp

v3.3.0

Published

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

Downloads

97

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 built show-casing all the components at https://ramp.avalonmediasystem.org/

Installation Guide:

Prerequisites

Please ensure you have the following installed:

  • Node.js (>= 16.x)
  • react and react-dom (>= 17.x)
  • NPM or Yarn

Only the latest version, i.e. v3.3.0, of @samvera/ramp includes support for React 18. For prior @samvera/ramp versions, please use React 17.

Important: v3.3.0 can still be used with React 17. However, if you choose to upgrade to React 18; react and react-dom both need to be updated simultaneously to the same version.

To upgrade ReactJS in your application, please follow the instruction on the ReactJS' official upgrade guide.

Steps

  1. Add @samvera/ramp components library from NPM into your application"
// Using yarn
yarn add @samvera/ramp

// Using NPM
npm install @samvera/ramp
  1. Add peer dependency for Video.js library:
// Using yarn
yarn add [email protected]

// Using NPM
npm install [email protected]

Important: @samvera/ramp <= v3.1.2 needs [email protected], because the included version of @silvermine/videojs-quality-selector is incompatible with video.js >= v8.0.0.

  1. Import the library and Video.js into your application:
import { IIIFPlayer, MediaPlayer, StructuredNavigation, Transcript } from "@samvera/ramp";
import 'video.js/dist/video-js.css';

// Import starter styles 
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;

Development

Ramp provides two development environments,

  • using React Styleguidist: a documentation site for all the components and their usage accompanied with code snippets, running on http://localhost:6060.
  • using Webpack: show-case of how these components can be arranged on a web page and styled according to user preference, running on http://localhost:3003.

Both of these can run on your localhost at the same time, and can live-reload based on your code changes.

Styleguidist environment

React Styleguidist, in addition to providing documentation, also offers an isolated development environment. To start the dev environment, run:

yarn dev

To build a static html version of the docs (which Github pages uses), run:

yarn styleguide:build

This will create a set of static documentation HTML files in the project's /docs directory. In this documentation, each component is explained with a code sample and a description of its props and functionality.

Webpack environment

An example usage of all the components in the library is served from the /demo directory. This showcases the real-time usage of the components in an application. To start this example, run:

yarn demo

Testing

Ramp uses Jest and react-testing-library to build an automated unit test suite. To run these tests, with a full coverage report, run:

yarn test

To run tests in watch mode:

yarn test:watch

Deployment

When new code is added into the main branch of the GitHub repo, it is deployed into two locations.

Deploying to Netlify demo site

The demo site is hosted with Netlify, which displays all the components in the library in a similar manner to real-life usage of them.

This demo instance can read a publicly available IIIF Presentation 3.0 Manifest given the URL of the manifest and display content in the manifest.

A new build is triggered and published in Netlify when code changes are merged to main branch in this repository.

Deploying to GitHub Pages

The GitHub pages site, https://samvera-labs.github.io/ramp/ is built using ReactJS Styleguidist docs.

Similar to the demo site, a new build of this site it triggered and published when new code changes are merged to main branch.

Contributing

If you're working on PR for this project, create a feature branch off of main.

We welcome your contributions. 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