Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readium-js-viewer: Upload of books hangs #765

Open
mrichtarsky opened this issue Oct 21, 2022 · 2 comments
Open

readium-js-viewer: Upload of books hangs #765

mrichtarsky opened this issue Oct 21, 2022 · 2 comments

Comments

@mrichtarsky
Copy link

This issue is a Bug

Expected Behaviour

Book is displayed

Observed behaviour

Dialog hangs at "Examining EPUB content..."

Reason seems to be failure of this request:
GET https://readium-master.surge.sh/READIUMWORKER.js
Status 404 Not Found

Steps to reproduce

  1. Go to https://readium.firebaseapp.com or https://readium-master.surge.sh
  2. Click on '+' and upload a local epub file (affects all I tested)

Product

readium-js-viewer
Tested with Chrome on Windows and Android

Additional information

I'm looking for an epub reader that integrates with Hypothesis, and works on Android. Readium fits the bill. Everything works as expected, except for uploading my own epub books. I realize that this app here is no longer maintained, but still wonder whether I could make that work, even via self hosting? From my understanding, there is no Readium-based alternative to it yet. From the architecture repo I gather that you are working on new versions for mobile and web, but there's nothing consumable yet. I found a list of apps for Android that are based on readium but all of these are apps for public libraries and do not appear to support uploading my own epub books.

Any help/pointers would be appreciated!

@danielweck
Copy link
Member

danielweck commented Oct 21, 2022

Hello, I don't have a clear answer but here are code pointers:

'workerUrl': config.workerUrl || "/READIUMWORKER.js",

'workerUrl': HTTPServerRootFolder + '/src/chrome-app/readium-worker.js',

'workerUrl': '/scripts/readium-js-viewer_CHROMEAPP-WORKER.js',

'workerUrl': undefined,

'workerUrl': undefined,

@danielweck
Copy link
Member

Ah, it's coming back to me! The "+" ("plus") button import is functional only in the now-defunct Google Chrome App which had a storage backend (HTML FileSystem API). Conversely, drag & drop works but this is an extremely limited service because the whole EPUB archive is loaded in memory which breaks a number of web APIs such as the ability to stream audio playback etc. There are also caveats with obfuscated fonts but I can't remember the details from the top of my head.
Ideally you would need to write a proper storage backend adapter for your Android app and expose it via hooks similar to the ones implemented in the Chrome App.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants