EPUBCheck MED_014: fragment in overlay audio URL
Updated:
EPUBCheck MED_014 is an error message: “Media overlay audio file URLs must not have a fragment, but found '#…'.” A media overlay audio URL has a fragment (#part), which is not allowed. The part of the audio file to play is given by clipBegin and clipEnd, not by a fragment in the URL.
The official message
Media overlay audio file URLs must not have a fragment, but found '#%1$s'.
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
EPUBCheck prints this ID with an underscore instead of a hyphen; this page uses the ID exactly as EPUBCheck reports it.
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- Media fragments such as
narration.mp3#t=10,20copied from web audio. - A script that wrote the clip times into the URL instead of the attributes.
How to fix it
- Open the SMIL file and remove the #fragment from the src of each audio element.
- Move the times into clipBegin and clipEnd, for example
<audio src="narration.mp3" clipBegin="10s" clipEnd="20s"/>. - Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
Fragments are expected in text src (pointing to an element id); those are checked by MED_017.
Terms used here
Other MED messages
MED_013Media Overlay Document referenced from the "media-overlay" attribute does not contain a reference to this Content Document.MED_015Media overlay text references must be in reading order. Text target "…" is before the previous link target in … order.MED_012The "media-overlay" attribute does not match the ID of the Media Overlay that refers to this document.MED_016Media Overlays total duration should be the sum of the durations of all Media Overlays documents.MED_011EPUB Content Document referenced from multiple Media Overlay Documents.MED_017URL fragment should indicate an element ID, but found '#…'.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.