Streaming Digital Books

Liza Daly · @liza

Safari Books Online

EPUB defines a means of packaging content “for distribution in a
single-file format.”

  1. Files are portable.
  2. Files can be bound together in containers.
  3. Files can be endlessly reproduced.

(If you’re a publisher,
maybe you don’t really
like files so much.)

An explicit goal of the EPUB format is that the same file that leaves the publisher's "book factory" is the one that ends up in consumers' hands. I don't think this is always a feature.

By peacay

Why does this need to be true?

What if we stop thinking about the ebook as being primarily about the package and more about its manifest?

The ebook package doesn't have to be the book itself. It's a set of instructions on how to build the ebook. It's a recipe.

Ingredients

  1. Images
  2. Spoken tracks
  3. Alternate language version
  4. Simplified summary
  5. HTML5/CSS3 markup and styling
  1. Do you want images?
    How big?
  2. I have some audio.
    Would you like to hear it? What formats can you use?
  3. Do you want it to be synchronized with the text
    or just play it by itself?
  4. This is a new edition. Do you want to review the changes
    or just read the new version?
  5. Do you speak Spanish? Do you speak both English and Spanish? Are you learning Spanish?
  6. This is a difficult topic. Do you want the easy version first?
  7. Is your ereader old or new?

A gentler workflow

  1. Ebook "manuscript"
  2. Content negotiation
  3. Streaming book

1. Take everything we know about the book.
Package it in an EPUB.

2. Content negotation.


Chrome logo “I'd like French most, but I'll also accept English as a fallback.”
Apache logo «Trés bien.»

HTTP as she is spoken

        Accept-Language: de; q=1.0, en; q=0.5
        Accept: text/html; q=1.0, text/*; q=0.8, 
                image/gif; q=0.6, image/jpeg; q=0.6, 
                image/*; q=0.5, */*; q=0.1
      

Negotiate first at the
document level

        Accept: application/xml+epub3,
                application/xml+epub, 
                text/plain,
                application/pdf
      

...then talk about content types

        Accept-Language: fr, en
        Accept: application/xml+mathml,
                application/xml+svg,
                application/xml+html
      

Mapping to rendition selection in EPUB 3 fixed-layout?

Fixed-layout informational document: http://idpf.org/epub/fxl/

   Accept-Rendition:
         layout,      // I can render spreads!
         orientation  // My orientation can change
      

(This doesn't exist. I made it up. It's just an idea.)

3. Streaming book

Just what the reader wants, as fast as possible.

Warning: EPUB abuse.

Supporting legacy content through mockingbird.

ByManjith Kainickara

Mockingbird converts PDFs into an EPUB container (not an EPUB!)

What does mockingbird know about a book?

Injected full text for search.

The PDF enhanced with searchable page text
The PDF converted into an image-based EPUB
<container xmlns="urn:oasis..." version="1.0">
  <rootfiles>
    <rootfile full-path="OEBPS/content.opf" 
              media-type="application/oebps-package+xml"/>

    <rootfile full-path="OEBPS/rich-metadata.pdf" 
              media-type="application/pdf"/>

  </rootfiles>
</container>
      

(This syntax is deprecated.)

The PDF rendered via HTML5 canvas
Zooming the PDF with canvas renders type beautifully

Video too...

What do we get out of a streaming/manuscript model?

Intelligent rights management

Responsive asset management

Flaws in the current model:

Screenshot from the W3C Responsive Images Community Group

TODOs

Credits

Liza Daly · @liza · liza@safaribooksonline.com

Safari Books Online

Use a spacebar or arrow keys to navigate