GithubHelp home page GithubHelp logo

readium / swift-toolkit Goto Github PK

View Code? Open in Web Editor NEW
226.0 11.0 96.0 14.56 MB

A toolkit for ebooks, audiobooks and comics written in Swift

Home Page: https://readium.org/mobile/

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.16% Swift 83.25% Ruby 0.32% C 0.02% CSS 0.17% JavaScript 2.05% HTML 14.04%
ios swift pdf epub audiobook reader cbz audiobook-player ebook-reader opds

swift-toolkit's Introduction

Readium Swift Toolkit

Readium Mobile is a toolkit for ebooks, audiobooks and comics written in Swift & Kotlin.

☝️ Take a look at the guide to get started. A Test App demonstrates how to integrate the Readium Swift toolkit in your own reading app.

This toolkit is a modular project, which follows the Readium Architecture.

Minimum Requirements

Readium iOS Swift compiler Xcode
develop 13.0 5.9 15.0.1
3.0.0 13.0 5.9 15.0.1
2.5.1 11.0 5.6.1 13.4
2.5.0 10.0 5.6.1 13.4
2.4.0 10.0 5.3.2 12.4

Using Readium

Readium libraries are distributed with Swift Package Manager (recommended), Carthage and CocoaPods. It's also possible to clone the repository (or a fork) and depend on the libraries locally.

The Test App contains examples on how to use all these dependency managers.

Swift Package Manager

From Xcode, open File > Add Packages and use Readium's GitHub repository for the package URL: https://github.com/readium/swift-toolkit.git.

You are then free to add one or more Readium libraries to your application. They are designed to work independently.

If you're stuck, find more information at developer.apple.com.

Carthage

Add the following to your Cartfile:

github "readium/swift-toolkit" ~> 3.0.0-alpha.1

Then, follow the usual Carthage steps to add the Readium libraries to your project.

Note that Carthage will build all Readium modules and their dependencies, but you are free to add only the ones you are actually using. The Readium libraries are designed to work independently.

Refer to the following table to know which dependencies are required for each Readium library.

ReadiumShared ReadiumStreamer ReadiumNavigator ReadiumOPDS ReadiumLCP ReadiumAdapterGCDWebServer ReadiumAdapterLCPSQLite
ReadiumShared ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
ReadiumInternal ✔️ ✔️ ✔️ ✔️ ✔️
CryptoSwift ✔️ ✔️
DifferenceKit ✔️
Fuzi ✔️ ✔️ ✔️ ✔️ ✔️
Minizip ✔️ ✔️ ✔️ ✔️ ✔️
ReadiumGCDWebServer ✔️
SQLite.swift ✔️
SwiftSoup ✔️ ✔️ ✔️ ✔️ ✔️
ZIPFoundation ✔️

CocoaPods

Add the following pod statements to your Podfile for the Readium libraries you want to use:

pod 'ReadiumShared', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/3.0.0-alpha.1/Support/CocoaPods/ReadiumShared.podspec'
pod 'ReadiumStreamer', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/3.0.0-alpha.1/Support/CocoaPods/ReadiumStreamer.podspec'
pod 'ReadiumNavigator', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/3.0.0-alpha.1/Support/CocoaPods/ReadiumNavigator.podspec'
pod 'ReadiumOPDS', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/3.0.0-alpha.1/Support/CocoaPods/ReadiumOPDS.podspec'
pod 'ReadiumLCP', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/3.0.0-alpha.1/Support/CocoaPods/ReadiumLCP.podspec'
pod 'ReadiumInternal', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/3.0.0-alpha.1/Support/CocoaPods/ReadiumInternal.podspec'

# Required if you use ReadiumAdapterGCDWebServer.
pod 'ReadiumGCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/GCDWebServer/4.0.0/GCDWebServer.podspec'

Take a look at CocoaPods's documentation for more information.

Local Git Clone

You may prefer to use a local Git clone if you want to contribute to Readium, or if you are using your own fork.

First, add the repository as a Git submodule of your app repository, then checkout the desired branch or tag:

git submodule add https://github.com/readium/swift-toolkit.git

Next, drag and drop the whole swift-toolkit folder into your project to import Readium as a Swift Package.

Finally, add the Readium libraries you want to use to your app target from the General tab, section Frameworks, Libraries, and Embedded Content.

Building with Readium LCP

Using the toolkit with Readium LCP requires additional dependencies, including the framework R2LCPClient.framework provided by EDRLab. Contact EDRLab to request your private R2LCPClient.framework and the setup instructions.

swift-toolkit's People

Contributors

acamill avatar aferditamuriqi avatar alexc4m avatar cbaltzer avatar chrfalch avatar classwizard avatar domkm avatar ehapmgs avatar enverygtlr avatar ettore avatar gatamar avatar iaomw avatar ilukes avatar iosdevedrlab avatar iyaseen avatar jerome65536 avatar johanpoirier avatar llemeurfr avatar lukeslu avatar mickael-menu avatar mickael-menu-mantano avatar nikitaevidentpoint avatar nwilmet-vivlio avatar olivierkorner avatar openm1nd avatar rkwright avatar stevenzeck avatar tooolbox avatar ullstrm avatar vishal-gupta-sf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swift-toolkit's Issues

NavDoc & NCX parsing: when to parse which one

Does the NavDoc parsing take precedence over the NCX parsing?
If NavDoc { parse NavDoc} else { parse NCX}

Should we consider the EpubVersion for choosing which one to parse?
If EpubVersion >= 3 { parse NavDoc } else { parse NCX }

Should we have a "fallback behavior" in case the two documents are present but we didn't found the in the NavDoc? (Or should it always try to get as much informations as possible in the 2 files if they are present? Though this could add invalid informations from a deprecated NCX document)

User have an updated NavDoc and a deprecated NCX he forgot

parseNavDoc(to: publication)
if publication.Any {
    parseNcx(to:publication) // Don't overwrite properties already parsed in the NavDoc
                                              // BUT fill the empty ones with the (deprecated?) data from NCX.
}
// OR
parseNavDoc(to: publication)
if publication.toc.isEmpty {
    parseNcx(to:publication) // Only if the TOC could not be found then get the informations
                                              // from the NCX (overwrite?).
}

Other points to consider (and probably create other issues):

  • Full NCX parsing (navList), in order to parse LOA/LOV/LOT/LOI/Landmarks etc..
  • In the current WebPubManifest the landmarks section looks like this (in both swift and go):
// There is a reference to toc and a file name (in the href). That's not coherent?
  "landmarks" : [
    {
      "href" : "#toc",
      "title" : "Table of Contents"
    },
    {
      "href" : "p10.xhtml",
      "title" : "Begin Reading"
    }
  ],

Subtitles are not rendered on video

There are 2 common subtitling approaches for video (VTT and TTML). TTML is little supported by the HTML5 browsers, but VTT is supported. The EPUB TestSuite 100 tests video subtitling. There are 4 tests, two for each type of subtitling. TTML does not work on iBooks, but VTT does. None of them work in the Swift app.

Steps to reproduce:

  1. Download EPUBTEST 0100 - Reflowable Content Tests
  2. Open in the app
  3. Navigate to the video tests.
  4. Play the videos

None of the subtitles are rendered though the video itself is fine.

Tested with build 1.0.3

[a11y] Navigation

We can't find how:

  • Navigate content by pages
  • Navigate by reflowed page number
  • Read navigation information
  • Perform a search, review the search results

Two MathML tests fail

The EPUB Test Suite 100 tests MathML. The app passes all the tests except mathml-080 and mathml-081. Presumably the app is just using the WebKit rendering engine so the app has no control over it.

Steps to reproduce:

  1. Download EPUBTEST 0100 - Reflowable Content Tests
  2. Open in the app
  3. Navigate to the mathml tests.

