Code Monkey home page Code Monkey logo

Comments (3)

Faless avatar Faless commented on June 12, 2024

It would take a bit of work to thin it down to just that WebRTCmultiplayerclient example. It would be easy to show if there was a minimal WebRTC multiplayer example in the networking demo projects, and to keep it self-contained it could use WebSockets as the signalling system

You mean the WebRTC signaling demo?

from webrtc-native.

goatchurchprime avatar goatchurchprime commented on June 12, 2024

I've finally got the example derived from the signalling demo with an ugly toggle button "Addpeerbeforesetdescription" to swap the order of the function calls.

webrtc_signaling (copy).zip

I've used a peerslist = {} to keep track of the peers created, instead of fetching them back using the WebRTCMultiplayer.get_peer(id).connection function.

It's necessary to call WebRTCPeerConnection.add_peer(peer) before peer.create_offer()

However on the receiving end of the Offer your library lets me get away with add_peer() after set_remote_description():

  var rtc_mp = WebRTCMultiplayer.new()
  peer.set_remote_description("offer", offer)
  rtc_mp.add_peer(peer, id)

I have confirmed that the HTML5 implementation does not work for this, but your library does.

To run the HTML5 version:

  • Run a copy of WebRTC_signalling_demo on the command line and click on the Signalling server: Listen button.
  • Run the exported HTML5
  • Hit Start on the top left panel
  • Paste the string after Joined lobby into the Room Secret line edit box
  • Hit Start on the top right panel
  • ... then some stuff happens (or doesn't) to indicate a WebRTC connection has been established.

This is now running on Godot version 3.4.

The reason this issue matters is it's easier to develop WebRTC code against this plugin than on the HTML5 platform, so this is where people are going to be looking for their bugs.

from webrtc-native.

Faless avatar Faless commented on June 12, 2024

This is fixed in the master branch which uses libdatachannel as rtc library, tested with Godot 3.5.1 and plugin version 1.0.0-beta5.

from webrtc-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.