Create the option to break a video out to an independent video player window as well as use this feature to play in full screen.
This will allow such a video player to utilize hardware acceleration for playing videos, which is difficult to implement within a web browser engine.
On Linux the only browser that support video hardware acceleration is Epiphany aka Gnome Web but anyone that tried this browser knows that it doesn’t work well. Probably because mixing OpenGL and VAAPI doesn’t work well.
However with a player that exist in it’s own context, using hardware acceleration would be rather easy. At least for YouTube it is possible to embed VLC which can play YouTube videos. Whenever a YouTube video lags I copy and paste the URL to VLC and that works well. Also think that here are other opens source video players that can play videos when provided an URL.
The easiest way to do this may actually be to just launch an external video player using the videos URL. This could be a video player chosen by the user rather than hardcoded into the application. Some users may even prefer to set up their system so that a video plays on another device such as a HTPC.
This will also be a useful feature with video players that has a corrupt full screen feature or entirely lacks it. VLC and other stand alone media players usually has a very good full screen mode and usually perform very well in it. My CPU usage is much lower when VLC is in full screen rather than rendering to a composite window.
While writing this I see a lot of issues regarding full screen in particular popping up. This feature using either an embedded or a stand alone video player would solve such issues as well.