Skip to content
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

Add option to automatically disable captions in lyrics/karaoke videos #1235 #2147

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

ThomSipkens
Copy link
Contributor

I've added an option that toggles captions when a Lyrics/karaoke video is detected. This fixes #1235 . Should note, that with most music videos, the captions get automatically disabled anyways, but this is extra for whenever it has not been configured.

@ImprovedTube ImprovedTube merged commit 9240c71 into code-charity:master Apr 3, 2024
ImprovedTube added a commit that referenced this pull request Apr 3, 2024
@ImprovedTube
Copy link
Member

welcome and thanks! @ThomSipkens

player.toggleSubtitles();

will it have an effect on following videos?

alternative: we can move the titles out of view (or hide them)

var captionElements = document.querySelectorAll('.captions-text .ytp-caption-segment');

@ThomSipkens
Copy link
Contributor Author

Hey, that is a very good point about the effect on following videos. The feature is designed with the idea of having the captions enabled through the extension, making any effect of this feature undone after the video ends. Considering the users are already using the captions in the extension to begin with, I would assume that mostly there should be no problem. However, there can be a small use-case where the captions were turned on manually, the extension has captions not enabled and the disable caption for lyrics is enabled. One way to fix this, could be to make the new feature only applicable when captions are also enabled. Another option is to find a way to undo the effects anyway, regardless of any setting.

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.

Whitelist/blacklist for captions: lyric videos; karaokee; subtitled movies
2 participants