2.1.5 • Published 27 days ago

huds v2.1.5

Weekly downloads
45
License
MIT
Repository
github
Last release
27 days ago

HUDS

Head-Up-Display Server (HUDS)

Abstract

HUDS is a small server providing a Web service for serving one or more HTML Single-Page Applications (SPA) which act as "Head-Up-Displays (HUD)" or "Overlays" in video production scenarios. It is specially intended to be used with OBS Studio's CEF-based Browser Source and optionally the Elgato Stream Deck remote control device and its System:Website function.

HUDS serves the static files of one or more HUD HTML5 SPAs, which render the actual HUD display in OBS. It also provides a HUDS client API to each HUD HTML5 SPA for establishing a WebSocket connection back to HUDS. Over this WebSocket connection HUDS pushes events to each HUD which were received by HUDS either via WebSocket connections or REST endpoints. The REST endpoint is intended to be used by arbitrary Web clients to send events to any HUD. Usually, this is used with the Stream Deck System:Website plugin or with curl(1) on the command-line.

HUDS itself is usually run ad-hoc and side-by-side to OBS Studio (under localhost) but also can be deployed to a dedicated server by optionally requiring authentication and delivering one or more HUDs in parallel.

Installation

Install Node.js and then install HUDS globally into your system with:

$ npm install -g huds

Usage

The Unix manual pages huds(8) (for the server CLI) and huds(3) (for the client API) provide detailed usage information.

Example

Run a minimalistic Hello World HUD with:

$ npx -p huds -p huds-hud-hello \
  huds -a 127.0.0.1 -p 9999 -d hello:@huds-hud-hello

For a more elaborated HUD check out the Training HUD. It supports performing trainings as webinars and looks like this in practice:

screenshot

Architecture

HUDS is based on a Client/Server architecture as illustrated in the following diagram:

architecture

The individual communication steps in the diagram are:

  1. HUDS reads the HUD configuration and converts its content from YAML to JSON format for embedding into the HUDS (Client) Library. See training.yaml for an example of a HUD configuration.

  2. OBS Studio's CEF-based Browser Source open the URL http://127.0.0.1:9999/<hud-id>/[#<key>=<value>,[...]]

  3. HUDS delivers the HUD SPA with all its HTML/CSS/JS files. The individual assets are served via the HUDS URLs http://127.0.0.1:9999/<hud-id>/<asset>. See Hello World HUD for an example of a simple HUD and Training HUD for an example of a more elaborated HUD.

  4. The HUD SPA (in its index.html) references the HUDS (Client) Library with: <script type="text/javascript" src="huds"></script>.

  5. HUDS delivers the HUDS (Client) Library (and its embedded HUD configuration) under virtual HUDS URL http://127.0.0.1:9999/<hud-id>/huds.

  6. The HUDS (Client) Library opens a WebSocket connection back to HUDS under the HUDS URL http://127.0.0.1:9999/<hud-id>/events.

  7. An external program (like Elgato Stream Deck's System:Website function or Node-RED's HTTP-Request or just cURL) triggers an event with a HTTP GET request under the HUDS URL http://127.0.0.1:9999/<hud-id>/event/<event-name>[?data=<event-data>]. and with a HTTP POST request under the HUDS URL http://127.0.0.1:9999/<hud-id>/event/<event-name> and with <event-data> as the payload. In both cases, <event-data> has to be a JSON string.

  8. HUDS forwards the received event to all instances of the HUD by sending out the event to all HUD SPAs over their WebSocket connections. Notice: a single HUD can be opened multiple times and then all opened instances receive the event. This is useful to run a HUD both in OBS Studio and in parallel in the browser on a control notebook in case no dedicated Elgato Streak Deck remote control device is used.

  9. Similary, even HUD SPAs are allowed to send events (to theirself or other HUDs) over their WebSocket connection. This is useful to have a central dashboard HUD which controls one or more actual video HUDs.

License

Copyright © 2020-2022 Dr. Ralf S. Engelschall (http://engelschall.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2.1.5

27 days ago

2.1.4

3 months ago

2.1.3

4 months ago

2.1.2

4 months ago

2.1.1

4 months ago

2.1.0

4 months ago

2.0.9

6 months ago

2.0.11

6 months ago

2.0.10

6 months ago

2.0.8

11 months ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.3

2 years ago

2.0.5

1 year ago

2.0.4

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.6.13

2 years ago

1.6.14

2 years ago

1.6.11

2 years ago

1.6.12

2 years ago

1.6.10

2 years ago

1.6.9

3 years ago

1.6.8

3 years ago

1.6.7

3 years ago

1.6.6

3 years ago

1.6.5

3 years ago

1.6.4

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.9

3 years ago

1.5.8

4 years ago

1.5.7

4 years ago

1.5.6

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.2.2

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.9.11

4 years ago

0.9.10

4 years ago

0.9.9

4 years ago

0.9.8

4 years ago

0.9.7

4 years ago

0.9.6

4 years ago

0.9.4

4 years ago

0.9.5

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago