Closed josteinaj closed 5 years ago
DAISY 2.02 has some special requirements for the SMILs so we may have to generate the SMILs after the HTML conversion. In either case the code should be written in such a way that it is easily reusable.
The requirements are:
h1
- h6
) and page numbers (span
) in the HTML should have their own par
in the SMIL. This sets a constraint on the granularity of the SMIL, at least for these specific elements.Generating the SMILs from scratch is relatively straightforward. But "augmenting" existing SMILs is more challenging, because of possible granularity mismatches.
Headings needs to have their own par
. So if an existing SMIL references segments within a heading, i.e. when it is too fine-grained, a solution is to merge all the segments in the heading. If the segments do not add up to the complete heading, or if the audio
elements can not be combined because they reference different audio files or because the clips don't follow each other, we have to error out.
If an existing SMIL is too coarse-grained for the headings, we can also error out, because that seems unlikely to happen.
For page numbers however it is not so unlikely that the SMIL is too coarse-grained, because page numbers may appear inside paragraph or even inside sentences (or words). A solution could maybe be to skip the page numbers from the NCC in this case.
Media Overlay should be generated for all content in the EPUB before converting to DAISY 2.02. That's a useful step for other scripts as well.