tamius-han / ultrawidify

Firefox extension that allows you to work around some people's inability to properly encode 21:9 videos.
171 stars 9 forks source link

On fullscreen leave/exit video is displaced for half a second #236

Closed minlau closed 1 year ago

minlau commented 1 year ago

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

tamius-han commented 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:

Given that 250 ms doesn't seem that bad of a trade-off for other features, this probably isn't going to get fixed.