-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: check Media Overlays total duration consistency
EPUB 3.3 now recommends that the total MO duration equals the sum of individual MO durations. This commit: - implements this check by inspecting metadata in the OPF checker, using the `SmilClock` class to sum the durations. - tweak existing tests to make their declared total duration matching the individual durations Fix #1217
- Loading branch information
Showing
9 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...t/resources/epub3/files/package-document/mediaoverlays-duration-total-not-sum-warning.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uid" | ||
xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<metadata> | ||
<dc:title>Title</dc:title> | ||
<dc:language>en</dc:language> | ||
<dc:identifier id="uid">NOID</dc:identifier> | ||
<meta property="dcterms:modified">2019-01-01T12:00:00Z</meta> | ||
<!-- Media Overlays Duration Properties --> | ||
<meta property="media:duration">10min</meta> | ||
<meta refines="#mo001" property="media:duration">5min</meta> | ||
<meta refines="#mo002" property="media:duration">0:05:00.200</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="t001" href="contents.xhtml" properties="nav" media-type="application/xhtml+xml"/> | ||
<item id="mo001" href="mediaoverlay_001.smil" media-type="application/smil+xml"/> | ||
<item id="mo002" href="mediaoverlay_002.smil" media-type="application/smil+xml"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="t001"/> | ||
</spine> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters