Skip to content

Conversation

@RonzyOnGIT
Copy link

What this does

  • Shows little preview thumbnail when hovering over seekbar
  • Thumbnails are cached in 4-second intervals
  • Used refs to avoid unnecessary re-renders during hover

Notes | limitations

  • Only for desktop version for this iteration.
  • Tested on Chromium-based browsers (Chrome, Thorium)
  • Tested on firefox as well but it does not work on firefox for some video files. For future iterations, I can just remove this feature entirely for unsupported browsers
  • There is definitely room for optimization such as dynamic intervals depending on length of video to save space and different img formats for smaller sizes.
Screenshot from 2026-01-06 21-14-10

Found cached image and accurate frame

Screenshot from 2026-01-06 21-18-46

First cache miss, the whole cache is empty


Screenshot from 2026-01-06 21-32-59

When you hover along the seekbar fast, shows last found cached image. Since there is no re-render, will not show the correct thumbnail unless you re-hover after image is rendered

@killergerbah
Copy link
Owner

Thanks @RonzyOnGIT this is pretty cool
Just have two main concerns that I don't really have an answer for atm:

  • Wonder how this will affect memory usage, since there are now two videos autoloading the same thing. Seeking also adds some IO and potential memory usage as well.
  • I don't think the thumbnail should display above the subtitles. But if we let the subtitles float on top, it might not look good.

@RonzyOnGIT
Copy link
Author

Thanks @RonzyOnGIT this is pretty cool Just have two main concerns that I don't really have an answer for atm:

* Wonder how this will affect memory usage, since there are now two videos autoloading the same thing. Seeking also adds some IO and potential memory usage as well.

* I don't think the thumbnail should display above the subtitles. But if we let the subtitles float on top, it might not look good.

Thanks for taking a look at it!
I also was unsure of how to handle subtitles and thumbnails overlapping. One potential solution would be to add a setting so that the user can choose how overlap is handled— for example: moving subtitles up, hiding the thumbnail, or allowing it to cover subtitles.

Regarding memory usage, one alternative I had in mind was creating a pre-generated sprite sheet, completely removing the need for a second video file. The issue with that is that there would be a need for a server to handle the video processing such as ffmpeg to generate frames.

I really love this project — thanks for all the work you’ve put into it. I’m excited to keep contributing where I can. I'll mark the pr as a draft for now.

@RonzyOnGIT RonzyOnGIT marked this pull request as draft January 11, 2026 23:19
@killergerbah
Copy link
Owner

I also was unsure of how to handle subtitles and thumbnails overlapping. One potential solution would be to add a setting so that the user can choose how overlap is handled— for example: moving subtitles up, hiding the thumbnail, or allowing it to cover subtitles.

Of these options, I think it might be best to either:

  • No setting, thumbnail below subtitles
  • Setting to control whether thumbnail is above or below

The other options look pretty hairy to implement, as you need to consider how to calculate the intersection between the thumbnail and the subtitles.

Regarding memory usage, one alternative I had in mind was creating a pre-generated sprite sheet, completely removing the need for a second video file. The issue with that is that there would be a need for a server to handle the video processing such as ffmpeg to generate frames.

I think I just need to profile on different browsers. The memory usage is probably not a big deal and maybe we could add a setting to disable the thumbnail entirely.

ShanaryS and others added 8 commits February 1, 2026 18:34
* feat(dictionary): cache tokens in IndexedDB

* use anki decks in addition to anki fields

* use DictionaryProvider

* update DictionaryProvider subscription api and cleanup code

* remove _updateSuspendedCards() and cleanup code

* Anki cache build state updates are structured

---------

Co-authored-by: R-J Lim <kgerbil@gmail.com>
* export/import local tokens

* collect tokens locally based on hovered element

* import words from clipboard

* support ignored

* add more helper text for buildAnkiCache and disable if no tracks are enabled

* highlight token on hover

* return objects for dictionary query results
* add support for iWantTFC

* add icon and some page settings

* Fix formatting with prettier

* Thank new contributor danthemango

---------

Co-authored-by: R-J Lim <kgerbil@gmail.com>
* Rearrange annotation settings

* Address feedback + additional changes to import dialog

- Moved word DB buttons back to top
- Removed track selector from import dialog because local tokens are
  trackless
- Maturity + state inputs are displayed lazily, after previewing, since
  those options are not applied to 'import from file'

* Restore track selector as 'yomitan api URL' selector in import dialog

* Only lemmatize if imported record does not already have lemmas

* Address feedback

- split clipboard string before tokenize bulk
- use Partial<DictionaryTokenRecord>
- lemmatize imported file records only if lemmas are missing

* Fix keyboard shortcut tab not scrolling when navigated to from dictionary settings
Co-authored-by: killergerbah <2254858+killergerbah@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants