Extensions and Modules

The Universal Viewer (UV) architecture is superficially similar to Microsoft's PRISM. It provides a shell which is split into regions where modular units of UI can be placed.

Extensions are customised collections of modules that enable the UV to display a particular form of media.

The uv-mediaelement-extension displays mp3, mp4, and webm files using mediaelement.js.
The uv-seadragon-extension displays IIIF info.json files using OpenSeadragon.
The uv-pdf-extension displays PDF files using pdf.js, falling back to pdfobject.js.
The uv-virtex-extension displays 3D three.js json files.

The UV shell is split into the following regions:

  • header panel
  • left panel
  • center panel
  • right panel
  • footer panel

Here is an example of the uv-seadragon-extension displaying a file. The uv-seadragon-extension uses the uv-seadragoncenterpanel-module in the center panel region to display info.json files in a zoomable OpenSeadragon experience. It uses the uv-pagingheaderpanel-module in the header panel region to provide search and navigation buttons.

Modules may be reused across multiple extensions. The uv-shared-module contains base classes which can be inherited to add extension-specific functionality.

This tutorial will take you through the steps necessary to construct a new extension which will display a single download link in the center panel for any file which the UV does not recognise.

results matching ""

    No results matching ""