• General Chat
  • How can I use WebRTC in the Godot Android export?

Hi, my Game works fine in Multiplayer (WebRTC) if I export as HTML5, Windows EXE or Directly test from Godot Editor. But if I export as Android, WebRTC not working.

In Error Logs: E 0:02:12.955 create: Default GDNative WebRTC implementation not defined. <C++ Error> Condition "!default_library" is true. Returned: obj <C++ Source> modules/webrtc/webrtc_peer_connection_gdnative.cpp:54 @ create() <Stack Trace> Main.tscn::2:30 @ create_peer() Main.tscn::2:69 @ peer_connected() ws_webrtc_client.gd:76 @ parse_msg() ws_webrtc_client.gd:116 @ _process()

What's the right way define WebRTC for Android Export?

Welcome to the forums @GodotSmart!

While I don't know the answer, I would recommend chiming in on this issue on the Godot WebRTC repository to add official Android support for WebRTC. You might be able to ask rondao on GitHub, since they said they got it working for Android, and see if they know how to set it up.

What I looked at for my project when I was looking into web sockets was using a C# library that is supported on Mono and doesn't have platform specific code. I never tested on mobile though, so I have no idea if this is a viable workaround.