gaikai was doing this in the early 2010s for zero-day game release demos. java in the browser, streaming video and audio from servers, relaying back game input events.
Before Gaikai was OnLive[1] which was a full platform with a game store and libraries and the ability to seamlessly and instantly spectate others' games. It worked fairly well if you had a great Internet connection. Of course nowadays Stadia does the same thing at presumably much lower latencies and higher quality.
EDIT: Technically Gaikai was founded a year before OnLive, but at the time OnLive was more accessible as Gaikai remained in a limited release up until Sony bought them to use for Playstation Now
[1] https://en.wikipedia.org/wiki/OnLive
EDIT: Technically Gaikai was founded a year before OnLive, but at the time OnLive was more accessible as Gaikai remained in a limited release up until Sony bought them to use for Playstation Now