On Stadia (not sure about xCloud), the games are not run locally on the user's device. The Stadia app just captures controller input, sends it to Google's servers and returns a video stream of the gameplay (either VP9, h264, or AV1).
I’m surprised Google didn’t develop it that way to begin with.
iOS Safari isn't supported, however. Not sure if it has something to do with gamepads, video codecs, or what...