Code Monkey home page Code Monkey logo

Comments (5)

Faless avatar Faless commented on June 3, 2024

I can't seem to be able to reproduce using the webrtc_signaling demo, tested with both Chromium and Firefox

from webrtc-native.

ChrisTrenkamp avatar ChrisTrenkamp commented on June 3, 2024

Indeed, I took the signaling demo, created a HTML5 export of it, and tweaked the NodeJS server to serve the HTML5 export with a static file endpoint, and everything seems to work fine.

I guess I'm doing something wrong in my demo, but it's not immediately obvious what it is.

from webrtc-native.

ChrisTrenkamp avatar ChrisTrenkamp commented on June 3, 2024

I just realized that the WebRTCPeerConnection.ice_candidate_created signal is not triggering, and it's because I forgot to call mp_connections.get_peer(MultiplayerPeer.TARGET_PEER_SERVER).get("connection").set_local_description(type, sdp) in the client. After adding that line, it works in the browser.

Out of curiosity, why do the native clients work fine without setting the local description?

from webrtc-native.

Faless avatar Faless commented on June 3, 2024

Out of curiosity, why do the native clients work fine without setting the local description?

IIRC that is a quirk in the library we use, i.e. there is (was?) no way to create an offer without calling set_local_description.

We should investigate if that changed in recent versions, or if we can ask upstream to allow that.

from webrtc-native.

Faless avatar Faless commented on June 3, 2024

See:

Error WebRTCLibPeerConnection::_set_local_description(const String &p_type, const String &p_sdp) {
ERR_FAIL_COND_V(!peer_connection, ERR_UNCONFIGURED);
// XXX Library quirk. It doesn't seem possible to create offers/answers without setting the local description.
// Ignore this call for now to avoid crash (it's already set automatically!).
// peer_connection->setLocalDescription(p_type == String("offer") ? rtc::Description::Type::Offer : rtc::Description::Type::Answer);
return OK;
}

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.