Giter VIP home page Giter VIP logo

Comments (6)

dmonad avatar dmonad commented on July 17, 2024

y-webrtc is based on simple-peer. You can add configurations for simple-peer using the peerOpts configuration. This also allows you to configure STUN and TURN servers.

https://github.com/yjs/y-webrtc/#api

from y-webrtc.

dmonad avatar dmonad commented on July 17, 2024

Changing STUN and TURN servers after the provider has been created doesn't make a lot of sense when a connection has already been established. However, you can change the configuration for all future connections using the provider.peerOpts property.

from y-webrtc.

catdevnull avatar catdevnull commented on July 17, 2024

yes, i know about peerOpts but i don't want to edit it after the fact precisely for that problem. isn't there any way to update existing connections or force reconnect all non-functioning connections, or at least force reconnect all connections?

from y-webrtc.

dmonad avatar dmonad commented on July 17, 2024

WebRTC is such a weird tech that it is even hard to detect broken connections. It's unrealistic that we will be able to switch connection properties after the fact or while connections are establishing. In any case, the payoff is not worth the trouble. If you are worried about the delay because your request is asynchronous, you can preload your connection info.

from y-webrtc.

catdevnull avatar catdevnull commented on July 17, 2024

it's not even necessary to check for broken connections. switching connection properties is most certainty possible through setConfiguration .

If you are worried about the delay because your request is asynchronous, you can preload your connection info.

but if we're offline or in a subway, fetching the API will just take a ton of time and/or timeout. in the subway it doesn't matter because there's no local peers anyway, but things like a dwebcamp or others in which a local network works fine while connection to the internet might be spotty means that the local-first experience is degraded (it won't start connecting to local peers until it timeouts.)

from y-webrtc.

catdevnull avatar catdevnull commented on July 17, 2024

hackily worked around it through https://gitea.nulo.in/Nulo/schreiben/commit/866fbfd7ec2533acc48e642c75ba0fa90694dafb. not ideal, hopefully this issue is reopened so an official API is made.

from y-webrtc.

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.