-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add subtitle sync ui for easy alignment #6735
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
base: master
Are you sure you want to change the base?
feat: Add subtitle sync ui for easy alignment #6735
Conversation
Cloudflare Pages deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This only works with "custom subtitle element" (doesn't work in Chrome) and obviously only for text (SRT) subtitles.
- We probably should update the subtitles timeline on
timeupdate
. - IMO, the timeline is too close to the offset slider, which makes you think they are tied.
- Too long for mobile.
Do you have recommendations for 1? I am also open to some guidance on 2. I tried a bunch of things, but I feel like there is an efficient solution my lack of FE knowledge eludes me from. |
When we use native API: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/textTracks
Ideally, we should use jellyfin-web/src/controllers/lyrics.js Lines 162 to 189 in c9ccec8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, does this mean that platforms like WebOS wouldn't be able to use this implementation? I presume WebOS uses a chromiom browser.
…ure and improved UI interactions
…y and adjust styling for improved layout
…ary offset fallback
…nto dedicated classes for timeline and offset management, enhancing readability and maintainability
…arameters and simplifying timing calculations
…simplify subtitle sync logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint doesn't pass. Please fix all ESLint issues.
Still have to think a bit about the realtime updates, the problem is getting a smooth timeline. Updating current implementation on every timeupdate results in the timeline moving choppily every second. I need to increase the resolution for the percentage calculations or add a css transition or something, but I am not sure yet |
…or improved playback event handling and timeline updates
… and improve timeline update logic
…t methods and utilizing onPlayerTimeUpdate for visualization
I tried to implement a smooth scroll, but I just give up. I think this provides the value I would like it to provide. And even though the playback rendering is a bit janky, probably better than not having it at all. |
…ogic from SubtitleTimeline class
…t retrieval in SubtitleTimeline class
…ubtitle event retrieval for improved clarity and functionality in SubtitleTimeline class
…lass to streamline subtitle retrieval logic
…improve code cleanliness
@dmitrylyzo thoughts? |
Absolutely incredible |
…ne class to enhance code clarity
@dmitrylyzo Added screenshots from Firefox, Chrome, WebOS browser. Added realtime update ability and a video from Chrome showing that the changes are accurate with the realtime rendering. Changed the styling to better match Jellyfin Web style. I believe with SSA/ASS and PGS, the subtitle offset menu does not even show up (I tried with PGS and DVD SUB, neither showed the menu), but if it did, the timeline would be hidden. |
@dmitrylyzo Would love to learn what types of tests or proof I could add to make this easier to review for the team. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
As before, I think the timeline is too close to the offset slider, which makes you think they are tied.
Close:
Split:
-
My biggest concern right now is intermediate refactoring. I prefer to do refactoring first and then add the feature. Ideally, we should make commits atomic. If no one has any objections to the current commit sequence, so be it.
Ah, thanks for the clarification. I thought you meant that the current time marker itself was too close to the button (which it was), but "split" looks much better
I see. Let me try a stacked approach, I am thinking a PR (or commit?) to refactor the original into OffsetController and the SubtitleSync object, and another one to add the timeline view. Does that sound good to you? |
…f 0 for improved compatibility with Firefox element attachment.
…eline for improved code clarity and maintainability. The new method consolidates the logic for fetching subtitle events from both Jellyfin and VTT cues.
…responsiveness. Adjusted margins, padding, and dimensions for better alignment and user experience.
|
Changes
chrome_reactive.mp4
Issues
#4364