Replies: 1 comment
-
Hi @mjasner, I'm not sure how you want to "push" data to the client. But if you're talking about an HTTP endpoint that responds with the video stream, you can do that. Here is an example: https://nicegui.io/documentation/section_pages_routing#api_responses. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a project I'm working on using NiceGUI to create a web frontend to a device with a camera on it. The device is capable of sending an MJPEG stream. On the device I am running a streaming server that serves the MJPEG stream over a port (8090), and the NiceGUI app is running on port 8080. I'd like to consolidate them into a single port, so I wrote a python class to access the camera directly and generate the mjpeg stream and I'm trying integrate this directly into the NiceGUI UI using a seperate url that would handle the stream. So for instance there would be 2 pages served from the NiceGUI app:
/ - The main UI
/stream - the MJPEG stream
The problem I'm having is how do I take the raw data coming out the streamer class (which is a byte string containing a steady stream of mjpeg headers and jpeg data) and push that to the client WITHOUT any of the NiceGUI generated content? Is that possible with NiceGUI or will I end up having to use a seperate port for the MJPEG stream?
Just to clarify, I want to replace the seperate MJPEG Streamer program with a custom python class that runs within the NiceGUI app.
Beta Was this translation helpful? Give feedback.
All reactions