Quote:
Originally Posted by Psymon
Just as an experiment, I thought I'd add an audio (MP3) file to my ebook, to see if it would work, following Liz Castro's tutorial on how to do it (I even sprung a whopping $5 on her book about adding audio/video). Apparently audio and video only currently work in iPads and Nooks, but I can certainly attest that they do indeed work no problem in the former (I don't have a Nook, but I'll take her word for it).
The only problem is that adding in the <audio> tag gives my perfectly-valid ebook an error (or series of errors) related to that tag.
|
I think it
might be possible in EPUB 2, but you're not going to like what you have to do. Take a look at this part of the spec:
2.3.1.2: Items That Are Out-Of-Line XML Islands
You can implement it like this:
- Include two copies of the chapter—one copy with the audio tags specified as XHTML5 content, with media type text/html, and one without those tags, with the usual XHTML 1.1 media type.
- In your OPF file, add an entry for both.
- In the item entry for the HTML5 version, use the id attribute value from the XHTML version's item in the fallback attribute.
- Set the required-namespace attribute to "http://www.w3.org/1999/xhtml".
With that change, you'll get warnings from the validator instead of errors. With that said, I have no idea whether real-world readers will use the HTML5 version or skip it and use the fallback.
You might also have better luck if you specify an empty CSS file in the
fallback-style attribute.