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

2.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@mickael-menu mickael-menu released this 23 Dec 10:34
· 47 commits to develop since this release
c411e00

Take a look at the migration guide

Added

  • PublicationAsset is a new interface which can be used to open a publication from various medium, such as a file, a remote URL or a custom source.
    • File was replaced by FileAsset, which implements PublicationAsset.

Changed

  • Upgraded to Kotlin 1.4.10.
  • Format got merged into MediaType, to simplify the media type APIs.
    • You can use MediaType.of() to sniff the type of a file or bytes.
      • All the MediaType.of() functions are now suspending to prevent deadlocks with runBlocking.
    • MediaType has now optional name and fileExtension properties.
    • Some publication formats can be represented by several media type aliases. Using mediaType.canonicalMediaType() will give you the canonical media type to use, for example when persisting the file type in a database. All Readium APIs are already returning canonical media types, so it only matters if you create a MediaType yourself from its string representation.
  • ContentLayout is deprecated, use publication.metadata.effectiveReadingProgression to determine the reading progression of a publication instead.