Skip to content
This repository was archived by the owner on Feb 7, 2020. It is now read-only.

Embedding

Edward Silverton edited this page Oct 31, 2013 · 7 revisions

When clicking on the Wellcome Player's embed button in the footer you will see a dialogue similar to those provided by video sharing sites that allows you to copy and paste some code to embed the player in your own site:

` <div class="wellcomePlayer" data-uri="http://wellcomelibrary.org/package/b18035978" data-assetsequenceindex="0" data-assetindex="0" data-zoom="-0.9352,0,2.8705,1.4563" style="width:560px; height:420px; background-color: #000"></div>

<script type="text/javascript" id="embedWellcomePlayer" src="http://wellcomelibrary.org/spas/player/build/wellcomeplayer/js/embed.js"&gt;&lt;/script&gt;&lt;script type="text/javascript">/* wordpress fix */</script> `

This consists of a div with data attributes:

  • data-uri: The path to the data package you wish to display
  • data-assetsequenceindex: For packages with more than one asset sequence e.g. http://wellcomelibrary.org/osplayer/b18031511 this specifies which asset sequence (in this example which volume of the book) to load.
  • data-assetindex: The initial asset index to load (page index in the previous example).
  • data-zoom: An attribute specific to image asset sequences viewed with the Seadragon Extension which specifies an initial zoom level.

Plus a script to load embed.js which handles creating an iframe housing the player page within the containing div.

Clone this wiki locally