This repository has been archived by the owner on Jul 29, 2022. It is now read-only.
Releases: readium/r2-streamer-kotlin
Releases · readium/r2-streamer-kotlin
2.1.0
Take a look at the migration guide
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 registeredContentProtection
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))))
- To use the former strategy, create the
Fixed
- EPUB style injection when a resource has a
<head>
tag with attributes.
2.0.0
Take a look at the migration guide
Added
Streamer
takes a new optionalHttpClient
dependency to handle HTTP requests.
2.0.0-beta.2
Take a look at the migration guide
Added
Server.addPublication()
is a new API which replacesaddEpub()
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
orFragment
. - You do not need to give the publication filename nor add the server port in the
$key-publicationPort
SharedPreference
value anymore.
- If the publication can be served, it will return the base URL which you need to provide to the Navigator
Changed
- The HTTP server now requests that publication resources are not cached by browsers.
- Caching poses a security risk for protected publications.
2.0.0-beta.1
Take a look at the migration guide
Changed
- Upgraded to Kotlin 1.4.10.
Streamer
is now expecting aPublicationAsset
instead of aFile
. You can create custom implementations ofPublicationAsset
to open a publication from different medium, such as a file, a remote URL, in-memory bytes, etc.FileAsset
can be used to replaceFile
and provides the same behavior.
2.0.0-alpha.2
Take a look at the migration guide
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
andContentFilters
were replaced by a shared implementation of aFetcher
.
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.
2.0.0-alpha.1
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
withlocations.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.
- Get the visible position from the current
ReadiumWebPubParser
to parse all Readium Web Publication profiles, including Audiobooks, LCP for Audiobooks and LCP for PDF. It parses both manifests and packages.- (Experimental)
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 aServer
. - Remove the following injection statements, which are now handled directly by the Streamer:
- Provide the application's
- This is a breaking change, to upgrade your app you need to:
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
- The EPUB parser underwent a significant refactoring to fix a number of issues (contributed by @qnga)
- Metadata parsing was updated to follow our up-to-date specifications.
- XML namespace prefixes are now properly supported, when an author chooses unusual ones.
- Similarly, default vocabularies and prefixes for EPUB 3 Property Data Types are now properly handled.
Server
was broken when provided with publication filenames containing invalid characters.- EPUB publishers' default styles are not overriden by Readium CSS anymore.
- The
AndroidManifest.xml
is not forcing anymoreallowBackup
andsupportsRtl
, to let reading apps manage these features themselves (contributed by @twaddington).
1.1.5: Merge pull request #88 from readium/develop
1.1.4: Merge pull request #87 from readium/fixes/debug
wrap timber logs to only show in debug builds and source formatting
1.1.3: Merge pull request #82 from readium/fixes/relative-path-encoding
changed encoding to replacement
1.1.2: Merge pull request #79 from readium/feature/DiViNa
Feature: DiViNa