Skip to content

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

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2f41f43
feat: subtitle sync ui
armanckeser Apr 10, 2025
ae232b7
refactor: improve timeline marker generation and event rendering logic
armanckeser Apr 10, 2025
f4fc475
style: update timeline marker pseudo-element and clean up SCSS code
armanckeser Apr 10, 2025
dcdf04b
chore: trigger Build
armanckeser Apr 10, 2025
52854de
fix: replace hardcoded tick conversion with constant for subtitle tim…
armanckeser Apr 10, 2025
3346df6
refactor: remove unused HTML stripping function and simplify subtitle…
armanckeser Apr 10, 2025
c6307cf
refactor: move currentOffset out
armanckeser Apr 10, 2025
81f1fe8
refactor: enhance subtitle sync functionality with class-based struct…
armanckeser Apr 10, 2025
1955b69
refactor: update subtitle sync component to handle timeline visibilit…
armanckeser Apr 10, 2025
9cdd665
refactor: simplify renderSubtitleTimeline method by removing unnecess…
armanckeser Apr 11, 2025
a9458b9
refactor: restructure SubtitleSync component by separating concerns i…
armanckeser Apr 11, 2025
69344a6
refactor: streamline event rendering by removing unnecessary offset p…
armanckeser Apr 11, 2025
3f69c9e
refactor: remove offset parameter from _handleOffsetChange method to …
armanckeser Apr 11, 2025
7e01aeb
refactor: extend SubtitleSync class to integrate PlaybackSubscriber f…
armanckeser Apr 11, 2025
3a7ada4
refactor: enhance SubtitleTimeline class with playback event handling…
armanckeser Apr 11, 2025
46ae48e
refactor: consolidate timeline update logic by removing playback even…
armanckeser Apr 12, 2025
c58f86b
refactor: simplify event element creation by removing current event l…
armanckeser Apr 12, 2025
753355a
refactor: remove unused animationFrameId and streamline subtitle even…
armanckeser Apr 12, 2025
2ea5602
refactor: rename currentTrackEvents to currentSubtitles and enhance s…
armanckeser Apr 12, 2025
3070f28
refactor: remove fallback to native text tracks in SubtitleTimeline c…
armanckeser Apr 12, 2025
38b00b3
refactor: remove unnecessary blank line in SubtitleTimeline class to …
armanckeser Apr 12, 2025
cf01ee2
refactor: remove unused timeline update method call in SubtitleTimeli…
armanckeser Apr 18, 2025
2c2a9f7
style: update subtitle sync styles for improved readability and aesth…
armanckeser Apr 18, 2025
dcd0758
Merge branch 'master' into armanc/add-subtitle-sync-ui
armanckeser Apr 26, 2025
7b7c0dd
Refactor DOM_INIT_DELAY in OffsetController to use a constant value o…
armanckeser Apr 30, 2025
eb2f92a
refactor: subtitle event retrieval in PlaybackManager and SubtitleTim…
armanckeser Apr 30, 2025
5d7d87e
style: update subtitle sync component styles for improved layout and …
armanckeser Apr 30, 2025
98b4af8
Merge branch 'master' into armanc/add-subtitle-sync-ui
armanckeser Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,17 @@ export class PlaybackManager {
return index !== -1 && self.isSubtitleStreamExternal(index, player);
};

self.getCurrentSubtitleTrackEvents = function (player) {
player = player || self._currentPlayer;
// Try to get events using the new method
if (player && player.getCurrentTrackEvents) {
const events = player.getCurrentTrackEvents();
if (events && events.length) {
return events;
}
}
};

self.seek = function (ticks, player) {
ticks = Math.max(0, ticks);

Expand Down
Loading
Loading