Closed minlau closed 1 year ago
Hi,
this is by design, because back in the day it turned out that "hey browser, put this video in the center" way of centering things was less reliable across different sites than "hey browser, put this video this far from the left edge" — especially considering there's been some demand for also allowing right/left alignment.
Because of this, the video briefly appears in the wrong position. There's few causes for delays:
This kind of improper alignment is usually very brief, and is caused by video using offset that was correct for full screen in non-fullscreen (or vice-versa).
In this case, the offset will be calculated incorrectly (to the pre-fullscreen change state). The extension has two ways of dealing with this:
Observers (get notified when video/player elements' dimensions update). Given that observers are very eager to get triggered (especially during window resize events), the extension will only update offsets 250ms after observer events stop coming in
Manually checking for player element changes (1/second)
Given that 250 ms doesn't seem that bad of a trade-off for other features, this probably isn't going to get fixed.
Describe the bug On fullscreen leave/exit video is displaced for half a second. Displaced - not centered, usually moved slight to left or right, but sometimes it can be even worse as displayed in screenshot. Happens in youtube and twitch, have not tested in other pages.
What I tried and did not help:
To Reproduce Use default settings. Open any youtube video and go to fullscreen.
Expected behavior No video movement to any direction when entering or leaving fullscreen.
Screenshots https://pasteboard.co/PfXAe6dmixQF.png
Browser and OS