I am currently using Socket.io to sort of "stream" video from a Java game application to a ReactJS website. It's pretty slow, and a little janky, but it works.
The programs work by taking a screenshot of the game with Java, compressing it to JPEG, then sending the compressed, Base64 string over Socket.io to the server. The server then sends this Base64 string to the web client (ReactJS), which then renders the Base64 string as an image using CSS.
This method works. I can control the framerate (to an extent...it runs my CPU through the roof if I use 60 FPS or higher), and I can definitely control the compression of the JPEG (the quality of the image).
It does have its limitations though, and I'm still convinced there's a better way of going about this. I've looked on google for a way to stream video from one application to another, but I haven't found one.
What is the best approach to streaming a game, in a Java client, to a website, in ReactJS?