I have a dynamic animated DirectX scene showing on screen. I want to stream that sequence of images to the browser, for an HTML5 client.
I'm currently encoding each frame as jpeg/base64 and sending it over a websocket. In the browser, I'm replacing the img's source to that encoded frame and the image gets updated.
Local desktop browsers get real-time changes, but performance is not great on Android devices. I'm not sure if that's due to frequent DOM updates or Websocket latency, but the image is laggy.
I thought of optimizing it by creating a video stream to load in the browser, so that I'll get performance boost from 1. hardware video decoding; 2. avoiding DOM manipulation and 3. avoiding websocket overhead.
I'm not sure if that's the way to go, and how to implement it (video novice). Can anyone help?