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

Latest commit

 

History

History
130 lines (84 loc) · 8.78 KB

CHANGELOG.md

File metadata and controls

130 lines (84 loc) · 8.78 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

  • The EPUB navigator is now able to navigate to a Locator using its text context. This is useful for search results or highlights missing precise locations.
  • Observe or clear the current user selection of the navigators implementing SelectableNavigator.
  • (alpha) Support for the Decorator API to draw user interface elements over a publication's content.
    • This can be used to render highlights over a text selection, for example.
    • For now, only the EPUB navigator implements DecorableNavigator, for reflowable publications. You can implement custom decoration styles with HtmlDecorationTemplate.

Changed

  • Upgraded to Kotlin 1.5.21 and Gradle 7.1.1
  • The order of precedence of Locator locations in the reflowable EPUB navigator is: text, HTML ID, then progression. The navigator will now fallback on less precise locations in case of failure.

Fixed

  • Scrolling to an EPUB ID (e.g. from the table of contents) when the target spans several screens.

Changed

  • R2EpubActivity and R2AudiobookActivity require a new baseUrl Intent extra. You need to set it to the base URL returned by Server.addPublication() from the Streamer.

Fixed

  • #217 Interactive HTML elements are not bypassed anymore when handling touch gestures.
    • Scripts using preventDefault() are now taken into account and do not trigger a tap event anymore.
  • #150 External links are opened in a Chrome Custom Tab instead of the navigator's web view.
  • #52 Memory leak in EPUB web views. This fixes ongoing media playback when closing an EPUB.

Added

  • Support for display cutouts (screen notches).
    • IMPORTANT: You need to remove any setPadding() statement from your app in UserSettings.kt, if you copied it from the test app.
    • If you embed a navigator fragment (e.g. EpubNavigatorFragment) yourself, you need to opt-in by specifying the layoutInDisplayCutoutMode of the host Activity.
    • R2EpubActivity and R2CbzActivity automatically apply LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES to their window's layoutInDisplayCutoutMode.
    • PdfNavigatorFragment is not yet compatible with display cutouts, because of limitations from the underlying PDF viewer.
  • Customize EPUB vertical padding by overriding the r2.navigator.epub.vertical_padding dimension.

Changed

  • Upgraded to Kotlin 1.4.10.
  • All utils.js functions were moved under a readium. namespace. You will need to update your code if you were calling them manually.

Fixed

  • EPUBs declaring multiple languages were laid out from right to left if the first language had an RTL reading progression. Now if no reading progression is set, the effectiveReadingProgression will be LTR.
  • #152 Panning through a zoomed-in fixed layout EPUB (contributed by @johanpoirier).
  • #146 Various reflowable EPUB columns shift issues.
  • Restoring the last EPUB location after configuration changes (e.g. screen rotation).
  • Edge taps to turn pages when the app runs in a multi-windows environment.

Added

  • Support for the new Publication model using the Content Protection for DRM rights and the Fetcher for resource access.
  • (alpha) New Fragment implementations as an alternative to the legacy Activity ones (contributed by @johanpoirier).
    • The fragments are chromeless, to let you customize the reading UX.
    • To create the fragments use the matching factory such as EpubNavigatorFragment.createFactory(), as showcased in R2EpubActivity.
    • At the moment, highlights and TTS are not yet supported in the new EPUB navigator Fragment.
    • This is now the recommended way to integrate Readium in your applications.

Changed

  • currentLocator is now a StateFlow instead of LiveData, to better support chromeless navigators such as an audiobook navigator.
    • If you were observing currentLocator in a UI context, you can continue to do so with currentLocator.asLiveData().
  • Improvements to the PDF navigator:
    • The navigator doesn't require PDF publications to be served from an HTTP server anymore. A side effect is that the navigator is now able to open larger PDF files.
    • PdfNavigatorFragment.Listener::onResourceLoadFailed() can be used to report fatal errors to the user, such as when trying to open a PDF document that is too large for the available memory.
    • A dedicated PdfNavigatorFragment.createFactory() was added, which deprecates the use of NavigatorFragmentFactory.

Fixed

  • Prevent switching to the next resource by mistake when scrolling through an EPUB resource in scroll mode.

Added

  • The position is now reported in the locators for EPUB, CBZ and PDF.
  • (alpha) PDF navigator.
    • Supports both single PDF and LCP protected PDF.
    • As a proof of concept, it is implemented using Fragment instead of Activity. R2PdfActivity showcases how to use the PdfNavigatorFragment with the new NavigatorFragmentFactory.
    • The navigator is based on AndroidPdfViewer, 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

Deprecated

  • Navigator.currentLocation and NavigatorDelegate.locationDidChange() are deprecated in favor of a unified Navigator.currentLocator, which is observable thanks to LiveData.

Fixed