如何渲染DOM服务器端并记录/流列出?

发布于 2025-01-31 10:26:58 字数 731 浏览 2 评论 0原文

我试图实现的是通过动画&渲染HTML页面的DOM; node.js服务器上的JavaScript,然后将其转换为流,然后可以在HTML页面中查看客户端。因为这将保留HTML页面的内容&它的数据是安全的,并且仅允许查看页面(此用例意味着人们不需要与页面进行交互,只有服务器可以通过代码进行代码,而人们只能查看它)。

对于上下文,这是托管节点服务器的NW.JS应用程序的一部分。因此,有可能在隐藏的窗口中渲染HTML。但是,这是接近不安全的一步,因为它将是桌面可访问的窗口(我认为)。

我所有的问题都是:

  1. 将视频从服务器发送给客户的最佳方法是什么?我遇到了WEBRTC,实际上具有屏幕共享解决方案,但是我认为这不适合在Node.js Server上渲染HTML页面。
  2. 是否有可以在Node.js服务器上渲染(然后将DOM转换为视频流)的方法?
  3. 如果我只是吠叫不存在的树,而我的质疑是不可行的:是否有任何简单地显示网页的完全安全的方法?因为从我缺乏经验的研究中,您无法真正隐藏任何东西,只能使HTML& CSS&一些JavaScript。

服务器需要能够编辑页面中的颜色,图标,文本,定位以及更多元素,因此我相信我不能只放置页面&视频文件中的动画并在客户端播放。它需要即时可以编辑。

大家都对此事有任何想法,都将不胜感激。如果这个问题在任何方面都不是传统的,我深表歉意,这是我在这里首次提问的一部分。 :d

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文