XML technologies / ePUB / ePub für (In)Designer / Video in ePub / Further processing
(Excerpt from “ePub für (In)Designer — Mit InDesign Schritt für Schritt zum E-Book” by Sascha Heck & Yves Apel)
Open the ePub file in Sigil. Right-click the Images folder and choose Add existing items to add the preview image to the ePub file. Sigil has already automatically inserted the following entry into the content.opf file. If you add the files manually or without Sigil, this entry must still be added to the list in manifest.
<item id="Vorschau.jpg" href="images/Vorschau.jpg" media-type="image/jpeg"/>In the editor, switch to the XHTML file containing the video. You should find code similar to the following line:
<p class="Video"><video class="image" id="Dokumentation.mp4" controls="controls" width="480" height="270"><source src="images/Dokumentation.mp4" type="video/mp4"/></video></p>Specify the preview image using the attribute poster.
<p class="Video"><video class="image" id="Dokumentation.mp4" controls="controls" width="480" height="270" poster="images/Vorschau.jpg"><source src="images/Dokumentation.mp4" type="video/mp4"/></video></p>Some devices and programs display neither the video nor its preview image. To display the preview, insert an additional line of code before </video>. You can use your preview image or create another version indicating that video playback is unavailable. Here we simply use the original preview and add the code
<img src="images/Vorschau.jpg" alt="Video nicht abspielbar"/>. Even this alternative is not displayed on every device or in every program.
The complete code is then:
<p class="Video"><video class="image" id="Dokumentation.mp4" controls="controls" width="480" height="270" poster="images/Vorschau.jpg"><source src="images/Dokumentation.mp4" type="video/mp4"/><img src="images/Vorschau.jpg" alt="Video nicht abspielbar"/></video></p>Figure: Video display in iBooks.
Copyright © dpunkt.verlag GmbH 2012
You may print the online version for your private use.
Otherwise, this chapter from “ePub für (In)Designer” is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Wieblinger Weg 17, 69123 Heidelberg, fon 06221-14830, fax 06221-148399, hallo(at)dpunkt.de
back to top