Readium Logo

Navigator

The navigator is a module that directly interacts with the streamer, either by:

The navigator is responsible for a number of things:

Displaying Resources

To control the way a resource is displayed, most reading applications rely on either:

That said, some publications may be handled differently, for instance a bitmap-only comics could also be displayed using:

Each implementation of the navigator module can support one or more methods, which means that we could potentially have specialized navigator modules for comics or audiobooks too.

Spreads

If a publication contains fixed layout resources, the navigator module is also responsible for spreads (left page, right page, double pages).

This information is contained in the properties object of each link object:

{
  "href": "page1.jpg",
  "type": "image/jpeg",
  "properties": {"page": "left"}
}

There are also a number of other use cases where a navigator might handle multiple resources in the reading order at the same time:

The navigator module can be either:

It can also implement special display modes for anciliary resources, for example:

Content Injection

In certain use cases, injecting JS/CSS might be necessary to support other modules, for instance:

For example, a Web-based app where both the streamer and the navigator modules are on the same host, could rely on an <iframe> to display resources and inject JS/CSS whenever the content of the <iframe> is updated.

Default Profile

While implementations can adopt different strategies, adapting to the strengths of each platform, the following principles should be followed for a default implementation of the navigator module: