Skip to content

Release notes iOS Framework 2

IMPORTANT

This version of the Colibrio Reader Framework is no longer covered by our warranty support.

2.2.0 2022-05-18

New features

  • The TTS SyncMediaTimeline no longer adds the text "Media element" or "Image alt text" when a media element is encountered. Instead, when you call ReaderPublication.createTtsSyncMediaTimeline(), you can set what text to prepend by setting the option contentTransformationOptions.imageAltTextPrefix.

Bugfixes

  • Fixed an issue where PDF pages sometimes rendered as blank pages if the rendering was interrupted by a ReaderView.refresh() or when setting ReaderView.options.
  • Fixed an issue with ContentPositionTimeline.fetchTimelineRange for EPUB. When passing a ContentLocation range that ended just before a media element, the returned result incorrectly included the media element.

2.1.1 2022-03-21

Bugfixes

  • Fixed an issue causing audio playback to break in some EPUBs on iOS/iPadOS 15.4.
  • Fixed an issue causing audio playback to pause in some EPUBs on iOS/iPadOS.
  • Fixed an issue that caused fixed-layout EPUBs to be rendered with the wrong aspect ratio if a <meta name="viewport"...> element contained extra whitespaces in its content attribute.

2.1.0 2022-02-18

New features

  • Added a new option alignedSegmentSeekThresholdMs to SyncMediaAudioRendererOptions. This option controls how the SyncMediaAudioRenderer should treat gaps between two consecutive segments. If you hear many clicks, and cutoff words when playing back the audio in the publication, try increasing the value of this option.

Bugfixes

  • Fixed an issue causing some links in PDF files to not work correctly.
  • Fixed an issue in Safari/iOS where audio files would sometimes be skipped when playing EPUB Media Overlays.

2.0.2 2022-01-17

New features

  • You can now disable the pan/zoom reset when navigating a ReaderView by setting ReaderViewOptions.transformManagerOptions.removeTransformOnNavigation to false.

Bugfixes

  • Fixed an issue that caused EpubReaderPublication.fetchContentLocation() to fail when passing a Locator selecting a range across multiple documents that started from the first ReaderDocument in the spine.
  • Fixed an issue causing encrypted EPUBs to not work correctly. The EncryptionMethod instances passed to ReadingSystemEngine.loadPublication were never called.
  • Fixed an issue causing OnLicenseEventListener methods to not get called.

2.0.1 2021-12-02

Bugfixes

  • EPUB resources using the text encoding UTF-16 is now supported.

2.0.0 2021-11-15

NOTE

These release notes describe the changes since version 1.1.4

Changes from 2.0.0-rc.6

  • Fixed an issue causing TrueType Collection fonts .ttc files to not work with EPUB Publications.
  • Fixed an issue causing attribute selectors in CSS files to not work correctly.

Major new features

This release contains the following major new features:

  • ContentPositionTimeline API
  • SingleDocumentScrollRenderer
  • Media Streaming

ContentPositionTimeline API

A ContentPositionTimeline is used for describing positions in ReaderPublication content as integers. The timeline starts at position 0 and its length can be retrieved using ContentPositionTimeline.length.

The ContentPositionTimeline object provides an API for converting integer positions to locators, and vice versa.

The unit of measurement can be configured when creating a ContentPositionTimeline. Which units of measurement that are supported for a ReaderPublication can be retrieved using ReaderPublication.availableContentPositionTimelineUnits().

For example:

  • EPUB publications can construct ContentPositionTimelines with CHARACTERS as the unit of measurement. A position is the character offset from the start of the publication.
  • PDF publications can construct ContentPositionTimelines with PAGES as the unit of measurement. A position is the page index from the start of the publication.

See EpubReaderPublication.createContentPositionTimeline(), PdfReaderPublication.createContentPositionTimeline() for how to create a ContentPositionTimeline.

As these timelines are constructed from publication content, a position in the timeline will always map to the same location in the publication content regardless of how the content is rendered. Thus, it is useful for implementing progress bars, reporting reading progression, etc.

See the API documentation for ContentPositionTimeline for more information.

SingleDocumentScrollRenderer

A new scrolling renderer is now available. It displays one document at the time and allows the user to scroll its content.

When a SyncMediaPlayer is attached to the ReaderView, the scroll position will automatically synchronize with the SyncMediaPlayer playback position.

Media Streaming

The framework now supports streaming of media resources using the browser's Media Source API. In this release, the framework can stream MP3 audio files. We plan to add support for AAC and MP4 in a future release.

While the <video> and <audio> elements support streaming over HTTP natively, when playing a media resource from an EPUB file, the complete file must first be extracted before playback can start. With media streaming enabled, the playback can start sooner.

Media streaming is an opt-in feature that can be enabled for media elements in EPUB publications, as well as for Media Overlays. It is recommended to enable this feature if you are streaming the EPUB file over the internet.

To enable it for media elements in EPUB publications, set EpubReaderPublicationOptions.enableMediaStreaming to true. To enable it for Media Overlays, add the following option when creating the SyncMediaTimeline:

swift
epubReaderPublication.createMediaOverlaySyncMediaTimeline(readerDocuments, {
    defaultAudioRendererOptions: {
        enableMediaStreaming: true
    }
})

Note that the enableMediaStreaming option has no effect on devices running iOS, since the Media Source API is not supported by that platform.

Keyboard events

You can now add EngineEvent listeners for "keydown" and "keyup" to detect keyboard events when the focus is inside publication content.

New features

  • EngineEvent objects for click events, pointer events and keyboard events now have the property engineEvent.target.frameworkComponent. This property can be used to detect if the target of the event was inside a ReaderDocument, a ReaderView or a ReaderViewAnnotation.
  • Added ReaderPublicationOptions.clipboardOptions allowing configuration of copy actions such as Ctrl+C.
  • Added minimumTimeToDisplayPagesWithSyncMedia to SyncMediaManagedReaderViewSynchronizationOptions.
  • Added alwaysSeekToSegmentStart to SyncMediaManagedReaderViewSynchronizationOptions.
  • Added zipResourceProviderOptions to PublicationLoadConfiguration.Epub to controlling how chunks will be retrieved from the RandomAccessDataSource.
  • Added PageProgressionTimelineOptions.enabled allowing you to disable the feature if you are using ContentPositionTimeline instead.
  • Added ReaderViewGotoOptions that can be used to configure how ReaderView.goTo() should behave.
  • createContentPositionTimeline and createSyncMediaTimeline methods now accept an optional argument progressCallback which can be used for receiving callbacks about the timeline creation progress.

Bugfixes

  • Fixed a bug that caused the parsing of locator strings containing a RangeSelector to fail. (RangeSelectors are only used by the framework when creating locators across multiple pages in PDFs.) The bug did not affect highlight ranges in PDFs or EPUB CFI ranges.
  • Fixed several issues related to the locator implementation for PDF.
  • Rendering ReaderViewAnnotations for PDF locators such as #page=2 will now render a "position" element at the top-left corner.
  • Rendering ReaderViewAnnotations for EPUB CFIs that pointed to the end of a container (i.e. after the last child in the container) will now render a "position" element at the closest point corresponding to the end of that container.
  • Fixed an issue causing TrueType Collection fonts .ttc files to not work with EPUB Publications.
  • Fixed an issue causing attribute selectors in CSS files to not work correctly.

Improvements

  • Improved performance in SinglePageSwipeRenderer and SpreadSwipeRenderer.
  • Improved rendering quality in StackRenderer and FlipbookRenderer. (See Breaking changes.)
  • Improved reflow performance.
  • FlipbookRenderer and StackRenderer UI has improved and now has more options to control shadows, perspective and rubber band effect when swiping at the beginning or the end of a publication.
  • The process of creating SyncMediaTimeline and ContentPositionTimeline instances will now temporarily pause when:
    • the ReaderView is performing a navigation
    • visible or offscreen content is rendering
    • the user performs a ReaderViewGesture such as swiping the page or pan-zooming.

Breaking changes

FlipbookRenderer and StackRenderer

In an earlier version of the framework, a fix was added to workaround a bug on Chrome for Android. The bug causes content to sometimes disappear when performing pan-zoom gestures.

The negative effect of enabling the bugfix was that zoomed-in content appeared blurry. Since the bug has not been observed since Chrome 90, we have now removed it in order to improve rendering quality. If the bug should resurface, you can enable the bugfix again by setting the renderer option fixDisappearingCharactersInChromeForAndroid to true.

Full list of breaking changes

  • ResourceMetadata: Many fields have changed due to a refactor of the ResourceProvider API in the web framework. MediaTypeCategory enum values have changed. Values now map to the HTTP Accept header.
  • NavigationAction:
    • NEXT has been split into NEXT_CONTENT_RANGE and NEXT_RENDERABLE_PAGE.
    • PREVIOUS has been split into PREVIOUS_CONTENT_RANGE and PREVIOUS_RENDERABLE_PAGE.
  • EngineEventMediaResource: mediaType has been removed.

1.1.4 2021-10-21

Bugfixes

  • Fixed an issue with ReadingSystemEngine.unloadPublication. After a publication was unloaded, it still appeared in the ReadingSystemEngine.readerPublications list.

1.1.3 2021-09-24

Bugfixes

  • Fixed an issue where EPUB ReaderDocuments failed to render if it had a CSS file that ended with an open comment, i.e. a comment that was not closed with */.

1.1.1 2021-06-24

Bugfixes

  • Fixed an issue that caused ReaderViewAnnotations to not render if the backing EPUB CFI pointed to the end of an element.
  • Fixed an issue that caused CSS variables to not be preserved in publication stylesheets.
  • Fixed an issue that could cause EPUB Media Overlays to not play correctly if the "src" attribute in a <text> element did not contain a fragment identifier (i.e. it referenced the whole document).
  • Fixed an issue causing OnSyncMediaPlayerEventListener.onSegmentDurationChanged to not be called.

1.1.0 2021-05-27

Bugfixes

  • Fixed an issue causing OnActiveTransformChangedListener.onActiveTransformChanged not being fired correctly.
  • Fixed an issue that caused ReaderViewGestures to not work correctly if ReaderView.allowedGestureTypes was modified while a gesture was active.
  • Fixed an issue where the SyncMediaPlayer did not automatically navigate to next page if the remaining pages in the ReaderView did not contain sync media.
  • Fixed an issue where the ReaderView did not remove the active renderer correctly when switching to content set by setContentOnActiveRendererMissing().
  • Fixed an issue where ReaderView.focusOnReadingPosition() sometimes could fail with an unexpected TypeError in EPUB publications.

1.0.0 2021-05-11

Breaking changes

  • Class-only protocols now inherit from AnyObject instead of class. (Inheriting from class has been deprecated in Swift.)

New features

  • TTS SyncMediaTimelines can now be created using ReaderPublication.createTtsSyncMediaTimeline().

Bugfixes

  • Fixed an issue that could cause EPUB Media Overlays to not work properly when a <par> node referenced the body element.

0.9.1 2021-04-22

New features

  • Added ColibrioView.setOnWebViewContentProcessDidTerminateListener.

    Sets a listener that is called when the WKWebView content process is terminated for some reason.

    The WKWebView content process can be terminated without your app being terminated if your app is in the background and the OS needs to free up memory. This will cause the WKWebView to just display a blank page when the user opens the app again.

    When the listener is called, you need to remove the ColibrioView and reload it again, including reloading the ReaderPublication, setting up the ReaderView, etc. This could for example be done by dismissing the whole ViewController hosting the ColibrioView and load it again.

0.9.0 2021-04-07

Breaking changes

Several types have changed from struct/protocol to classes in order to more closely match the TypeScript version of the Colibrio Reader Framework API. The following types have changed from struct/protocol to class:

  • LocalizableString
  • RdfaProperty
  • EngineEventTargetNodeData
  • SyncMediaObjectRef

New features

  • Added new options to PdfPublicationOptions to enable chunk requests with deterministic sizes.

Bugfixes

  • Fixed an issue that could cause the SyncMediaPlayer to pause in some cases when segment duration was 0.

0.8.3 2021-03-15

Bugfixes

  • Fixed an issue causing the SyncMediaPlayer to fail advancing to next segment sometimes when playing VBR (variable bitrate) audio files like MP3 or AAC, and the MediaOverlay used a clipEnd value greater than the actual audio file duration.

0.8.2 2021-03-11

Bugfixes

  • Fixed an issue where documents with non-standard media type application/html couldn't be loaded properly.
  • Fixed an issue causing scripts in scripted content documents to sometimes load in the wrong order if the script was loaded over https.
  • Fixed an issue where SyncMediaPlayer sometimes did not play the last seconds of VBR (Variable bitrate) AAC audio files.

0.8.1 2021-03-02

Bugfixes

  • Fixed an issue where FlipBookRenderer and SpreadSwipeRenderer did not handle publications with RTL page progression direction correctly.

0.8.0 2021-02-25

New features

  • OnSyncMediaPlayerEventListener has two new methods:
    • onEndReached() which is called when the SyncMediaPlayer has reached the end of the timeline.
    • onError(event: SyncMediaErrorEngineEventData) which is called when an error occurs in the SyncMediaPlayer that may cause it to pause. See SyncMediaErrorEngineEventData for more information.
  • Added ColibrioReaderFramework.webViewLogLevel which can be used to set which WebView console messages that should be logged to the device log.
  • Added ReaderView.addCustomCss(css: String) which can be used to add CSS that will affect the ReaderView and ReaderViewAnnotationLayers.
  • RendererOptions.prerenderOffscreenPages has been removed. Offscreen pages will now always be pre-rendered.

Bugfixes

  • Fixed an issue causing AAC audio files to not work sometimes on iOS and iPadOS.
  • Improved EPUB resource streaming to prevent timeout errors when downloading large files over slow internet connections.
  • Refreshing the ReaderView while performing a next/previous animation will now result in the reading position being properly updated to the next/previous page.
  • ReaderView.goTo() navigations to adjacent pages will now use the next/previous animations.
  • Fixed a memory leak related to doing many goTos in rapid succession.
  • Fixed an issue that could cause the SyncMediaPlayer to start playing from start of the timeline a short period of time while performing the initial ReaderView.goTo.
  • ReaderViewAnnotationOptions can now be used to override positioning and dimensions (width/height, left/top, etc.).
  • Fixed an issue where large widths specified on elements in EPUB content documents caused font-size to decrease.

0.7.3 2020-02-01

Bugfixes

  • Added a processing step to rewrite large horizontal margins that caused content to overflow horizontally on small screens.

0.7.2 2020-01-14

Bugfixes

  • Fixed an issue where converting a SyncMediaPosition to an IAnnotationTarget sometimes caused EPUB CFI text offsets to be expressed as floating-point numbers.
  • Fixed an issue when reflowing EPUBs that caused too much content to appear on a single page when a non-empty container element had its height set to 0, but its overflow rule was set to 'visible'.
  • Fixed an issue when reflowing EPUBs that in some cases caused too much content to appear on a single page.
  • Fixed an issue causing AnnotationLayers to sometimes not render the annotations for the current visible page(s) if the annotations were added immediately after creating the AnnotationLayer.

0.7.1 2020-12-11

Bugfixes

  • Fixed an issue causing pointer events and text selection in PDFs to not work as expected.

0.7.0 2020-12-10

New features

Sync media

Added SyncMediaPlayer and SyncMediaTimeline. These classes can be used to play synchronized media, such as EPUB Media Overlays.

First, you need to create a SyncMediaTimeline. You can check if it is possible to create a timeline using ReaderPublication.availableSyncMediaFormats. Each sync media format has its own method for creating a SyncMediaTimeline. To create a timeline based on EPUB Media Overlay, use EpubReaderPublication.createMediaOverlaySyncMediaTimeline.

When you have a SyncMediaTimeline instance, you can create a SyncMediaPlayer to play the timeline using ReadingSystemEngine.createSyncMediaPlayer.

Finally, you need to attach the SyncMediaPlayer to the ReaderView so they can synchronize their positions. Use ReaderView.syncMediaPlayer = mySyncMediaPlayer to do this. Navigating the ReaderView or seeking the SyncMediaPlayer will now automatically handle synchronization between the ReaderView.readingPosition and the SyncMediaPlayer.timelinePosition.

Focus API

Added ReaderView.focusOnReadingPosition. By focusing on publication content, your app gives accessibility technologies such as screen readers an intent where to start reading. Please note that this method only sets focus inside the WebView.

You may need to set focus on the ColibrioView before calling this method and also make sure that the accessibility service knows when WebView content has changed. You can do this by using:

swift
UIAccessibility.post(notification: .screenChanged, argument: colibrioView.webView)

Typically you should call this on the event callback onNavigationEnd and when ReaderView.visibleContentRendering returns false. Please see the API docs and AccessibilityFocusManager.swift in the demo app for an example.

Transform Manager API

Added ReaderView.transformManager. Used for applying transformations such as scaling and translations to a ReaderView. You can for example use this to zoom to a position when a user clicks/taps on the ReaderView.

Other features

  • The API reference documentation has been updated across the whole framework and now contains more details.
  • Added two new options to FlipBookRendererOptions: showPageFoldShadow and pageFoldShadowOpacity. Setting showPageFoldShadow to true will add a shadow between the left and right page, making it look more like a book.
  • Added support for CSS declarations object-fit and object-position in reflowable content documents. These allow you to control how to position images that have been scaled.
  • Added improved support for range locators. Range locators can now point to ranges across multiple documents in a publication.
  • ReaderView and Renderers has been reworked to support more advanced presentation modes.
  • Added ReaderView.visiblePages containing the reader document and range locator for each page.
  • Added ReaderView.visibleRange containing the locator pointing to the content range visible in the ReaderView.
  • Added ReaderView.visibleContentRendering and ReaderView.offscreenContentRendering.
  • Added ReaderView.activeNavigationAction showing which type of navigation action that is currently being performed if any.
  • Added ReaderView.activeGestureType showing the current active gesture type being performed by the user if any.
  • Added ReaderView.allowedGestureTypes allowing you to control which type of ReaderView gestures the user is allowed to perform.
  • Added several new listeners to detect changes in ReaderView.

Bugfixes

  • Video elements should now be allowed to play in fullscreen.

    Caveat: When rotating the screen on iOS, view.refresh() will exit fullscreen mode.

  • Ensure that error responses from RandomAccessDataSource are not cached by the ZipResourceProvider so that they can be retried.

  • Fixed an issue where Chrome caused reflowable documents containing soft-hyphen characters to page-break at incorrect positions.

  • Fixed an issue when reflowing EPUBs that in some cases caused too much content to appear on a single page.

  • Fixed an issue that could cause images to not keep aspect ratio when they were scaled.

Breaking changes

This release contains all the API changes for the upcoming 1.0 release. We have renamed and reworked several types in the framework. One of the main reasons for the renamings is to make the APIs more consistent and easier to understand. Another is to ensure that the APIs are consistent across all platforms. We have also updated the API documentation across the whole framework which will provide you with more contextual help while you code.

The following classes and interfaces have been renamed:

  • LicenseOptionsReadingSessionOptions
  • ReaderPublicationLocationTargetContentLocation
  • PublicationConfigurationPublicationLoadConfiguration
  • EpubPublicationConfigurationEpubPublicationLoadConfiguration
  • PdfPublicationConfigurationPdfPublicationLoadConfiguration
  • ReaderViewModelStateDataPageProgressionDirectionReaderViewPageProgressionDirection
  • OnMouseEngineEventListenerOnMouseEventListener
  • OnPointerEngineEventListenerOnPointerEventListener
  • OnSelectionChangeListenerOnSelectionChangedListener
  • OnViewAnnotationClickListenerOnAnnotationClickListener
  • OnViewAnnotationContextMenuListenerOnAnnotationContextMenuListener
  • OnViewAnnotationInViewChangedListenerOnAnnotationIntersectsVisibleRangeChangedListener
  • PageProgressionTimelineListenerOnPageProgressionTimelineEventListener
  • ViewAnnotationReaderViewAnnotation
  • ViewAnnotationLayerReaderViewAnnotationLayer
  • ViewEngineEventDataReaderViewEngineEventData
  • ViewAnnotationLayerOptionsReaderViewAnnotationLayerOptions
  • ViewAnnotationOptionsReaderViewAnnotationOptions
  • ViewOptionsReaderViewOptions

The following classes have been removed:

  • Renderer.VerticalScroll: This renderer had many issues and is being replaced by two new renderers in the near future: ContinuousScrollRenderer and ScrolledDocumentRenderer.
  • VerticalScrollRendererOptions
  • OnViewStateChangedListener: ReaderView.viewState no longer exists.

The following properties and methods have changed:

  • PageProgressionTimeline:
    • visibleRangevisibleTimelineRange
  • PublicationLoadConfiguration:
    • optionsreaderPublicationOptions
    • dataSourcepublicationDataSource
    • licenseOptionsreadingSessionOptions
  • ReaderPublication:
    • getLocationTargetgetContentLocation
    • hasSyncMedia has been removed. (availableSyncMediaFormats is now available instead.)
  • ReaderView:
    • viewState has been removed. Use activeNavigationAction, activeGestureType and transformManager.activeTransform instead.
    • responsiveresponsiveRendererSelectionEnabled
    • isAtFirstPageatStart
    • isAtLastPageatEnd
    • contentDocumentEventHandlersEnabledscriptedContentDocumentEventHandlersEnabled
    • viewOptionsoptions
    • createViewAnnotationLayercreateAnnotationLayer
    • destroyViewAnnotationLayerdestroyAnnotationLayer
    • setOnActiveRendererChangedListeneraddOnActiveRendererChangedListener and removeOnActiveRendererChangedListener
    • setOnReadingPositionChangedListeneraddOnReadingPositionChangedListener and removeOnReadingPositionChangedListener
    • setOnMouseEngineEventListeneraddOnMouseEventListener and removeOnMouseEngineEventListener
    • setOnPointerEngineEventListeneraddOnPointerEventListener and removeOnPointerEventListener
    • setPageProgressionTimelineListeneraddOnPageProgressionTimelineEventListener and removeOnPageProgressionTimelineEventListener
    • setOnSelectionChangeListeneraddOnSelectionChangedListener and removeOnSelectionChangedListener
    • setOnNavigationIntentEventListeneraddOnNavigationIntentEventListener and removeOnNavigationIntentEventListener
    • setContentOnOfflineReadingSessionExpiredsetContentOnLicenseGracePeriodExpired
  • ReaderViewAnnotation:
    • hasCustomizeOptions has been removed. Check options != null instead.
    • inViewintersectsVisibleRange
  • ReaderViewAnnotationLayer:
    • createViewAnnotationcreateAnnotation
    • createViewAnnotationscreateAnnotations
    • destroyViewAnnotationdestroyAnnotation
    • destroyAllViewAnnotationsdestroyAllAnnotations
    • defaultViewAnnotationOptionsdefaultAnnotationOptions
    • viewAnnotationsannotations
    • setOnViewAnnotationClicklListeneraddOnAnnotationClickListener and removeOnAnnotationClickListener
    • setOnViewAnnotationContextMenuListeneraddOnAnnotationContextMenuListener and removeOnAnnotationContextMenuListener
    • setOnViewAnnotationInViewListeraddOnAnnotationIntersectsVisibleRangeChangedListener and removeOnAnnotationIntersectsVisibleRangeChangedListener
  • ReadingSystemEngine:
    • setOnLicenseEventListeneraddOnLicenseEventListener and removeOnLicenseEventListener
    • loadPdfPublicationloadPublication
    • loadEpubPublicationloadPublication
  • OnAnnotationClickListener:
    • onViewAnnotationClickonAnnotationClick
  • OnAnnotationIntersectsVisibleRangeChangedListener:
    • onViewAnnotationInViewChangedonAnnotationIntersectsVisibleRangeChanged
  • OnPointerEventListener:
    • onPointerEngineEvent → split into: onPointerDown, onPointerMove, onPointerUp, onPointerCancel
  • OnSelectionChangedListener:
    • onSelectionChangeonSelectionChanged
  • OnNavigationIntentEventListener:
    • onNavigationEventonNavigationIntent
  • PublicationStyleTextAlignmentOptions:
    • allowedpreserved
  • ReaderViewAnnotationLayerOptions:
    • viewAnnotationInputEngineEventsEnabledannotationInputEngineEventsEnabled
  • ReaderViewOptions:
    • enablePointerEventListener was removed. Use ReaderView.allowedGestureTypes instead.
    • viewInteractionPointerTypes was removed. Use gestureOptions.panZoom.pointerTypes and gestureOptions.swipeNavigation.pointerTypes instead.
    • viewStateOptions was removed. Use gestureOptions and transformManagerOptions instead.

0.6.0 2020-10-12

New features

  • Publication metadata now available for all publication types.
  • You can now override text alignment in reflowable content documents using the textAlignment property in PublicationStyleOptions.

Bugfixes

  • Fixed an issue where illegal attribute values for width or height on <img> elements could cause images to appear stretched.
  • Fixed an issue where a content-document page could become selected when tapping at the edge of the ReaderView on iOS/iPadOS.

Improvements

  • Prevent loading CSS background-images that are included in the stylesheet but not used in the active content document.

0.4.0 2020-08-07

New features

  • Added support for iOS 14.

Breaking changes

The following classes have been changed to structs:

  • Length
  • RectMargins
  • PublicationStyleFontDefaults
  • PublicationStyleFontFace
  • PublicationStyleFontSelector
  • PublicationStyleFontSet
  • PublicationStylePalette
  • CustomCssValuePenalizerNumericCondition
  • CustomCssValuePenalizerRule
  • CustomElementPenalizerOverrideRule
  • CustomElementPenalizerRule
  • CustomForcedPageBreakOptionsRuleDef
  • EpubRemoteResourceWhitelistDirective
  • FragmentableElementsOptionStyleRule
  • ListBreakOptionsPenaltyRule
  • OrphanTextPatternOptionsRule
  • UnforcedTextBreakOptionsRule
  • VerticalWhiteSpacePenaltyStop

ReaderView:

  • func set(_ margins: Margins) has changed to func setMargins(_ margins: Margins).
  • activeRenderer is no longer a setter. Added func setActiveRenderer(_ renderer: Renderer?) throws.

Improvements

  • Added "object" tag to EPUB HTML element whitelist in order to support "EPUB3 bindings" fallback content.
  • Added support for @import declarations in CSS files.

Bugfixes

  • Fixed an issue causing the EPUB FileSizeBased page estimation algorithm to report inaccurate results for some EPUBs.
  • Force video files with the .m4v extension to use the media-type "video/mp4" in order for playback to work in Safari browsers.