godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.92k stars 1.65k forks source link

WebRTC Signaling demo doesn't load peers in debug/Windows build #677

Open IsaaacD opened 2 years ago

IsaaacD commented 2 years ago

Which demo project is affected: WebRTC Signaling

OS/device including version: Windows 10, Godot v3.4.2.stable.official

Issue description: The peers don't get registered on the local WebRTCMultiplayer on windows as the connection state enum is set to closed. The documentation says that it requires to be open

Screenshots of issue: This is a screenshot of printing peers on Windows/Debug. The WebRTCMultiplayer object doesn't have any peers: image

To contrast this, this is what it looks like in a web browser where we can see additional messaging and peers listed: image

I've checked the source code of WebRTCPeerConnection and there's a variant for JavaScript. The enum gets explicitly set as new during the initialize method, see here in JS but for other platforms it seems to not explicitly do this (sorry not too familiar with Godot's internal code so GDVIRTUAL_CALL(_initialize, p_config, err) might be doing it, not sure where that's implemented)

Calinou commented 2 years ago

cc @Faless