feat: preview thumbnail when hovering over seek bar#852
feat: preview thumbnail when hovering over seek bar#852RonzyOnGIT wants to merge 12 commits intokillergerbah:mainfrom
Conversation
|
Thanks @RonzyOnGIT this is pretty cool
|
Thanks for taking a look at it! 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. |
Of these options, I think it might be best to either:
The other options look pretty hairy to implement, as you need to consider how to calculate the intersection between the thumbnail and the subtitles.
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. |
|
Sorry for the slow update 🙏😔. Fixes
Things to work on
I’ll try to monitor memory usage and report on it in future updates — just wanted to share a quick progress update. |
| subtitleCustomStyles, | ||
| subtitleBlur, | ||
| subtitleAlignment, | ||
| subtitleAboveThumbnail |
There was a problem hiding this comment.
This feels more like a misc setting then a subtitle appearance setting. Subtitle appearance settings are track-specific and I'm not sure if it makes sense to offer per-track granularity for this new setting.
common/settings/settings.ts
Outdated
| app = 'app', | ||
| } | ||
|
|
||
| export type SubtitleAboveThumbnail = boolean; |
There was a problem hiding this comment.
Curious why you decided to create another type instead of just using boolean?
There was a problem hiding this comment.
Curious why you decided to create another type instead of just using
boolean?
I was just trying to keep it consistent, since I implemented it in Layout and subtitleAlignment had its own type. I'll move it to misc and probably just keep it as a plain boolean type.
| </FormControl> | ||
| )} | ||
|
|
||
| {subtitleAboveThumbnail !== undefined && ( |
There was a problem hiding this comment.
Wherever you put this you'll need to hide this behind insideApp
There was a problem hiding this comment.
Could you clarify why it needs to be behind insideApp? Is it to like prevent any other clashes if its not in the app or something?
There was a problem hiding this comment.
The preview only matters for the local video player available on the website, so displaying the setting from the extension settings might be confusing to the user
cea9be8 to
9064e53
Compare
Fixes
Memory reportNo surprise, there is a noticeable memory increase. On average I tracked an overall increase of ~50% in memory usage. I used various files ranging from I tested in chromium using the task manager to track memory usage. A large part of the memory increase is of course the second video element. The cache to store the screenshots only makes up about 7% of this increase. For reference, a 1.1gb video file without the feature peaks at around Notes
|

What this does
Notes | limitations
Found cached image and accurate frame
First cache miss, the whole cache is empty
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