Note that 080 and 081 are not rendered correctly.

Tested with build 1.0.3

i18n: consider using downloadable fonts for non-latin scripts

iOS doesn’t ship with a lot of CJK, Indic, Hebrew and Arabic fonts, which reduces the typeface selection for publications written in those scripts. CJK fonts are even so huge (usually > 10mb) that iBooks itself is using downloadable fonts.

I didn’t find the dev docs but here’s a stack overflow thread about it and a list of downloadable fonts up to iOS 10 can be found on iOS Font List.

It is my understanding that once the fonts are downloaded and cached, all apps can access and use them.

Add helper method to handle OPDS 1.x/2.0 parsing

Right now, OPDS parsers are in their own classes and there's no helper method that can handle that easily for you.

We should be able to simply call parse(URL) and let the parser decide if it's 1.x or 2.0 on its own.

EpubServer: Don't instantiate X handlers per epub being served

Currently, for each epub being served the EpubServer object creates 2 handlers, one for the manifest and one for the ressources .

As it is right now if it serves 20 epubs, there will be 40 handlers.

Instead, the server should only have 2 (or more, depending of the needs) handlers, and they should be called with a parameter (a hash or some id - TBD) to decide which ressource they serve.
The routing to the ressource would be made inside the handler() instead of being directly made in the URL.

That would also fix the following problem: when wanting to remove an Epub being served from the server, we don't have the id associated to the handlers serving it, hence we can't remove these handlers.

LCP: apps in "test" mode should refuse "production" licenses

An application compiled in LCP "test" mode should not try to open an LCP "production" license. But an application compiled in LCP "production" mode must open both "production" and "test" licenses.

LCP "test" licences are identified by "profile":"http://readium.org/lcp/basic-profile"
and LCP "production" licenses are identified by "profile":"http://readium.org/lcp/profile-1.0"

Therefore we need a compile-time trigger, that shows a message like "The Readium LCP profile expressed in this license cannot be processed by this application." if the profile value is not it the expected set:

  • "basic-profile" for apps compiled in "test" mode
  • "profile-1.0" for apps compiled in "production" mode.

Add support for Subtitles

In EPUB 3.0.x it's possible to indicate that a title is a subtitle:

<dc:title id="title_2">All About EPUB 3.1</dc:title>
<meta refines="#title_2" property="title-type">subtitle</meta>
<meta refines="#title_2" property="display-seq">2</meta>

A recent revision to the Readium Web Publication Manifest also added a subtitle element to play the same role.

We need to add support for subtitles in the streamer, using the same multi-lingual model as the title element.

Visible delay between app UI and web view when switching reading modes

Version is alpha-1.0.5 on iOS 11.4.3.

This appears to be a regression as it didn’t occur before. I can’t tell when it first appeared though.

When changing reading modes, there is quite a visible delay between the app UI and the web view. Background-color change for the app UI is instantaneous but the web view is lagging.

bug

That happened to be one main concern when dealing with the first implementation with Alexandre but everything went smoothly – there wasn’t such a discoordination between those components. So maybe that regression was introduced during a refacto?

Helper for search in OPDS 1.x

Search can be easily identified by looking at links and finding the first object where rel is set to search.

In the case of OPDS 1.x, we should probably have a helper func that does the following:

  • identify the proper object based on the rel
  • fetch the OpenSearch document and parse it
  • return a URI template for searching

We might also want a separate helper method that takes a keyword as an input and figures out on its own how to trigger the search in OPDS 1.x or 2.0 (different URI templates).

Bookshelf / library layout is not always correctly rendered

Layout of the bookshelf collection view is not correct when changing orientation in another tab:

  • Open the app in portrait mode
  • Navigate to the OPDS or About section
  • Rotate the device to landspace mode
  • Navigate back to the Bookshelf section

Publication's cover images must appears bigger, but it's not the case.
Still working fine if both orientation changes occur on the bookshelf tab.

