MJPEG streaming through HTTP in Node.js / Total.js
A simple controller's action for streaming MJPEG data via HTTP with the help of the Total.js framework in Node.js Platform.

MJPEG (HTTP) streaming in Node.js / Total.js
Streaming of MJPEG is effortless in the Total.js framework. So you need to receive the buffer
with the JPEG image from your e.g., IP camera.
Create a controller /controllers/mjpeg.js
:
Receiving MJPEG buffer and resend to all clients
You will need to declare your source from where you obtain MJPEG data. This is only an example, how to send MJPEG buffer
to all web clients:
Usage on client-side (HTML)
Good to know
/mjpeg/
endpoint keeps open all connections- easy to convert this code to
WebSocket
Other posts from Total.js Platform
- 2025-05-01April report 2025
- 2025-04-24j-Box - Total.js UI component
- 2025-04-14Beekeeping - recording damage caused by a brown bear
- 2025-04-11j-Importer - Total.js
- 2025-04-10The Thurzo House Museum
- 2025-04-02March report 2025
- 2025-03-28j-DataGrid - Total.js UI component part 2
- 2025-03-20j-DataGrid - Total.js part 1
- 2025-03-13j-Directory - jComponent
- 2025-03-05j-Input UI component part 2