Giter Club home page Giter Club logo

iridium's People

Contributors

838 avatar ferraridamiano avatar imgbotapp avatar jaded0 avatar jideguru avatar jmgeffroy avatar kordonez avatar m-abs avatar parthpanchal123 avatar restyled-commits avatar sorich87 avatar tosif91 avatar yteitel 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

Watchers

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

iridium's Issues

reader widget not showing TOC

Hello,
i want to inform you dear developer, that the newer iridium reader widget is not showing table of content from two diferent epub files.
i can see bookmarks but not the TOC.
thanks,
Tayeb.

Any plan to porting Navigator to flutter?

I’ve just tested display an epub using flutter webview, but it has some issues about rendering and performance. Do you have any plans about porting Navigator to Flutter?

[navigator] Style issues

In some epubs, publisher's styles seem to be overridden. Example:

  • 39419251_rtl.epub: chapter titles should be dark red / brown but appear black
    • in R2-based app:
      tempFileForShare_20220209-165158

    • in Iridium:

tempFileForShare_20220209-165050

Gestures not working

Hi,

I'm creating an epub reader app using your marvelous reader widget; everything is working fine on emulator; but when installing the app on a real device the reader stops responding to touches;
When i set PreloadPageViewer scrollDirection to vertical it will work but webview will still scroll horizontally which looks rather weird.
I've tried this on multiple android devices, all with same results.

I hope you have a lead on this issue.

Thanks,

Saleh

Persistant highlights, bookmarks, etc in widget.

Hi guys, sorry for the basic question. But so far whatever I do on the book seems to be stored in memory only, I would like to know if the widget has any callbacks to when the user highlights a text for example. Or how is it stored in the app because I noticed that while I remain inside the book, even if I move to a different document inside it the highlight remains stored somewhere and redrawn when I go back to the chapter.

Thanks for you help!

[navigator] Investigate lazy loading in 1 WebView only

Idea:

  • create 1 div per nav element
  • lazy load each item

Expected benefit: getting lightning-fast global fling across the whole book, like in Google Play or Kindle apps.

Intersection observers can potentially help:

Note that many items could be loaded in advance (and why not the whole book...)

Reader widget settings: A RenderFlex overflowed by 6.2 pixels on the right

Hello,
while trying the reader widget, i discovered the following warning, i thought i create a issue for it so it can be fixed later:
this is the full debug message.
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during layout:
A RenderFlex overflowed by 6.2 pixels on the right.

The relevant error-causing widget was:
ToggleButtons
ToggleButtons:file:///D:/projects/flutter/iridium_reader_widget/lib/views/viewers/ui/settings/general_settings_panel.d
art:97:35

To inspect this widget in Flutter DevTools, visit:
http://127.0.0.1:9100/#/inspector?uri=http%3A%2F%2F127.0.0.1%3A36638%2FmPMTs3Odx6k%3D%2F&inspectorRef=inspector-0

The overflowing RenderFlex has an orientation of Axis.horizontal.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be
seen. If the content is legitimately bigger than the available space, consider clipping it with a
ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
like a ListView.
The specific RenderFlex in question is: RenderFlex#24fbb relayoutBoundary=up3 OVERFLOWING:
needs compositing
creator: Row ← IntrinsicHeight ← _InputPadding ← ToggleButtons ← Column ← Padding ←
GeneralSettingsPanel ← KeyedSubtree-[<0>] ← RepaintBoundary ← IndexedSemantics ←
NotificationListener ← KeepAlive ← ⋯
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=189.8, h=50.0)
size: Size(189.8, 50.0)
direction: horizontal
mainAxisAlignment: start
mainAxisSize: min
crossAxisAlignment: stretch
textDirection: ltr
verticalDirection: down
i recomand using Checkboxs for the toggles, buttons itself is not good for users with disability using screen readers.

iOS: FormatException: Unexpected extension byte (at offset 6) when downloading a book

