EpubReaderPublicationOptions

data class EpubReaderPublicationOptions(val allowDocumentScripting: Boolean = true, val customPublicationCss: EpubReaderPublicationCustomCssOptions = EpubReaderPublicationCustomCssOptions(), val elementWhitelistOptions: EpubElementWhitelistOptions = EpubElementWhitelistOptions(), val enableMediaStreaming: Boolean = false, val fixedLayoutStyleOptions: EpubFixedLayoutStyleOptions = EpubFixedLayoutStyleOptions(), val mediaOverlayOptions: EpubMediaOverlayOptions = EpubMediaOverlayOptions(), val pageCountEstimationAlgorithm: EpubPageCountEstimationAlgorithm = EpubPageCountEstimationAlgorithm.FileSize(), val preventDefaultContextMenuOnMediaElements: Boolean = false, val reflowOptions: EpubReflowOptions = EpubReflowOptions(), val remoteResourcesNonScriptedDocumentsOptions: EpubRemoteResourceOptions = EpubRemoteResourceOptions(), val remoteResourcesScriptedDocumentsOptions: EpubRemoteResourceOptions = EpubRemoteResourceOptions(), val textSplitOptions: EpubTextNodeSplitOptions = EpubTextNodeSplitOptions(), val additionalLocatorUrls: List<String> = emptyList(), val clipboardOptions: ReaderPublicationClipboardOptions = ReaderPublicationClipboardOptions(), val defaultLocatorUrl: String? = null, val preventDefaultContextMenu: Boolean = false, val preventDragAndDropActions: Boolean = true)

Options related to processing and presentation of EPUB publications.

Constructors

Link copied to clipboard
fun EpubReaderPublicationOptions(allowDocumentScripting: Boolean = true, customPublicationCss: EpubReaderPublicationCustomCssOptions = EpubReaderPublicationCustomCssOptions(), elementWhitelistOptions: EpubElementWhitelistOptions = EpubElementWhitelistOptions(), enableMediaStreaming: Boolean = false, fixedLayoutStyleOptions: EpubFixedLayoutStyleOptions = EpubFixedLayoutStyleOptions(), mediaOverlayOptions: EpubMediaOverlayOptions = EpubMediaOverlayOptions(), pageCountEstimationAlgorithm: EpubPageCountEstimationAlgorithm = EpubPageCountEstimationAlgorithm.FileSize(), preventDefaultContextMenuOnMediaElements: Boolean = false, reflowOptions: EpubReflowOptions = EpubReflowOptions(), remoteResourcesNonScriptedDocumentsOptions: EpubRemoteResourceOptions = EpubRemoteResourceOptions(), remoteResourcesScriptedDocumentsOptions: EpubRemoteResourceOptions = EpubRemoteResourceOptions(), textSplitOptions: EpubTextNodeSplitOptions = EpubTextNodeSplitOptions(), additionalLocatorUrls: List<String> = emptyList(), clipboardOptions: ReaderPublicationClipboardOptions = ReaderPublicationClipboardOptions(), defaultLocatorUrl: String? = null, preventDefaultContextMenu: Boolean = false, preventDragAndDropActions: Boolean = true)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)

Properties

Link copied to clipboard

Additional locator URLs that should resolve to the ReaderPublication when calling methods with locator parameters, such as ReaderView.goTo(), ReaderViewAnnotationLayer.createAnnotation()

Link copied to clipboard

Sets if content document scripting should be allowed. Content documents with scripts executes inside a sandbox iframe.

Link copied to clipboard

Options controlling clipboard actions.

Link copied to clipboard

Extra CSS to inject into all content documents of the publication. This can be used to fix publications with problematic CSS.

Link copied to clipboard

The base URL that should be used by the ReaderPublication when it creates new Locators.

Link copied to clipboard

All Elements and Attributes in reflowable content-documents are processed through a whitelist filter to prevent unsafe scripting.

Link copied to clipboard

If streaming of audio and video using the Media Source Extensions API (MSE) should be used. See https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API

Link copied to clipboard

Options controlling which publicationStyleOptions set by calling ReaderView.setOptions() that should apply to fixed-layout documents.

Link copied to clipboard

Options related with EPUB media overlays

Link copied to clipboard

The algorithm to use for estimating the number of pages in content documents. Note: This option is only checked when calling load publication.

Link copied to clipboard

If set to true, the reading system will prevent the default "right-click" and "long-press" context menus to be shown for publication content.

Link copied to clipboard

If the default context-menu should be prevented when right-clicking or long pressing: images, video or audio elements

Link copied to clipboard

Sets if users should be able to "drag-and-drop" content from the publication.

Link copied to clipboard

Options configuring how the reflow engine divide content documents into pages. These options will be further documented in a future version of the framework.

Options for controlling remote resources in the publication for non-scripted content-documents.

Link copied to clipboard

Options for controlling remote resources in the publication for scripted content-documents.

Link copied to clipboard

Options related to splitting up text nodes in order to increase performance when reflowing an EPUB that has very long text nodes.