-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebRTC support on Linux #85
Comments
So i found these additions to the
https://developer.apple.com/documentation/bundleresources/information_property_list/nscamerausagedescription?language=objc |
regarding notifications @ken0x0a - we merged a cross-platform notification API: tauri-apps/tauri#505 It will land in the next release. |
I am wondering if we will have to roll our own: |
Well, I believe that our new custom protocol allows for the secure context on all platforms. Still, we have not proven this to work, so am moving this issue over to WRY for tracking there. |
Maybe this also belongs to #81? |
WebRTC also is not supported by |
macOS updateThe runtime requires some permissions. Adding an embed PLIST to the runtime fixed the issue for me. You can give it a try with embed_plist Sample PLIST <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>Request camera access for WebRTC</string>
<key>NSMicrophoneUsageDescription</key>
<string>Request microphone access for WebRTC</string>
</dict>
</plist> Test app #[cfg(target_os = "macos")]
embed_plist::embed_info_plist!("Info.plist");
fn main() -> wry::Result<()> {
use wry::{
application::{
event::{Event, StartCause, WindowEvent},
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
},
webview::WebViewBuilder,
};
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_title("Hello World")
.build(&event_loop)
.unwrap();
let _webview = WebViewBuilder::new(window)
.unwrap()
.with_url("https://test.webrtc.org/")?
.build()?;
event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Poll;
match event {
Event::NewEvents(StartCause::Init) => println!("Wry application started!"),
Event::WindowEvent {
event: WindowEvent::CloseRequested,
..
} => *control_flow = ControlFlow::Exit,
_ => (),
}
});
} Also, Tauri should give the possibility to inject a PLIST at runtime for development. For bundled app, we already generate a plist, so maybe we should add it as a configuration object to request Edit: Looks like I've been able to get custom protocol to work. We need to make sure to use the host |
It seems webkitgtk doesn't support webrtc. |
Found a bug tracker states webkitgtk does has webrtc support. I'll try to build it this night. |
Regarding boring-ssl and its gpl nature, we aren't shipping it (just linking) so it will not impact us. |
yeah I think you are right. We cannot distribute it for non-GPL apps because of it. |
https://webrtc.rs/ seems usable now |
Is there any solution connecting other languages implementation like SWIG? |
Hiiii ^^ Can we rename this issue to "WebRTC support on Unices"? It seems this issue is also talking about MacOS (which isn't Linux of course), soo it'll be great for clarity!!! |
@lovelyyfiaaa Heyy :) |
My last comment is still accurate. We're still waiting for the next webkigtk update which hopefully has more complete webrtc support. (they have a ~6 month release schedule to always get a new release out before a new ubuntu version in case you're wondering) |
WebRTC was merged into libp2p (for server-to-browser for now, which should "serve" Tauri's needs 😆) with this PR: libp2p/rust-libp2p#2622 (Merged 🎉) |
Webkitgtk release note is a bit cryptic, can someone more informed than me confirm if WebRTC is supported with this release? |
Nope, it's hidden behind a (experimental?) build-time flag that no distro enabled so far, which means we have to wait for it to be stable and enabled by default on the webkitgtk side. |
@FabianLars do you have any update about this topic? Is there anything we (as community) can help with it? |
Nothing specific, afaik it's making steady progress but i didn't see any hints about it being enabled by default in 2.42 yet (or any kind of ETAs for that matter).
People with experience in low-level stuff that may know a thing or two about anything that may help the webkitgtk project (whatever that would be) could reach out to the webkitgtk devs and see if they need any help. |
This comment was marked as spam.
This comment was marked as spam.
Instructions for how to enable webRTC on nixOS can be found in this thread. It's still a bit rough around the edges, but it works. |
Have there been any workarounds discovered for this, specifically around P2P? I've been trying to use Fingers crossed 🤞🏽 |
@JIGutierrez for my p2p tauri apps I use the WebRTC transport built into |
Right, but as far as I'm aware (new to Tauri and Rust) there's no way of using that JS-Side unless you create bindings for it, right? |
What do you want to do exactly? Control your Rust WebRTC node from the JavaScript front end of Tauri? Relay Rust-Tauri WebRTC messages to the JS front end? Communicate with other WebRTC nodes (other people) from the JS front end of Tauri? |
I'd like to use the js library |
I think this is in fact exactly the problem this whole github issue is about, that this is not possible on Linux. I am no world-class systems builder however, so I might be dissecting the problem space along the wrong axes... |
The webkit devs compiled an entry in their FAQ for when WebRTC support arrives in Webkit and it links to this issue. So it seems like there is still some way to go before full WebRTC support arrives for Webkit and with that for Tauri on Linux. |
So what the status with this and Tauri v2 |
Still the same. Also, it's not coupled to the Tauri version (if we ignore tauri-apps/tauri#9662). |
I tested only on macOS.
It might already work on other platforms.
Is your feature request related to a problem? Please describe.
I want to use WebRTC
Describe the solution you'd like
I don't have any preference.
I just want to use WebRTC.
Describe alternatives you've considered
I don't know any library to use WebRTC with VideoUI on desktop 😭
Additional context
It seems, the cause of this issue is this https://forums.developer.apple.com/thread/88052
And, the following might solve this issue on macOS (not tested).
https://bugs.webkit.org/show_bug.cgi?id=208667#c17
There are similar issues in other repositories.
(someone mentioned "WkWebView's getUserMedia functionality is disabled, when embedded")
The text was updated successfully, but these errors were encountered: