Giter VIP home page Giter VIP logo

Comments (4)

danielweck avatar danielweck commented on June 16, 2024

Status report: this is now implemented in r2-streamer-js.

For example:

Regular web pub manifest JSON output:
https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D/manifest.json

Canonical:
https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D/manifest.json?canonical=true
Note that the links section is removed (which includes self, as well as the global media-overlay templated URI). Note that the JSON LD @context property is deleted as well.

Pretty-printed:
https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D/manifest.json/show/all
or alternatively using a query string parameter:
https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D/manifest.json?show=all
Note that all the links are "absolutised" (including the HTTP domain/origin etc.) so that they are user-clickable. In the serialised JSON, links are expressed using their full path relative to the root of the EPUB container (but no HTTP origin), and reading systems are responsible for creating the absolute HTTP reference based on the implicit "base" URL of manifest.json (I tested this with all available online readers (NYPL, HADRIEN, EPUB.JS), all work fine). The same applies to the Media Overlays JSON (i.e. .../media-overlays?resource=FULL_PATH_TO_HTML_RELATIVE_TO_EPUB_CONTAINER_ROOT).
Navigator tests:

NYPL reader:
https://readium2.herokuapp.com/readerNYPL/?url=https%3A%2F%2Freadium2.herokuapp.com%2Fpub%2FL2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D%2Fmanifest.json

EPUB.JS reader:
https://s3.amazonaws.com/epubjs-manifest/examples/manifest.html?href=https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D/manifest.json

HADRIEN reader:
https://hadriengardeur.github.io/webpub-manifest/examples/viewer/?manifest=true&href=https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI=/manifest.json

READIUM1 reader:
http://readium-2.surge.sh/?epub=https%3A%2F%2Freadium2.herokuapp.com%2Fpub%2FL2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D%2Fmanifest.json

from architecture.

barbender avatar barbender commented on June 16, 2024

Are navigators supposed to work with canonical output? If 'links' are removed in the canonical form it is going to be less straightforward to check if the publication has Media Overlay.

from architecture.

danielweck avatar danielweck commented on June 16, 2024

in the current form of "canonical", the manifest JSON really is geared towards unit-testing / comparing generated outputs between streamer implementations.

from architecture.

HadrienGardeur avatar HadrienGardeur commented on June 16, 2024

+1 to what Daniel said

The canonical form is really not meant for the navigators.

from architecture.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.