Activating HTML5 controls can cause backward navigation

Clicking on some HTML5 forms control (e.g. checkbox, video control, etc.) often (but not always) causes the application to navigate backwards one page, i.e. going to the previous page. This can be seen easily in EPUB TestSuite 102. For example, tests inout-100 and input-110 are simple checkbox and radio-button tests. The controls render fine, but clicking on them almost always causes the app to navigate to the previous page.

Procedure:

  1. Open the test file (see above)
  2. Navigate to page with input-100
  3. Click on the check-box
  4. App goes to previous page.

Test Environment:
iPad 5, 16 GB
iOS 11.0.3
R2 Test App 0.2 (2)

[a11y] TOC nidification

The TOC doesn’t show the different levels of the elements (nidification)

Tested on iOS 11.3 with VoiceOver

Handle obfuscated fonts

Obfuscated font files are currently not deobfuscated by the fetcher.

The fetcher should debobfuscate the font data input stream before passing it to the HTTP server.

Information about which files are obfuscated and which encryption algorithm to use is in the encryption.xmlfile. Two encryption algorithms are possible: Adobe's or IDPF's, though the former is rarely used any more and should be implemented for backward compatibility.

Cover is clipped on EPUB TestSuite 130

The left-hand side of the cover for the TS 130 is clipped.

Procedure:

  1. Open the test file (see above)
  2. Navigate to title page
  3. Notice that the title page image is clipped.

Test Environment:
iPad 5, 16 GB
iOS 11.0.3
R2 Test App 1.0.3

screenshot

[a11y] Library view

When the user holds the book cover and on the screen appears the writing “Infos, Remove, Cancel”, the focus of VoiceOver doesn’t change thus making the buttons not accessible.

Tested on iOS 11.3 with VoiceOver

Add NCX and navigation lists parsing

The Navigation Document and the NCX parsing is currently not implemented.

The elements to parse are:

  • NCX Document

    • tableOfContent (toc)
    • page-list
  • Navigation Document

    • tableOfContent (toc)
    • page-list
    • landmarks
    • listOfIllustrations (loi)
    • listOfTables (lot)
    • [aborted] listOfAudioFiles (loa). No info about it on idpf.github.io
    • [aborted] listOfVideos (lov) No info about it on idpf.github.io

Navigation Document takes precedence over the NCX.

The Navigation Document itself should also be marked as such in the spine/resources collection of a publication (in our in-memory model), using rel="contents".

readium/go-toolkit#3

The app crashes if the cover is LCP encrypted

At least this is what I think. I have an LCP licence from TEA. The covers are temporarily encrypted (they will correct that asap). When I open the book, the cover that appear is "any" cover (for another book). When I try to open the book the app crashes.

