How to render a DOM server-side and record/stream that out?

Viewed 137

What I am trying to achieve is to render the DOM of an HTML page with Animations & JavaScript on a Node.js server, then convert that into a stream, which can then be viewed client side in an HTML page. As this would keep the content of the HTML page & its data where it is secure, and only allow the page to be viewed (The use case for this means people don't need to interact with the page, only the server can through code, and people can just view it).

For context, this is part of a NW.js application, which is hosting the Node Server. So there is the possibility of rendering the HTML in a hidden window; however, that is one step closer to not-secure because it would be a window technically accessible by the desktop (I think).

Some of my questions for you all are:

  1. What is the best method of sending video from servers to clients? I have come across WebRTC which actually has a screen sharing solution, however I don't believe that works for rendering the HTML page headless on a Node.js server.
  2. Are there are ways to render (and then convert the DOM into a video stream) on a Node.js server?
  3. If I am simply barking up a tree that doesn't exist, and what I am questioning isn't feasible: are there any completely secure ways of simply displaying a web page? Because from my inexperienced research, you can't truly hide anything and can only obfuscate the HTML & CSS & some JavaScript.

The server needs to be able to edit colors, icons, text, positioning and more of the elements in the page live, and so I believe I can't just put the page & animations in a video file and play that on the client side. It needs to be editable on the fly.

Any thoughts you all have on this matter would be much appreciated. I apologize if this question isn't traditional in any way, this is part of me getting my bearings as a first time questioner on here. :D

0 Answers
Related