Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Latest commit

 

History

History
116 lines (73 loc) · 6.36 KB

CHANGELOG.md

File metadata and controls

116 lines (73 loc) · 6.36 KB

Changelog

All notable changes to this project will be documented in this file.

Warning: Features marked as alpha may change or be removed in a future release without notice. Use with caution.

Added

  • EPUB publications implement a SearchService to search through the content.
  • Known DRM schemes (LCP and Adobe ADEPT) are now sniffed by the Streamer, when no registered ContentProtection supports them.
    • This is helpful to present an error message when the user attempts to open a protected publication not supported by the app.

Changed

  • Upgraded to Kotlin 1.5.31 and Gradle 7.1.1
  • The default EPUB positions service now uses the archive entry length when available. This is similar to how Adobe RMSDK generates page numbers.
    • To use the former strategy, create the Streamer with: Streamer(parsers = listOf(EpubParser(reflowablePositionsStrategy = OriginalLength(pageLength = 1024))))

Fixed

  • EPUB style injection when a resource has a <head> tag with attributes.

Added

  • Streamer takes a new optional HttpClient dependency to handle HTTP requests.

Added

  • Server.addPublication() is a new API which replaces addEpub() and is easier to use.
    • If the publication can be served, it will return the base URL which you need to provide to the Navigator Activity or Fragment.
    • You do not need to give the publication filename nor add the server port in the $key-publicationPort SharedPreference value anymore.

Changed

  • The HTTP server now requests that publication resources are not cached by browsers.
    • Caching poses a security risk for protected publications.

Changed

  • Upgraded to Kotlin 1.4.10.
  • Streamer is now expecting a PublicationAsset instead of a File. You can create custom implementations of PublicationAsset to open a publication from different medium, such as a file, a remote URL, in-memory bytes, etc.
    • FileAsset can be used to replace File and provides the same behavior.

Added

  • Streamer API offers a simple interface to parse a publication and replace standalone parsers.
  • A generic ImageParser for bitmap-based archives (CBZ or exploded directories) and single image files.
  • A generic AudioParser for audio-based archives (Zipped Audio Book or exploded directories) and single audio files.

Changed

  • Container and ContentFilters were replaced by a shared implementation of a Fetcher.

Fixed

  • Readium can now open PDF documents of any size without crashing. However, LCP protected PDFs are still limited by the available memory.
  • Various HTTP server fixes and optimizations.

Added

  • Support for Positions List with EPUB, CBZ and PDF. Positions provide a list of discrete locations in a publication and can be used to implement an approximation of page numbers.
    • Get the visible position from the current Locator with locations.position.
    • The total number of positions can be retrieved with publication.positions().size. It is a suspending function because computing positions the first time can be expensive.
  • ReadiumWebPubParser to parse all Readium Web Publication profiles, including Audiobooks, LCP for Audiobooks and LCP for PDF. It parses both manifests and packages.
  • (alpha) PDFParser to parse single PDF documents.
    • The PDF parser is based on PdfiumAndroid, which may increase the size of your apps. Please open an issue if this is a problem for you, as we are considering different solutions to fix this in a future release.

Changed

  • The CSS, JavaScript and fonts injection in the Server was refactored to reduce the risk of collisions and simplify your codebase.
    • This is a breaking change, to upgrade your app you need to:
      • Provide the application's Context when creating a Server.
      • Remove the following injection statements, which are now handled directly by the Streamer:
server.loadCustomResource(assets.open("scripts/crypto-sha256.js"), "crypto-sha256.js", Injectable.Script)   
server.loadCustomResource(assets.open("scripts/highlight.js"), "highlight.js", Injectable.Script)

Fixed