When I am working on my computer sometimes I like to stream youtube in the background because i just can't stand having a moment without distraction.
On my Macbook using the Safari browser there is a secret picture in picture mode which can be activated if you double right click on a embeded video. Check out my gif:
On other browsers you can just pop out the tab and resize that tab to how small or big you want it. Use the theater button mode to go full width and resize to your heart's content.