I mean portable solution that will work for linux, windows, android and ios?
Thanks for the answer, but for the start this example doesn’t work on linux - so it already excludes it.
As a custom fallback for native targets you can use OpenCV bindings (Video/Camera capture IO) – https://github.com/deltaluca/hx-opencv/blob/master/cv/HighGUI.hx#L205 (obv. you need to figure out how to transfer cvbuffer to haxe realm/how to read pixel data).
OpenCV is not a videocapture library. I guess,
ffmpeg is a better fit for that (https://www.ffmpeg.org/ffmpeg-devices.html). You need to add missing bindings to – https://github.com/delahee/linc_ffmpeg/ . Probably, @delahee himself would help you.