Releases: readium/swift-toolkit
Releases · readium/swift-toolkit
2.6.0
Take a look at the migration guide
- Support for Xcode 15.
Added
Navigator
- The
PublicationSpeechSynthesizer(TTS) now supports background playback by default.- You will need to enable the Audio Background Mode in your app's build info.
- Support for non-linear EPUB resources with an opt-in in reading apps (contributed by @chrfalch in #332 and #331).
- Override loading non-linear resources with
VisualNavigatorDelegate.navigator(_:shouldNavigateToLink:). - Present a new
EPUBNavigatorViewControllerby providing a customreadingOrderwith only this resource to the constructor.
- Override loading non-linear resources with
Fixed
Navigator
- Improved performance when adding hundreds of HTML decorations at once.
- Fixed broadcasting the
PublicationSpeechSynthesizerwith AirPlay when the screen is locked.
Changed
Navigator
AudioSessionandNowPlayingInfoare now stable!- You need to provide the configuration of the Audio Session to the constructor of
PublicationSpeechSynthesizer, instead ofAVTTSEngine.
2.5.1
Take a look at the migration guide
- The Readium toolkit now requires iOS 11.0+.
Added
Navigator
- The
autospread setting is now available for fixed-layout EPUBs. It will display two pages in landscape and a single one in portrait.
Streamer
- The EPUB content iterator now returns
audioandvideoelements and fill in theprogressionandtotalProgressionlocator properties.
Changed
Navigator
EPUBNavigatorViewController.firstVisibleElementLocator()now returns the first block element that is visible on the screen, even if it starts on previous pages.- This is used to make sure the user will not miss any context when restoring a TTS session in the middle of a resource.
Fixed
Navigator
- Fixed the PDF
autospread setting and scaling pages when rotating the screen. - Fixed navigating to the first chapter of an audiobook with a single resource (contributed by @grighakobian).
- Prevent auto-playing videos in EPUB publications.
- Fixed various memory leaks and data races.
- The
WKWebViewis now inspectable again with Safari starting from iOS 16.4. - Fixed crash in the
PublicationSpeechSynthesizerwhen closing the navigator without stopping it first. - Fixed pausing the
PublicationSpeechSynthesizerright before starting the utterance. - Fixed the audio session kept opened while the app is in the background and paused.
- Fixed the Attribute dir redefined error when the EPUB resource already has a
dirattribute. - #309 Fixed restoring the EPUB location when the application was killed in the background (contributed by @triin-ko).
Streamer
- Fix issue with the TTS starting from the beginning of the chapter instead of the current position.
2.5.0
Take a look at the migration guide
Added
Streamer
- Positions computation, TTS and search is now enabled for Readium Web Publications conforming to the EPUB profile.
Navigator
- New
VisualNavigatorDelegateAPIs to handle keyboard events (contributed by @lukeslu).- This can be used to turn pages with the arrow keys, for example.
- Support for custom fonts with the EPUB navigator.
- A brand new user preferences API for configuring the EPUB and PDF Navigators. This new API is easier and safer to use. To learn how to integrate it in your app, please refer to the user guide and migration guide.
- New EPUB user preferences:
fontWeight- Base text font weight.textNormalization- Normalize font style, weight and variants, which improves accessibility.imageFilter- Filter applied to images in dark theme (darken, invert colors)language- Language of the publication content.readingProgression- Direction of the reading progression across resources, e.g. RTL.typeScale- Scale applied to all element font sizes.paragraphIndent- Text indentation for paragraphs.paragraphSpacing- Vertical margins for paragraphs.hyphens- Enable hyphenation.ligatures- Enable ligatures in Arabic.
- New PDF user preferences:
backgroundColor- Background color behind the document pages.offsetFirstPage- Indicate if the first page should be displayed in its own spread.pageSpacing- Spacing between pages in points.readingProgression- Direction of the reading progression across resources, e.g. RTL.scrollAxis- Scrolling direction whenscrollis enabled.scroll- Indicate if pages should be handled using scrolling instead of pagination.spread- Enable dual-page mode.visibleScrollbar- Indicate whether the scrollbar should be visible while scrolling.
- New EPUB user preferences:
- The new
DirectionalNavigationAdaptercomponent helps you to turn pages with the arrows and space keyboard keys or taps on the edge of the screen.
Deprecated
Streamer
PublicationServeris deprecated. See the the migration guide to migrate the HTTP server.
Navigator
- The EPUB
UserSettingscomponent is deprecated and replaced by the new Preferences API. Take a look at the user guide and migration guide.
Changed
Navigator
- The
defineediting action replaceslookupon iOS 16+. When enabled, it will show both the "Look Up" and "Search Web" menu items. - Prevent navigation in the EPUB while it is being loaded.
Fixed
Navigator
- Fixed a race condition issue with the
AVTTSEngine, when pausing utterances. - Fixed crash with
PublicationSpeechSynthesizer, when the currently played word cannot be resolved. - Fixed EPUB tap event sent twice when using a mouse (e.g. on Apple Silicon or with a mouse on an iPad).
2.4.0
Take a look at the migration guide
Added
Shared
- Support for the accessibility metadata in RWPM per Schema.org Accessibility Properties for Discoverability Vocabulary.
- Extract the raw content (text, images, etc.) of a publication.
Navigator
Streamer
- Parse EPUB accessibility metadata (see documentation).
Deprecated
Shared
Locator(link: Link)is deprecated as it may create an incorrectLocatorif the linktypeis missing.- Use
publication.locate(Link)instead.
- Use
Fixed
- #244 Fixed build with Xcode 14 and Carthage/CocoaPods.
Navigator
- Fixed memory leaks in the EPUB and PDF navigators.
- #61 Fixed serving EPUB resources when the HREF contains an anchor or query parameters.
- Performance issue with EPUB fixed-layout when spreads are enabled.
- Disable scrolling in EPUB fixed-layout resources, in case the viewport is incorrectly set.
- Fix vertically bouncing EPUB resources in iOS 16.
Streamer
- Fixed memory leak in the
PublicationServer.
LCP
- The LCP authentication dialog is now fully localized and supports Dark Mode (contributed by @openm1nd).
2.3.0
Take a look at the migration guide
Added
Shared
- Get the sanitized
Locatortext ready for user display withlocator.text.sanitized(). - A new
Publication.conforms(to:)API to identify the profile of a publication. - Support for the
conformsToRWPM metadata, to identify the profile of aPublication. - Support for right-to-left PDF documents by extracting the reading progression from the
ViewerPreferences/Directionmetadata. - HTTP client:
- A new
HTTPClient.download()API to download HTTP resources to a temporary location. HTTPRequestandDefaultHTTPClienttake an optionaluserAgentproperty to customize the user agent.
- A new
Navigator
- The new
NavigatorDelegate.navigator(_:didJumpTo:)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(to:), but not when turning pages. - You can use this callback to implement a navigation history by differentiating between continuous and discontinuous moves.
- For example, it is called when clicking on internal links or programmatically calling
Deprecated
Shared
Publication.formatis now deprecated in favor of the newPublication.conforms(to:)API which is more accurate.- For example, replace
publication.format == .epubwithpublication.conforms(to: .epub)before opening a publication with theEPUBNavigatorViewController.
- For example, replace
Changed
LCP
- The
LCPServicenow uses a providedHTTPClientinstance for all HTTP requests.
Fixed
Navigator
- #14 Backward compatibility (iOS 10+) of JavaScript files is now handled with Babel.
- Throttle the reload of EPUB spreads to avoid losing the position when the reader gets back to the foreground.
LCP
- Fixed the notification of acquisition progress.
2.2.0
Take a look at the migration guide
Added
Shared
- Support for Paragraph Margins user setting.
Navigator
- A new
translateEPUB and PDF editing action is available for iOS 15.
Fixed
Shared
- Improved performances of the search service used with EPUB.
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.