You will need to install a user script manager extension to install this script.
Inserts a button under the YouTube video player with the following options:
After you select the option "Fill Window" the options "Stretch" and "Hide Search" are revealed. Stretch expands the video width to fit the visible area and hide the black bars on the left and right while preserving the original aspect ratio; only videos with aspect ratio larger than 1 are stretched. The stretch is particularly useful for ultrawide monitors because it fills the screen in full screen mode. The hide search option helps to maximize the visible area by hiding the search bar at the top whenever needed; the search bar is revealed again when you scroll down the window.
After you select the option "Float Video" the option "Float Minimize" is revealed. When you scroll down a window, the minimize option creates a small video size that floats on the page. If minimize is unselected then the floating video has the original size.
This script has been tested to work with Tampermonkey on Chrome, Firefox and Opera.