How to stream video

What do you want to achieve?

I have an esp32 cam that records video. I would like to stream this to a elecrow HMI 7" display if possible.

Others

  • **SquareLine Studio version: 1.3.4
  • **Operating system: Windows
  • **Target hardware: Elecrow ESP32 S3 HMI

If you’d like to display the stream (i.e custom pixels) in LVGL you can use the canvas widget. In SquareLine Studio you can’t create one directly, but if you want to design a certain layout/size for it graphically, first you can create a container/panel with given size as a placeholder, and replace it by a canvas widget in the exported ui-code.
But alternatively, it’s even better not disturbing the exported code, but creating a SCREEN_LOADED event for the screen on which the panel/container you created (with ‘Don’t export fuction ticked’ if you’d like it to be external), and then create the canvas in the assigned function of the exported code (ui_events.c if you set the function to be exported).
You can create the canvas as a child of the panel/container widget. In case you want the canvas to determine the dimensions, the container/panel had to be set to size ‘content’ in SquareLine Studio before the export.)
For further usage of the canvas see its LVGL page: Canvas (lv_canvas) — LVGL documentation