This documentation has been generated from the framework source using TypeDoc.
The two main modules in the framework are:
core
This module has all types that are used throughout the framework. These types are often implementations of standards
and include IEpubPublication
, ILocator
and IResourceProvider
etc.
readingsystem
This module contains all types that are more domain specific to the Colibrio Reader Framework. Here you find types
such as IReaderPublication
, IRenderer
etc.
Combined, these modules holds all components and types needed to build a reading system.
In addition to this API reference you can also find getting started guides etc. at:
Here is a list of the concepts that you will come across early in your journey when creating your e-reader.
ReadingSystemEngine
is the entry point to the Colibrio Reading System API. It is used for loading publications,
creating ReaderView
s and SyncMediaPlayer
s.
The ResourceProvider
is an abstraction hiding the details about resource retrieval from the reading system. There are
several implementations of this interface. For example: OcfResourceProvider
, ZipResourceProvider
.
ReaderView
s are used for displaying IReaderDocument
s from an IReaderPublication
. It is also used for navigating
among the loaded documents, as well as synchronizing things such as annotations etc during navigation.
A Renderer is responsible for the presentation of the ReaderPublication
within a ReaderView
. For example,
the StackRenderer
presents the publication as a series of pages stacked on top of each other like a deck of cards.
A publication that has been processed to be used by the Reading System. A ReaderPublication
wraps a source publication
and provides functionality for creating renderable content, full text search and more.
A ReaderDocument
is a IContentDocument
that has been processed by a format adapter to be used by the Reading System.
Locator
instances are used for referencing specific locations (including ranges) in publications.
The Locator type is modeled after and compatible with the "External Web Resource" and "Specific Resource" types defined by the Web Annotations specification.
Represents a location within a ReaderPublication
and methods to extract information related to that location.
A ContentLocation
can be a position in the publication content, or a range across publication content.
The Colibrio Reader Framework uses events to communicate changes to runtime state etc. This is the base interface for
all IEngineEvents
fired by the reading system. You can listen and react on events by adding a listener for the event
type on a ReaderView
or ReadingSystemEngine
instance.
Have a look at the EngineEventTypeMap for a complete list of all EngineEvents.
Colibrio represents IReaderPublication
content in a TypeScript data structure called
the ContentBlockTree
. The ContentBlockTree
contains ContentBlock
s that represents a single node in an IContentDocument
such as a
paragraph, heading, table, list or image.
Describes the contents in the ReaderView as a one-dimensional timeline of positions (character offset or page) within a
publication. This is the class that you use to create a progress slider for your reader etc.
You create a ContentPositionTimeline
from a ReaderPublication
.
Annotation layers allow you to render content on top of the publication content. This can for example be used to
highlight notes, search results etc. ReaderViewAnnotationLayer
s are also used for highlighting TTS.
Used for playing synchronized media such as EPUB Media Overlays or TTS (Text-To-Speech). The SyncMediaPlayer
coordinates the playback of a SyncMediaTimeline
and exposes methods for controlling playback, such as play/pause/skip.
Generated using TypeDoc