Here is the license:
{"id":"d342bf51-0d4e-4d8a-94e6-e6d53fa90e28","issued":"2018-05-10T12:44:33+00:00","updated":"2018-05-10T12:44:33+00:00","provider":"https://www.tea-ebook.com/care/","encryption":{"profile":"http://readium.org/lcp/profile-1.0","content_key":{"encrypted_value":"uUtbFQi/mTJslst1jbwFNtIHgyJusWDJxJb6/1AxRKJk/HDfNWjoAUk6M2OxgWybFU6WUFRwIpr08cgnWxj4Lg==","algorithm":"http://www.w3.org/2001/04/xmlenc#aes256-cbc"},"user_key":{"text_hint":"Please enter your e-mail from your onleihe account","algorithm":"http://www.w3.org/2001/04/xmlenc#sha256","key_check":"rV+SgWZ0u/6jWJ3XoTTTtv6XyCSTjJKzy2zJeQmoVM0nrH/hb5OXIO4OAzh/z6l8chnQPBUggPkSuRaRh2Wcgg=="}},"links":[{"rel":"self","href":"https://care-test.onleihe.de/api/publications/cb2c291338fa7fb4464a6edd04b58df65d84d5c9dd1dcd7890678b962fcf21de/licenses/d342bf51-0d4e-4d8a-94e6-e6d53fa90e28/profiles/profile-1.0","type":"application/vnd.readium.lcp.license.v1.0+json"},{"rel":"publication","href":"http://dp1.onleihe.de/downloadprovider/epub/tea/cb2c291338fa7fb4464a6edd04b58df65d84d5c9dd1dcd7890678b962fcf21de.epub","type":"application/epub+zip","hash":"b58782f5f96db9f4f0af3dfb7af68449d72925269b1b2ea3c8845016a69ef84a","length":3629000},{"rel":"status","href":"https://care-test.onleihe.de/api/publications/cb2c291338fa7fb4464a6edd04b58df65d84d5c9dd1dcd7890678b962fcf21de/licenses/d342bf51-0d4e-4d8a-94e6-e6d53fa90e28/profiles/profile-1.0/status","type":"application/vnd.readium.license.status.v1.0+json"},{"rel":"hint","href":"https://aide.tea-ebook.com/","type":"text/html"},{"rel":"https://digital-content-care.com/resources","href":"https://care-test.onleihe.de/api/publications/cb2c291338fa7fb4464a6edd04b58df65d84d5c9dd1dcd7890678b962fcf21de/licenses/d342bf51-0d4e-4d8a-94e6-e6d53fa90e28/resources{?device_id}","templated":true,"type":"application/json"}],"user":{"id":"bob"},"signature":{"algorithm":"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256","certificate":"MIIDJzCCAg+gAwIBAgIJANCkn+ZzcSH1MA0GCSqGSIb3DQEBCwUAMEIxEzARBgNVBAoTCmVkcmxhYi5vcmcxFzAVBgNVBAsTDmVkcmxhYi5vcmcgTENQMRIwEAYDVQQDEwlFRFJMYWIgQ0EwHhcNMTcwNjEzMTEwNjU3WhcNMTkwNjEzMjM1OTU5WjBLMRMwEQYDVQQKEwplZHJsYWIub3JnMSYwJAYDVQQLEx1SZWFkaXVtIExDUCBMaWNlbnNlIFByb3ZpZGVyczEMMAoGA1UEAxMDVEVBMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAsgbyaxntdtGldtCedVjclIs8n5cjJBGpk9Sw0XRHG9qSDu8eYHoqQVtqxsUmMC6W0wy2SznAd9HzQ+oWbQ3Bj6YAgdOHLvmBmNshPv4tjxN0a3IjJ0n2rI4qz//LkQNMn5UwjS//m1hzgoYDOL7YXyf4CJ+dthirbEqgWHFIU5Lh1DijgZ4wgZswHwYDVR0jBBgwFoAU3Fz8k+Qfn+6wuupSCyvKUlzgyYcwHQYDVR0OBBYEFO72zcD0TY9GVKiCCD/YdYjMpj6KMA4GA1UdDwEB/wQEAwIHgDAJBgNVHRMEAjAAMD4GA1UdHwQ3MDUwM6AxoC+GLWh0dHA6Ly9jcmwuZWRybGFiLnRlbGVzZWMuZGUvcmwvRURSTGFiX0NBLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAbOodNE0HdbpHFHu7bs4QIWyAuyxVYGqKWDag9iW+3/lOSE4wj+HKa9qrpinsCjliOp+G4zyWvYAizYaAqlZdoHG0PdeZStvCpyjKPd+qrKi4gfwXFE8W3yzk5K/3+YlCdvPafx+yVafw6TDWz6ohyRQRLIden/a3MNB9of4LY/hvgLq20uhB/PNuEYXWGmg9jTU7JQV10W3e1M77VnspzAp9NRKR9S7YF6pxmEE2Qew3UDJH+JP/B5c0KraAgj//Nm8Nl6ZxXNlc0WWwXW5Q6S+etN9dnXIxQ6NWNwwv5iUpbD49KKzfctqShlnCkeVqCPS1FQOsoXg5zpTmCEGnTw==","value":"AZWE3hI3u4Z2zovMDvtAFM4vlYVEI1LTL5iWg0PNE2+iBvwOK/LqifoGDrDUkiPeUlQBIyY/4g2pasCx4Bxx4cvGAaXWRNoXqjv7sv9AqnW+Ycc9rGFbGPPZRCbSQKUybp0+4Xl6XJSyiX1/qhUewsXT4rMkTRbfItcIDyRaOPG6TqNV"}}

