Skip to content

Migrate TtsPlugin to BookReaderPlugin#1376

Merged
cdrini merged 5 commits intointernetarchive:masterfrom
cdrini:refactor/tts-br-plugin
Feb 19, 2025
Merged

Migrate TtsPlugin to BookReaderPlugin#1376
cdrini merged 5 commits intointernetarchive:masterfrom
cdrini:refactor/tts-br-plugin

Conversation

@cdrini
Copy link
Copy Markdown
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
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 1, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.28%. Comparing base (2f53120) to head (15c2eb2).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/BookReader.js 75.00% 0 Missing and 1 partial ⚠️
src/plugins/tts/PageChunk.js 0.00% 1 Missing ⚠️
src/plugins/tts/PageChunkIterator.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1376      +/-   ##
==========================================
+ Coverage   69.21%   69.28%   +0.06%     
==========================================
  Files          60       60              
  Lines        5146     5150       +4     
  Branches     1102     1103       +1     
==========================================
+ Hits         3562     3568       +6     
+ Misses       1555     1552       -3     
- 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
@cdrini cdrini marked this pull request as ready for review February 1, 2025 02:09
@cdrini cdrini force-pushed the refactor/tts-br-plugin branch from cbe933a to 4f9c9a6 Compare February 19, 2025 20:27
- Breaking change: TTS `server` and `bookPath` options replaced with `pageChunkUrl` StringWithVars
The threshold field is already in percentage, it doesn't need to be /100
@cdrini cdrini force-pushed the refactor/tts-br-plugin branch from 4f9c9a6 to 15c2eb2 Compare February 19, 2025 21:04
@cdrini cdrini merged commit 22db6a5 into internetarchive:master Feb 19, 2025
@cdrini cdrini deleted the refactor/tts-br-plugin branch February 19, 2025 21:18
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