无需服务器端脚本生成动态网页
我正在尝试控制一个媒体设备,该设备具有大量多媒体内容,可以使用其他设备(远程控制设备)(例如连接到 LAN 的 ipad)播放这些内容。 (UPnP)
我希望媒体设备能够将内容列表发送到远程设备,以便将其呈现为遥控器上的网页。网页上的操作需要作为要执行的命令发送到设备(例如播放、暂停、下一个等)。媒体设备是嵌入式设备,因此不能有任何服务器端脚本,所有操作都必须在客户端完成。
我希望呈现的页面是 HTML5。那么,是否可以仅使用客户端脚本生成动态 HTML5 页面?
多谢。
我是一名嵌入式系统开发人员,因此对网页设计一无所知。
I am trying to control a media device which has lot of multimedia content that it can play using another device(remote control device) like an ipad connected to the LAN. (UPnP)
I want the media device to be able to send the content listing to the remote device so that it will be rendered as a webpage on the remote controller. And actions on the webpages needs to be sent to the the device as commands to execute (like play, pause, next etc). The media device is an embedded device, hence can't have any server side scripting, all has to be done on the client side.
I want the page rendered to be HTML5. So, is it possible to generate dynamic HTML5 pages using just client side scripting?
Thanks a lot.
I am an embedded systems developer hence clueless about the web designing stuff.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这是可能的。我在 Plex 工作,我们也有类似的需求。我们的 Plex 媒体服务器是一堆 C++ 软件,它不构建网页或类似的东西,它只提供静态文件并具有用于控制媒体的 API 端点。
我构建了一个媒体管理器,允许使用完全静态的网页配置系统(但目前还不能播放,但原理是相同的)。事实上,我们使用 Cappuccino,这本质上是一种仅使用 JavaScript 构建网页的方式(本质上有足够的 html和 css 来引导卡布奇诺环境)。它使用 Ajax 来访问 C++ API 来完成它需要做的任何其他事情。
您可以尝试类似的东西,但它绝不需要是卡布奇诺 - 您可以使用 jQuery、HTML 和 CSS 完美地做到这一点。
Yes, this is possible. I work at Plex, and we have a similar need. Our Plex Media Server is a bunch of C++ software that doesn't build web pages or anything like that, it just serves static files and has API endpoints for controlling media.
I built a media manager that allows configuring the system (but not playback as of now, but the principle is the same) using a web page that is totally static. In fact, we use Cappuccino, which is essentially a JavaScript-only way of building a web page (there's essentially just enough html and css to bootstrap the Cappuccino environment). It uses Ajax to hit the C++ API to do anything else it needs to do.
You might try something similar, but it by no means needs to be Cappuccino - you can do it perfectly well with jQuery, HTML, and CSS.