4

I was wondering if there is any feature present in EPUB3 or other e-reading formats, either via scripting or some other route, that enables the reader/user to upload audio/video/images (or link to external sources of these) on their own to an e-book (depending upon e-reader support) thus creating a unique e-book of their own ? If not, is this capability something we'll see in future versions ebooks ? From my current understanding, it looks like that it is possible to add multimedia using media overlays in epub3, but I am not sure if this is something that a reader can do as well. Using javascript it seems like it could potentially be done, that is allowing the reader to add multimedia that then becomes part of the ebook, would really like to hear people's thoughts on it. Thanks.

4

The epub 3.0 spec forbids scripts from changing the DOM of the document, so this will not be possible. Here's the relevant bit:

It must not allow a container-constrained script to modify the DOM of the parent Content Document or other contents in the EPUB Publication, and must not allow it to manipulate the size of its containing rectangle. (Note: Even if a script is not container-constrained, the Reading System may impose restrictions on modifications (see also the dom-manipulation feature).)

This is required for security purposes. It sounds like in order to do what you're talking about, you'll need an app rather than an ebook.

  • Thanks. May I ask what sort of security purposes ? Also, do you mean an ebook reading app ? I'll look into it but I am also curious about learning whether this is something that may be included as a feature in future versions of ebooks. Or whether there are any active discussions in the ebook community about having such a feature, which I think would enhance reader experience in all sorts of fascinating ways. – QPTR Jun 21 '14 at 22:28
  • 1
    My understanding is that having scripts that can modify the file they exist in can permit scripts to do things they shouldn't be able to do, but I'm by no means a security expert. The IDPF says " Authors should also note that scripting in an EPUB Publication can create security considerations that are different from scripting within a Web browser. For example, typical same-origin policies are not applicable to content that has been downloaded to a User's local system." By apps, I mean building an app for your content rather than making it an ebook. – Tom Jun 22 '14 at 20:14
  • One thing one needs to prevent is tricking users into changing the display of a document so that it looks like a browser with GMail open, so that they will readily enter the email password and send it to a hostile server. It's likely really about a different problem, but this should give you an idea of the kind of non-obvious attacks that one must guard against. – user8220 Sep 15 '16 at 6:45
4

There's no support for that currently. EPUB is intended to be a one-way delivery system, that is why it's contents are packaged in a predictable format with strict specifications. In order to alter the contents of an Epub you must unzip the file into its constituent parts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.