Skip to content

2.2.0

Choose a tag to compare

@mickael-menu mickael-menu released this 22 Apr 15:09
· 266 commits to main since this release

Resources

Changelog

Added

Shared

  • A new Publication.conformsTo() API to identify the profile of a publication.
  • Support for the conformsTo RWPM metadata, to identify the profile of a Publication.

Navigator

  • The PDF navigator now honors the publication reading progression with support for right-to-left and horizontal scrolling.
    • The default (auto) reading progression for PDF is top-to-bottom, which is vertical scrolling.
  • A new convenience utility EdgeTapNavigation to trigger page turns while tapping the screen edges.
    • It takes into account the navigator reading progression to move into the right direction.
    • Call it from the VisualNavigator.Listener.onTap() callback as demonstrated below:
    override fun onTap(point: PointF): Boolean {
        val navigated = edgeTapNavigation.onTap(point, requireView())
        if (!navigated) {
            // Fallback action, for example toggling the app bar.
        }
        return true
    }
  • The new Navigator.Listener.onJumpToLocator() API is called every time the navigator jumps to an explicit location, which might break the linear reading progression.
    • For example, it is called when clicking on internal links or programmatically calling Navigator.go(), but not when turning pages.
    • You can use this callback to implement a navigation history by differentiating between continuous and discontinuous moves.
  • You can now disable the display cutouts padding in the EPUB navigator (contributed by @szymn).
    • This is useful when the navigator is not laid out full screen.
  • (experimental) A new audiobook navigator based on Jetpack media2.
    • See the pull request #80 for the differences with the previous audiobook navigator.
    • This navigator is located in its own module readium-navigator-media2. You will need to add it to your dependencies to use it.
    • The Test App demonstrates how to use the new audiobook navigator, see MediaService and AudioReaderFragment.
  • (experimental) The EPUB navigator now supports overridable drag gestures. See VisualNavigator.Listener.

Deprecated

Shared

  • Publication.type is now deprecated in favor of the new Publication.conformsTo() API which is more accurate.
    • For example, replace publication.type == Publication.TYPE.EPUB with publication.conformsTo(Publication.Profile.EPUB) before opening a publication with the EpubNavigatorFragment.
  • Link.toLocator() is deprecated as it may create an incorrect Locator if the link type is missing.
    • Use publication.locatorFromLink() instead.

Fixed

  • Fix building with Kotlin 1.6.

Streamer

  • Fixed the rendering of PDF covers in some edge cases.
  • Fixed reading ranges of obfuscated EPUB resources.

Navigator

  • Fixed turning pages of an EPUB reflowable resource with an odd number of columns. A virtual blank trailing column is appended to the resource when displayed as two columns.
  • EPUB: Fallback on reflowable if the presentation.layout hint is missing from a manifest.
  • EPUB: Offset of the current selection's rect to take into account the vertical padding.
  • Improve backward compatibility of JavaScript files using Babel.
  • #193 Fixed invisible <audio> elements.