This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
2.0.0-beta.1
Pre-release
Pre-release
mickael-menu
released this
23 Dec 14:34
·
60 commits
to develop
since this release
Take a look at the migration guide
Added
PublicationAsset
is a new protocol 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
Format
got merged intoMediaType
, to simplify the media type APIs.- You can use
MediaType.of()
to sniff the type of a file or bytes. MediaType
has now optionalname
andfileExtension
properties.- Some publication formats can be represented by several media type aliases. Using
mediaType.canonicalized
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.