zserge / lorca

Build cross-platform modern desktop apps in Go + HTML5
MIT License
8.04k stars 535 forks source link

Video stream with mediaDevices.getUserMedia - no access request pop-up? #73

Open hardidi opened 5 years ago

hardidi commented 5 years ago

Hello,

I'm trying to stream a USB camera in a GUI using lorca but I don't get the pop up requesting for access to the camera when the interface opens, so the video stream never starts. Is there a way to give the camera rights by default (I kind of understood that it's not allowed by the HTML 5 standard), to allow the pop-up, or to request access rights via a separate command?

I have attached my code below - the HTML video streaming part works fine when opening it in Chrome.

video_stream.txt

Thanks, Michael

vinchauhan commented 5 years ago

You can use the open CV library of go to start the stream than using html api