-
Notifications
You must be signed in to change notification settings - Fork 1
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
yarn add react-iiif-media-player
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;
When making updates to the