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

Migrate TtsPlugin to BookReaderPlugin #1376

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

cdrini
Copy link
Contributor

@cdrini cdrini commented Feb 1, 2025

Blocked by #1374 , so ignore the autoplay files in this diff

Breaking Changes:

  • All root-level BookReader tts methods/fields, eg BookReader#ttsToggle, BookReader#ttsScrollToChunk, BookReader#ttsStart, etc, have all been moved to e.g. br._plugins.tts.toggle. That is they are now on the TtsPlugin class, and no longer have the tts as in ttsStart.
  • The option enableTtsPlugin has been renamed to plugins.tts.enabled
  • The options server and bookPath have been replaced with pageChunkUrl StringWithVars. This makes the page chunk URL configurable for other clients.

@cdrini cdrini added the blocked label Feb 1, 2025
Copy link

codecov bot commented Feb 1, 2025

Codecov Report

Attention: Patch coverage is 68.35443% with 25 lines in your changes missing coverage. Please review.

Project coverage is 69.22%. Comparing base (c067962) to head (9a2e689).

Files with missing lines Patch % Lines
src/plugins/plugin.autoplay.js 70.83% 14 Missing ⚠️
src/BookReader.js 70.00% 5 Missing and 1 partial ⚠️
src/BookReader/Mode2UpLit.js 0.00% 2 Missing ⚠️
src/plugins/tts/PageChunk.js 0.00% 1 Missing ⚠️
src/plugins/tts/PageChunkIterator.js 0.00% 1 Missing ⚠️
src/plugins/url/plugin.url.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1376      +/-   ##
==========================================
- Coverage   69.25%   69.22%   -0.03%     
==========================================
  Files          60       60              
  Lines        5135     5150      +15     
  Branches     1087     1102      +15     
==========================================
+ Hits         3556     3565       +9     
- Misses       1550     1555       +5     
- Partials       29       30       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cdrini cdrini force-pushed the refactor/tts-br-plugin branch from c292184 to 9a2e689 Compare February 1, 2025 01:57
The threshold field is already in percentage, it doesn't need to be /100
@cdrini cdrini marked this pull request as ready for review February 1, 2025 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant