Hello all,
(cross-posting to epub-testsuite)
The 3.0.1 revision of EPUB3 supports the new "media:playback-active-class" OPF package metadata (in addition to "media:active-class").
See:
https://epub-revision.googlecode.com/svn/trunk/build/301/spec/epub30-mediaoverlays.html#sec-docs-assoc-style
(
http://code.google.com/p/epub-revision/issues/detail?id=305 )
I implemented native support in the Readium-SDK, and tested playback behaviour in LauncherOSX. It would be good if this was in the testsuite as well.
This effectively produces the same results as iBooks' proprietary "-ibooks-media-overlay-enabled" CSS class, except that the standardised EPUB3 feature allows authors to pick any class name they wish (instead of having to stick to a predefined one). The class name gets injected into the HTML document element at playback time, and removed when paused/stopped.
To support both Readium and iBooks (until iBooks makes use of the standardised EPUB3 feature), authors can use the following CSS selectors in their stylesheet:
HTML:
<span id="state">playback status</span>
CSS:
html.-ibooks-media-overlay-enabled #state,
html.-epub-media-overlay-playing #state
{
background-color: green;
}
OPF:
<meta property="media:playback-active-class">-epub-media-overlay-playing</meta>
...and just as a reminder, this is how to highlight the currently-spoken phrase (iBooks implements the EPUB3 standard):
CSS:
.-epub-media-overlay-active
{
background-color: yellow;
color: black !important;
}
OPF:
<meta property="media:active-class">-epub-media-overlay-active</meta>
Regards, Daniel