Skip to content

React IIIF Media Player

Adam J. Arling edited this page Jul 6, 2018 · 4 revisions

The Media player for avalon-bundle is an external NPM/Yarn packaged player, react-iiif-media-player imported into avalon-bundle as a front-end dependency handled by webpacker. The package exports a React component, which we can place within React code in our application and use like any other component.

https://github.com/avalonmediasystem/react-iiif-media-player

Add the package from NPM/Yarn registery

yarn add react-iiif-media-player

Usage

Within avalon-bundle, import the packaged component in a React script: app/javascript/react/containers/IIIFMediaPlayerContainer.js

and use as follows:

import React from 'react';

// The imported player
import IIIFMediaPlayer from 'react-iiif-media-player';

const IIIFMediaPlayerContainer = () => <IIIFMediaPlayer />;

export default IIIFMediaPlayerContainer;

Add the package locally

When making updates to the

Clone this wiki locally