Images
Images that serve a figural purpose in the content should be included according to XHTML specifications, using the <figure>
element.
There are three placement options for figures: left, right, and full-width centered. Use the provided classes float-left
, float-right
, and full-width
on the <figure>
element.
<figure class="full-width"> |
Since an alt
value would be redundant when a figcaption
is present, you may leave it blank. (Refer to Multimedia Fallback for alt
guidelines.)
Videos
Embedded Videos
Add videos by using the <video>
element. Each video must have a corresponding SVG as the poster
and two transcoded source files located in OEBPS/videos/ of the ePub: an MP4 and a WEBM file as a fallback. How to transcode videos. Below is an example of how the video should appear in the HTML file.
<video poster="../images/everyday-theology-003.svg" controls="controls" preload="none"> |
This SVG template can be used and modified to include the title of the video.
The content.opf should also include a manifest entry for each video file.
<!-- Videos --> |
Each XHTML file that includes a video svg poster may have the svg
property included in the manifest entry for that file.
<item id="AmerHist202_body01_chapter01" href="text/AmerHist202_body01_chapter01.xhtml" media-type="application/xhtml+xml" properties="svg" /> |
Linked Videos
Linked Videos can be used in places where an embedded video is impractical, such as within footnotes or glossary definitions.
The link can be either text, or an image (icon):
<!-- Worded link --> |
This is our standard video icon: Right-click and “Save Image As…” to download and use it in your book.
For Linked videos, the video markup must be placed in individual XHTML files (one per video) in the OEBPS/videos/ folder.
For consistency, the XHTML file name should be the same as the MP4 and WEBM file names (which, in turn, should be the same as the SVG file name).
The differences in the markup from Embedded Videos are:
- the addition of an
id
attribute to thevideo
element (to which the link’shref
should point.) - changes in the source path to the video files, since they’re in the same folder as the xhtml file in this case
Here is an example video file:
|
Manifest entries for these XHTML files in content.opf may include the svg
property.
Audio Files
Add audio files by using the audio
element. Each audio file should be located in OEBPS/audio/. Below is an example of how the audio file should appear in the HTML file.
<div class="center"> |
The content.opf should also include a manifest entry for each audio file.
<!-- Audio --> |