1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

#748 Feature: Media Overlays basic info access

exports metadata media:active-class through metadata.media_active_class
exports media-overlay item attribute through overlay key
This commit is contained in:
Marco Bergantin 2018-05-08 17:33:48 +02:00
parent 8d3740aa5d
commit 72ceefc1b6

View file

@ -99,6 +99,7 @@ class Packaging {
metadata.orientation = this.getPropertyText(xml, "rendition:orientation");
metadata.flow = this.getPropertyText(xml, "rendition:flow");
metadata.viewport = this.getPropertyText(xml, "rendition:viewport");
metadata.media_active_class = this.getPropertyText(xml, "media:active-class");
// metadata.page_prog_dir = packageXml.querySelector("spine").getAttribute("page-progression-direction");
return metadata;
@ -123,12 +124,14 @@ class Packaging {
var id = item.getAttribute("id"),
href = item.getAttribute("href") || "",
type = item.getAttribute("media-type") || "",
overlay = item.getAttribute("media-overlay") || "",
properties = item.getAttribute("properties") || "";
manifest[id] = {
"href" : href,
// "url" : href,
"type" : type,
"overlay" : overlay,
"properties" : properties.length ? properties.split(" ") : []
};