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

Youtube-like rendering mode shift contents but keeps an empty background #13

Open
alexandercerutti opened this issue Jan 7, 2024 · 0 comments
Labels

Comments

@alexandercerutti
Copy link
Owner

According to the image below, the Youtube-like rendering mode (which consists of shifting down the first line, when the mode is enabled), shifts down the content but maintains an empty line (which is utterly ugly and wrong).

immagine

This probably happens because translateY is applied to the wrong element.

To enable the Youtube-like mode, sample's script.mjs should be edited to add the following lines on the bottom of the file.

/**
 * @type {CaptionsRenderer}
 */

const rendererElement = document.getElementsByTagName("captions-renderer")[0];
rendererElement.setRegionProperties({
	shiftDownFirstLine: true,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant