Ambient Sound in Fixed-layout eBook
Just for Apple iBooks
When we place audio on the page of a fixed-layout eBook, we cannot expect it to contiunue to play when the page is turned. Simply, each page is a new XHTML document, so audio (or any media) will stop on leaving that page.
If we want to get audio to continue to play as we turn the pages, we need to modify the markup inside the ePub package after we have exported from InDesign.
If you cannot see the screencast here then - Download the screencast
Size of file is: 38 MB
ibooks on Apple devices supports this ambient sound feature and we need to add a reference to the iBooks extensions in the HTML tag at the top of the pages that need this audio. We also need to modify the audio tag inside the HTML markup.
We can use InDesign to add the audio file (we can do this on the master pages), but there are some very specific issues to be aware of:
Each HTML page will have the HTML tag thus:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
we need this instead:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
InDesign will create HTML for audio like this:
<audio id="_idAudio000" controls="controls">
<source src="audio/dreamambient.mp3" type="audio/mpeg" />
This is perfectly valid but we need this:
<audio epub:type="ibooks:soundtrack" src="audio/dreamambient.mp3"/>
I do hope the screencast explains this.
Note: iBooks on the MAC has a few anomolies; the soundtrack switch does not always display and the audio icon in the menu bar shows even if there id no audio on that page.