We've been on a mission to try and achieve a near perfect lighthouse score with Roboto Studio. One of the hardest tasks has been getting Mux video to not tank the performance with their Mux Player.
We ended up building a stripped down version of the Mux player and we've written a blog about it. Read it here. Don't worry you can just ignore the blog pit and steal the code and it should work, providing you're using Typescript (you should).
I also want to reiterate - the Mux player is ultimately the better choice for most folks, because it's a plug and play library that works with pretty much every video format, however, for those tilted enough to want to optimise the hell out of everything at the expense of compatibility - this is for you.