Missing license information

Now that the code is on the Readium repo, I'd like to make sure that all Readium-2 projects have a license associated to the code, ideally a very open one (MIT or BSD).

How can I set full-screen background image

There are two questions:
I try to set full-screen background image to each page of one chapter and the cover page. To do so, I set the Navigator full-screen, then the top bar and bottom bar just cover the Navigator. The first question is how to set the top/bottom margin of each page, since the top/bottom line of text is covered by the top/bottom bar content. Another question is about the background image. I use the css style "background-repeat: repeat-y;". It work well in Android with Readium SDK, but not work in iOS with R2.

Pages are missing content in EPUB Test Suite 130

The EPUB Test Suite 130 is intended to test support for RTL languages, especially Japanese (but also Hebrew and Arabic). Many pages in the test have sentences or paragraphs in Japanese ideographs. The actual rendered text is then followed by a bitmap showing what the text should look like (for those of us who can't read those languages :-) .
Unfortunately, the R2 Test App doesn't render the bitmaps. The Japanese and English text "Expected display image:" is rendered, but not the display image itself.

Test Environment:
iPad 5, 16 GB
iOS 11.0.3
R2 Test App 0.2 (2)

Origin is global (app level)

After a quick localStorage check, it appears the origin is shared for all publications, and you can retrieve and clear items set in one file from any other file.

It is my understanding it should be possible to scope it to each publication as most iOS Reading Apps I could test are currently doing it.

See Daniel’s doc for further details.

On a funnier note, I could also get all the console.log e.g. scrollToPosition, scrollToOffset, Touch sent to native code. We should probably remove those logs once the app is available in the app store (debug/prod etc.).

Incorrect LCP Certificate Revocation List URL (Distribution Point)

@llemeurfr @aferditamuriqi @clebeaupin

In R2 test apps, the URL is currently hard-coded as:
http://crl.edrlab.telesec.de/rl/EDRLab_CA.crl.

However, the "official" CRL Distribution Point embedded inside the app-provided ECDSA certificate for LCP 1.0-production profile is:
http://crl.edrlab.telesec.de/rl/Readium_LCP_Root_CA.crl

openssl x509 -noout -text -in cert.pem | grep -A 4 'CRL Distribution Points'
==>

X509v3 CRL Distribution Points: 

Full Name:
URI:http://crl.edrlab.telesec.de/rl/Readium_LCP_Root_CA.crl

There are three possible options:

  1. Change nothing. However, because of the URL inconsistency, there is a possibility that implementations in the LCP ecosystem rely on two different Certificate Revocation Lists, so it is crucial that both URL endpoints return the exact same payload. Laurent, does EDRLab directly control this, or is there an intermediary operator?
  2. Modify the CRL URL inside the certificate, so it matches the hard-coded URL inside R2 test apps. However, this would require re-compiling R1 and R2 apps (including the R2 native C++ LCP lib) in order to ship the updated cert PEM => this is a deployment nightmare, because vendors in the ecosystem will be very reluctant to do so, and it would be hard to enforce / check anyway.
  3. Modify the CRL URL that is currently hard-coded in R2 apps, so it matches the embedded Distribution Points URL inside the certificate => that is also a deployment headache, because there might be vendors who are already using a hard-coded URL, and it will hard to enforce that everything is up to date.

So, quite clearly, the most realistic option with the least overhead is number 1. In fact, this may already be solved, for example is one URL is just a redirect to the other! (Laurent?) :)

