advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.32k stars 174 forks source link

[CBR] [Android] Add pinch-to-zoom for reading comics? #772

Open jvonhoff opened 1 year ago

jvonhoff commented 1 year ago

Is your feature request related to a problem? Please describe.

When reading CBR files, I'm unable to read any text because my phone (Pixel 5) displays the text so small I can't read it, and the app does not allow for pinch zooming.

Describe the solution you'd like

I want to either pinch to zoom, or maybe something fancier like "Page width". Maybe a "Smart zoom" where it basically breaks down each image into quadrants? Dunno.. I just want to be able to read the text! :)

Describe alternatives you've considered

Currently, my only other option on Android is to download the CBR with ABS, and then use a different CBR reader on my phone.

Additional context

ThomasMillochau commented 1 year ago

I am also interested in the zoom function on iOS and also on PDFs

GreatToCreate commented 1 year ago

Potentially related code solution to this problem. I fooled around with it (to no success) but for someone with a familiarity with the codebase/capacitor/Vue this might be trivially easy.

Other than creating a new plugin using the answer from this stackoverflow solution, I think head meta tag may need to be dynamically changed (setting user-scalable to yes and changing maximum-scale to somewhere between 2.5-5- not totally sure here) on pages expecting to support pinch zooming. This seems to be set on line 94 in nuxt/index.js (this may be incorrect but it's the only place I saw at a glance where the meta tag was set based on the accepted answer in the linked solution).

Media this would be useful enabling pinch-to-zoom for:

mmcmd commented 7 months ago

bump! this would be really great as I like to read the newspaper and it is currently really difficult on mobile

nichwall commented 7 months ago

Thanks for showing interest in the feature. The best way to show support for a feature request is by reacting with a "Thumbs up" to the initial message of the issue instead of just saying +1 or I also want this. When looking for new features, issues are sorted by the number of thumbs up reactions, not the number of notifications that an issue generated.

https://www.audiobookshelf.org/faq#i-have-a-feature-request-how-should-i-bring-this-up

KaiStarkk commented 4 weeks ago

I think the simplest solution might be to look at an alternative JS reader library like https://github.com/afzafri/Web-Comic-Reader for comics/manga.

Appears to be better suited for that use-case than epubjs, perhaps ABS could select the frontend based on filetype.

Then we just need to contribute to the upstream repo for "manga mode" and we'll have knocked off the other manga issue as well https://github.com/advplyr/audiobookshelf/issues/1274

advplyr commented 4 weeks ago

Epubjs isn't used for the comic reader. I did a custom implementation for that. One of the challenges with these readers is large comics with many large images. The extraction is all done client side and in memory. The benefit of doing that client side is it is easy to support offline reading.

Abs has a Reader component that has subcomponents for the different file types. Pdf, epub, comics

KaiStarkk commented 4 weeks ago

Ah cool. Will keep in mind

On Sat, 26 Oct 2024 at 9:46 PM, advplyr @.***> wrote:

Epubjs isn't used for the comic reader. I did a custom implementation for that. One of the challenges with these readers is large comics with many large images. The extraction is all done client side and in memory. The benefit of doing that client side is it is easy to support offline reading.

Abs has a Reader component that has subcomponents for the different file types. Pdf, epub, comics

— Reply to this email directly, view it on GitHub https://github.com/advplyr/audiobookshelf-app/issues/772#issuecomment-2439589361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANENUDUP2LA72JR45SHOSLZ5OML3AVCNFSM6AAAAABQURQ4TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGU4DSMZWGE . You are receiving this because you commented.Message ID: @.***>