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
mickael-menu
released this
23 Dec 10:34
·
47 commits
to develop
since this release
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 byFileAsset
, which implementsPublicationAsset
.
Changed
- Upgraded to Kotlin 1.4.10.
Format
got merged intoMediaType
, 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 withrunBlocking
.
- All the
MediaType
has now optionalname
andfileExtension
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 aMediaType
yourself from its string representation.
- You can use
ContentLayout
is deprecated, usepublication.metadata.effectiveReadingProgression
to determine the reading progression of a publication instead.