From 72ceefc1b64124e8bca9cad7c8fb8f8547066fe8 Mon Sep 17 00:00:00 2001 From: Marco Bergantin Date: Tue, 8 May 2018 17:33:48 +0200 Subject: [PATCH] #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 --- src/packaging.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/packaging.js b/src/packaging.js index c9e3bc1..ff505da 100644 --- a/src/packaging.js +++ b/src/packaging.js @@ -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(" ") : [] };