wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
24.13k stars 1.15k forks source link

[linux] WebRTC - usb camera show #3225

Open zhaojunliing opened 6 months ago

zhaojunliing commented 6 months ago

Is your feature request related to a problem? Please describe.

I'm using linux and I want to use wails to show the live feed from the camera, but the various options are unsatisfactory ~~1, use navigator.getUserMedia to show ~~ ~~2, use webrtc ~~ 3、Use websocket transmission, already realized, but there is a 2s delay

Describe the solution you'd like

Wanted wails support

I see he's going to support CreateSharedBuffer. https://github.com/wailsapp/wails/discussions/883#discussioncomment-8035785 When is it available?

Describe alternatives you've considered

webrtc is in webkitgtk but it doesn't work, can you help?

Additional context

image

image

image

marcio199226 commented 6 months ago

Current version required by wails of webkit2gtk for linux does not support webrtc. Webrtc should be available in v3 but I don't know if there will be a lot of breaking changes to upgrade seamlesly from v2 t v3

zhaojunliing commented 6 months ago

Current version required by wails of webkit2gtk for linux does not supporto webrtc. Webrtc should be available in v3 but I don't know if there will be a lot of breaking changes to upgrade seamlesly from v2 t v3

Is v3 supported now? Can I test it?

marcio199226 commented 6 months ago

I think v3 is in early alpha stage

leaanthony commented 6 months ago

Is v3 supported now? Can I test it?

Supported: No. Test it: Yes. Please follow our Feedback process if you have any feedback.

stffabi commented 6 months ago

I tried once to activate the setting enable_webrtc in our code, but it still didn't work on latest fedora (as of April 2023). It seemed like fedora did not compile in that support in their default package. The enable_webrtc option is currently also not enabled in v3, so it won't work there either.

I would not expect this to work until distros catch up and build in that support. For example if you take a look into the build log of your installed webkit2gtk 2.38.6-0ubuntu0.20.04.1 version, you will see that support has not been compiled into it.

-- Disabling USE_GSTREAMER_WEBRTC since ENABLE_WEB_RTC is disabled.

So this is mostly an upstream distros issue, which first need to be solved there.