Forked from official https://github.com/ProjectMirador/mirador#
We will soon submit a PR to the official Mirador repository to add video support for annotations and other enhancement. We already support React 18/19, MUI7 and are up-to-date to Mirador 4 (4.0.0 version).
We provide also a new plugin to display and edit annotations on videos : https://github.com/TETRAS-IIIF/mirador-annotation-editor-video
We have also old version compatible with M3 and older version of React. Contact us to have more information.
Our fork of Mirador is available as a package on npm.
To use it change your existing Mirador dependency to mirador-video in your package.json file.
Before
"mirador": "^4.0.0"After
"mirador": "npm:mirador-video@^1.1.0"Then run npm install to refresh your package.
Mirador local development requires nodejs to be installed. Use nvm use to set minimal supported version of NPM.
npm install $ npm startThen navigate to http://127.0.0.1:4444/
var miradorInstance = Mirador.viewer({
id: 'mirador' // id selector where Mirador should be instantiated
});
> miradorInstance
{ actions, store }Add a window:
store.dispatch(actions.addWindow());To focus a window run:
store.dispatch(actions.focusWindow('window-1'))store.getState()We use Vitest to run our test suite.
$ npm testYou can see the helpful Vitest UI in your browser by running Vitest with the --ui flag. To pass the flag through to npm run the following:
$ npm test -- --uiYou can run Vitest without the additional linting and size checks in our npm test command. You can also test a single file:
$ npx vitest __tests__/integration/mirador/tests/sequence-switching.test.js --ui$ npm run lintThe following browser extensions are useful for debugging a local development instance of Mirador:
To debug the test suite, run:
$ npm run test:debugthen spin up a nodejs inspector client and set some breakpoints. See here for a guide to debugging with Chrome DevTools.