2023-01-18 15:27:06.194849+0000 Runner[1054:397525] flutter: D	DetailsProvider.startDownload:	 path: /var/mobile/Containers/Data/Application/79A438D5-2030-4C5B-9B38-5D8D5E399B02/Documents/Alice's_Adventures_in_Wonderland.epub
2023-01-18 15:27:06.217247+0000 Runner[1054:397525] flutter: D	_DownloadAlertState.download:	 Downloading: https://catalog.feedbooks.com/book/22.epub
2023-01-18 15:27:07.599743+0000 Runner[1054:397525] [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected extension byte (at offset 6)
2023-01-18 15:27:07.600013+0000 Runner[1054:397525] [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected extension byte (at offset 6)

Unsupported operation: Infinity or NaN toInt

I am getting this error while download a epub from URL(http://app.sristisukh.com/uploaded/epubfiles/aprakrito_2_epub.epub).
I have directly added the above URL in your demo project IRIdium. there also the error is coming.

Error is coming in the Constants class
static formatBytes(bytes, decimals) {
if (bytes == 0) return 0.0;
var k = 1024,
dm = decimals <= 0 ? 0 : decimals,
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = (log(bytes) / log(k)).floor();
return (((bytes / pow(k, i)).toStringAsFixed(dm)) + ' ' + sizes[i]);
}

HELP -----

PreloadPageView poor performance with PlatformView

Congratulation for the implement Readium by Flutter.

I have tried to implement in flutter but I was disappointed about performance of flutter webview and platformview could not be cache.

With the new navigator (the PreloadPageView will frozen the screen and only display blank white screen, i have to change it to PageView to run the demo), it runs okay on android but on ios device, the hoz gesture could not fired when reach the end of a chapter, I have to swipe from top right to bottom left if want go to next chapter or swipe from left bottom to top right if want go to prev chapter. (I think ios PageView used BouncingScrollPhysics by default and android PageView use ClampingScrollPhysics)

The demo clip

IMG_0326.MP4

And this is the native swift readium I have implemented for my client, it runs so smooth compare to flutter, but I prefer flutter than, waiting for flutter team improve the performance of platform view.

IMG_0325.MP4

Unable to clone

Hey! So I'm trying to clone the source code to possibly contribute but receive this error when trying:

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:Mantano/mno_lcp_native' into submodule path '/home/joshu/projects/iridium/mno_lcp_native' failed
Failed to clone 'mno_lcp_native' a second time, aborting

I run the command found on the readme, some help would be appreciated! Thanks.

[server] Remove the HTTP server (like in Bookari)

Removing the HTTP server has a lot of positive consequences:

  • The contents is no longer accessible to other apps
  • Requests responses are no longer serialized, and this provides a huge boost in performances (99% of the time is spent in this serialization, according to recent profiling).

This performance boost can easily be perceived when navigating with the ToC or progressbar in a book which contains its own fonts, or many image assets. In this area:

  • Google Play Books, Kindle, Colibrio, Moon Reader, FB Reader and Bookari are extremely fast in this use-case. Most of them don't use the same technology as Readium and Iridium do (webviews+HTTP servers), however. But Bookari does rely on WebViews. Bookari only starts a HTTP server if the device is running Android < API level 24:
    • On android 4.x because the WebResource API did not exist
    • On Android 5 and 6 because audio files are not read
  • Readium, Iridium, and other Readium-based apps have strong performance issues there.

For Iridium, we don't need to take care of Android <= 6, but we'll maintain the ability to start the HTTP server for different usages, such as client-server deployments (some adaptations will be required for his use-case but are worth investigating).

Thanks to the migration to Flutter InAppWebView, we have everything we need:
https://pub.dev/documentation/flutter_inappwebview/latest/flutter_inappwebview/WebView/onLoadResourceCustomScheme.html

onLoadResourceCustomScheme is an InAppWebView cross-platform option, so it should be OK on both Android and iOS...

Note: See in Bookari (Mantano private repo)

  • EpubWebViewClient.shouldInterceptRequest
  • Epub3WebViewFragment.mustRunServer

See also:

Custom bookmark name

Hello,
while adding a bookmark from the iridium reader widget, we also need to have a custom name to that bookmark.
let's say, we have 10 bookmarks from a large ebook, there's no such way to diferentiate them.
a custom name would be great to be able to make such diference.

Navigator - Epub Reflow Core

This Epic covers the basics of displaying a reflowable Epub:

  • Swiping between pages and chapters,
  • Navigate through the Navigation panel
  • Bookmarks
  • Reopen book at last reading position

Crash when reactivating the app after switching to another

I/SurfaceView(11847): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{b0628ab V.E...... ........ 0,0-1080,2154} of ViewRootImpl@ae32fc1[MainActivity]
I/SurfaceView(11847): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{b0628ab V.E...... ........ 0,0-1080,2154}
D/AndroidRuntime(11847): Shutting down VM
E/AndroidRuntime(11847): FATAL EXCEPTION: main
E/AndroidRuntime(11847): Process: com.mantano.iridium.IridiumApp, PID: 11847
E/AndroidRuntime(11847): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.dispatchWindowVisibilityChanged(int)' on a null object reference
E

IPA link down

The test app for ios is unavailable.
Could you upload it somewhere or add it as an asset here to the repo?

[navigator] Epub: Prevent fling when reading

Swiping slightly too fast makes the fling gesture kick-off and turn many pages. It is convenient when quickly browsing through the entire book, but not when reading.
As a consequence, we'll:

  • Disable it when reading
  • Enable it when the toolbar (which includes the progressbar) is visible.

Implementation: simply add scroll-snap-stop: always; to xpub_page_overlay. Set the value (always | normal) through a variable in order to easily change it dynamically when showing / hiding the progressbar.

Spec here.

Reading_Widget: Caching extracted epubs

Hello,
if i understand correctly, you're using objectdb to save & manage bookmarks in the reader widget.
extracting a huge epub file might take lot of time, i tryed one very huge book and didnt extract maybe i didnt wait much ;)
but, what i want to suggest is if is it pocible to extract the epub file one time and if reopening it, read from the extracted data saved in the private app directory.
maybe we can assign a uuid to each .epub file opened with the widget, or something similar, then when reopening it try to read from cached data.
making caching as an argument would be also good, maybe some small books dont need to be cached, try checking "Reasily android app, it have two modes, open, and import.
if chousing import, the book will be cached and reopened very quickly.
if chousing open only, the book wont be cached, would be reparsed when reopened later.
i hope my explanations is clear.

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.