noVNC or similar video straming? #5929
Replies: 1 comment 4 replies
-
|
Welcome to NiceGUI, @MammothsHub! Great question. I have only little experience with VNC myself, so I asked Claude to chime in: Embedding noVNC (or a similar web-based VNC viewer) is definitely possible, and you don't necessarily need a custom wrapper element. Simplest approach: embed via iframe If noVNC is already running as a standalone web service (e.g., on from nicegui import ui
ui.html('<iframe src="http://raspberrypi:6080/vnc.html" style="width: 100%; height: 80vh; border: none;"></iframe>')
ui.run()This works well because noVNC is a self-contained web app – it handles keyboard/mouse input and WebSocket connections internally, so an iframe is all you need. Alternative: custom JavaScript element If you want tighter integration (e.g., controlling the VNC connection from Python or reacting to VNC events), you could wrap the noVNC JavaScript library using Tips for your Raspberry Pi setup:
Hope that helps – feel free to share your progress! |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm very new to niceGUI. I've created programs in python/bash/c++ before but doing anything web related is relatively new for me. Therefore NiceGui seems to be a good library for someone in my position.
Long term I might want to use this to stream a vnc session from my raspberry pi cluster. Probably using noVNC. Would that be possible in NiceGui? Some of the examples are promising such as the web xterm example which shows how a continually interactive session similar to noVNC might be integrated. Further, the performance of the ui.video example is encouraging.
But I also note that the xterm example uses a built in wrapper constructed by niceGui itself. So is there a way to potentially have a "viewport" of some description that shows another hosted webservice such as noVNC? Or would a wrapper have to be constructed for noVNC.js?
Apologies if this question reveals my lack of experience on these matters.
Beta Was this translation helpful? Give feedback.
All reactions