3 ms·
You still need servers to handle the signalling, perform ICE and TURN where applicable.
by supermatt 7y ago
You still need servers to handle the signalling, perform ICE and TURN where applicable.
- fulafel 7y agoOnly if you need to support users without full internet connectivity. Again webrtc can be used in many different requirement contexts.
- supermatt 7y agoYou can certainly manually handle the signalling to set up the offer/answer. e.g. read them out to your peer(s). You would still need some form of STUN server (but there are a number of 'freely accessible' ones, even configured as defaults in some browsers) to get your reachable address/port/proto. You cant, AFAIK, handle this manually - it is handled internally as part of ICE. Then you would need to manually handle the signalling of these as well. Thats the bare minimum you have to do to peer over webrtc under ideal circumstances, but its certainly doable. So you do that for each peer. If you (or a peer) change streams you will do the same thing all over again
- fulafel 7y agoSTUN is not needed if the participants have full internet connectivity, only if you have to work around NAT.
- supermatt 7y agoAs mentioned, you cant manually set up your listening ports - this is handled internally by ICE, which needs to connect to a STUN server to get (at a minimum) your public IP address. edit: cant reply to your comment fulafel, but on that project you posted: https://github.com/cjb/serverless-webrtc/blob/master/serverless-webrtc.js#L25 https://github.com/cjb/serverless-webrtc/blob/master/serverl... Also, note that even if this wasnt defined, some browsers contain defaults. You 100% need STUN, but you can handle the signalling manually - as I stated. edit2: cant reply to your comment ibc, but I was explaining the bare minimum 'serverless' webrtc case still required a STUN server. I appreciate that mediasoup SFU uses ice-lite instead.
- fulafel 7y agoI know I've seen at least data channel working without STUN, this was the demo I think: https://github.com/cjb/serverless-webrtc/ https://github.com/cjb/serverless-webrtc/ If you say it's different with media channels, I'll believe you. WebRTC can tell you your ip address without any external server, that only breaks if you are dealing with NAT. edit: to clarify the NAT-less use case, i'm thinking of apps that can rely on/require p2p supporting IPv6 connectivity.
- ibc 7y agoAnd somehow this discussion become a general topic about WebRTC scenarios. They do exist, yes, but mediasoup is a SFU scenario. No STUN is required at all. TURN may be needed if the client network/router blocks UDP.
- fulafel 7y agoRe your edit, ok i stand corrected, thanks for the correction!