-
Notifications
You must be signed in to change notification settings - Fork 7
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
Embed API #118
Comments
Something like this?
We could also pass default settings:
|
This is a good idea. Then people could use it to post a link to a comic, or embed the reader in another web app. Cool. |
@workhorsy I did some work on this, Here is the current usage: Main url ( show / navigate to reader )Load comic ( url / blob to archive file)If no file is provided it should show the
Page number ( set initial page: default to 1 ) |
Does it work with loading files? I tried
and it does not load. It still loads the test images. Is it hooked up to loading files from cbz yet? |
@workhorsy do a I tried to use the uncompress download example but isn't working 😕
|
@workhorsy Any ideas? Post message (start uncompress)https://github.com/btzr-io/comic_book_reader/blob/preact/src/routes/viewer/view.jsx#L42 The Workerhttps://github.com/btzr-io/comic_book_reader/blob/preact/src/routes/viewer/lib/uncompress.worker.js |
I'll see if I can figure it out. I might be able to squeeze in some time in the morning. |
Looks like zip is working:
but not rar:
|
I think I've got it figured out. The problem is that the worker calls loadArchiveFormats(['rar', 'zip', 'tar']) to start loading the compression formats. But the view starts sending it messages before loadArchiveFormats is done. You need the worker to send a signal to the view when it is done with loadArchiveFormats. |
Here is a PR to fix this. I should probably update the uncompress.js worker example to do this too. It looks like a usability bug. Now this should work http://localhost:8080/#/reader?file=http://localhost:8080/test/example.cbr |
Great thanks!, I'll merge this ASAP. |
Here is the live demo (at least now it's working): |
Embed api to integrate on other websites and apps.
@workhorsy See: lbryio/lbry-desktop#1377
The text was updated successfully, but these errors were encountered: