Colibrio Reader Framework API - Cloud license
    Preparing search index...

    NOTE: This feature is currently in BETA. Expect breaking changes to the APIs related with WpPublication/Audiobooks until the final 3.0.0 release.

    WpPublication is a base format implementing the Publication Manifest specification: https://www.w3.org/TR/pub-manifest/

    The only concrete supported implementation at the time of writing is W3C Audiobooks: https://www.w3.org/TR/audiobooks/

    If you have an LPF file, use WpPublication.createFromBlob() or WpPublication.createFromRandomAccessDataSource() to create a WpPublication instance.

    You can also create a WpPublication from a Primary Entry Page or Manifest file dereferenced from a URL by using WpPublication.createFromManifestUrl or createFromPrimaryEntryPageUrl.

    To load the publication, first add a WpAudiobookFormatAdapter to the ReadingSystemEngine instance.

    const wpPublication = WpPublication.createFromBlob(lpfFile);
    const engine = new ReadingSystemEngine({licenseApiKey: 'my-api-key'});
    engine.addFormatAdapter(new WpAudiobookFormatAdapter());
    const readerPublication = await engine.loadPublication(wpPublication);

    Hierarchy (View Summary)

    Implemented by

    Methods

    • Destroy this instance, allowing used resources to be garbage collected.

      Returns void

    • Get the URL to the cover image resource declared in this publication, if any.

      To fetch the resource data for this URL, use the IResourceProvider returned by getBackingResourceProvider().

      Returns URL

    • Get a generated hash signature of the publication, intended to uniquely identify this publication. The hash signature is not the same as the publication id as the hash signature always changes when the publication data changes in any way. The uniqueness of the signature depends on how the publication was loaded. Please refer the implementation responsible for loading this instance. For example, for EPUB see OcfResourceProvider.

      Returns string

    • Get the URL to the resource containing the navigation structure for this publication, if any.

      Returns URL

    • Get the profile of this publication.

      Profiles are publication formats (e.g., audiobooks) describing what type of contents to expect in the publication and in the manifest data.

      Returns string[]

    • Get the type of publication this instance represents.

      This allows you to cast an IPublication instance to a more specific subtype. See PublicationType for how values map to specific IPublication types.

      Returns PublicationType

    • If this Publication instance has been destroyed.

      Returns boolean