Note that Readium1 implementations (i.e. based on readium-lcp-client lib) extract the CRL Distribution Point URLs directly from the shipped certificate, so they use the "official" URL instead of an arbitrary hard-coded one. Code reference:

https://github.com/readium/readium-lcp-client/blob/e4c02fdd396157062b80dcd6b787a2c6a72a0da0/src/lcp-client-lib/Certificate.cpp#L134

Note that the RSA certificate for LCP basic-test profile does not contain any CRL Dsitribution Points.

Note that in Readium2 apps, the Base64-encoded certificate PEM is shipped as hard-coded data inside the native C++ LCP lib, whereas in Readium1 apps it is shipped at the app level / inside the app bundle, as a separate text resource.

Code references:

iOS-Swift:
https://github.com/readium/r2-testapp-swift/blob/0fe5624fa6134a17ef5ed320575b547433d9f16a/r2-testapp-swift/AppDelegate.swift#L469

Android-Kotlin:
https://github.com/readium/r2-testapp-kotlin/blob/7adfc5c42a0d6b1e8ada7f11e79f11ccaaecf9b6/r2-testapp/src/withlcp/java/org/readium/r2/testapp/CatalogActivity.kt#L208

Electron-NodeJS:
https://github.com/readium/r2-lcp-js/blob/0ddb51b46ae8d2233394f7ede46ee8f93c6a2851/src/parser/epub/lcp-certificate.ts#L8

(as you can see, I decided to align with iOS/Android apps, but I do reference the alternative URL as well .. just in case we need a reminder of it later)

[a11y] Visual Adjustment UI

We have found these issues with the Visual Adjustment UI:

  • Change font size: buttons are not tagged (VoiceOver reads "capital A" for both buttons)
  • Change brightness: button is not tagged
  • Magnify the UI: when the OS font size is set to the highest value, the button texts disappears

Tested on iOS 11.3 with VoiceOver

Add a JSONSchema validator

Add a JSON Schema validator and the associated test for testing the validity of the WebPubManifest output.

Add support for canonical form of the manifest

Most implementations of the streamer generate a pretty printed output of the Readium Web Publication Manifest.

To facilitate testing across implementations, we want to add a canonical output of that same manifest with the following rules:

remove all whitespaces between keys/values
alphanumeric sorting based on the keys
remove links
remove URI scheme & host (http://localhost:3692 for example)
We'll use the canonical query parameter to determinate when we should generate this canonical form: http://www.example.com/manifest.json?canonical=true.

Inject user settings in non-FXL HTML resources

Based on the work on a new user settings model, we'll also need to start injecting them as well at a streamer level.

As far as I can tell, this will only be the case for non-FXL resources, which means that before anything is injected we'll need to check:

  • if a specific resource is marked as FXL (in properties)
  • if the overall publication is marked as FXL

If we don't have a link-level helper for that, this would be a good time to implement something (for instance link.fxl? that returns a boolean).

Once we've established that a resource is HTML and non-FXL, we can then proceed to injecting these user settings.

I'll let @JayPanoz chime in on the best way of injecting these CSS Custom Properties but basically:

  • we'll use name for the CSS property name
  • and we'll use value for the CSS property value

Serializing this to CSS Custom Properties should be fairly trivial.

Support search in OPDS

Search is supported in most OPDS catalogs, but currently the app doesn't provide any affordance for it.

We need to add a search affordance either:

  • in the navigation bar
  • or using the new search field (only in iOS 11)

This is a good opportunity to improve handling in the parser as well.

Trigger Element is not supported

EPUBTEST 0100 - Reflowable Content Tests tests the trigger functionality in EPUB. This feature is apparently unimplemented. While this feature may be deprecated in EPUB 3.2 (when we get it done) but it was valid in EPUB 3.0.*.

To reproduce:

  1. Open the test file.
  2. Navigate to the specified test.
  3. Press the button.

Nothing happens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.