-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple webrtc connection and manual signaling (QR, JSON, Carrier pigeon) - consent time out prevents connection #2945
Comments
MDN makes weird claims at times... This is not caused by STUN consent freshness which generally takes place only after the connection is established. If you do something similar like this on the good old (8 years...) https://github.com/fippo/paste as follows But https://webrtchacks.com/the-minimum-viable-sdp/ (2015...) mumbles something about 30 seconds but it doesn't come into effect in this case. What you might try is the following: |
The issue is that both sides need to perform their ICE checks around the same time. However each side will start their ICE processing when given the first candidate, so if signaling is slower than 10-15 seconds, this is hard to coordinate. With some NATs, having only the initiator start ICE processing might work (answerer will use triggered checks). But if the NAT requires a pinhole to be created first, that won't fly. Don't think the DTLS direction will have much effect as the key issue is at the ICE layer, I think. |
Thanks, so i tried : No luck, I can't figure how to connect. Same with this repo: https://github.com/fippo/paste after few seconds delay, the connection state will change to failed. How can I prevent the answerer to try to connect first and still provide candidates from the host ? Ideally the connection should only start when the host gets its answer back. Is there no solution but to use a signaling server ? thanks again |
I thought this would be straight forward but the consent freshness will timeout all connections too fast to allow any realistic manual connection between host and peer (no signaling server but directly providing the offer/answer/candidates through high latency messaging: QR, email, JSON, Carrier pigeon, foot).
I am trying something very simple :
As per developer.mozilla.org documentation on webrtc api, even a carrier pigeon could be used to setup the signaling.
However, it doesn't seem to be possible as soon as we create an answer on the peer side, transport will fail if the host doesn't process it within few seconds:
Step 1- host creates offer for 1 data channel and gather candidates until "complete". Format SDP and candidates into a connection String (or QR) and provide it to peer via high latency manual exchange.
Step 2 - peer process connection string/QR, adds sdp, candidates from host, creates answer and gather candidates until "complete". Format SDP and candidates into a connection String (or QR) and provide it to host via high latency manual exchange. Unfortunately, at this step consent freshness will start and the connectionstatechange will change to failed within a short time frame (seconds) if the host cannot process this info fast enough.
step 3 - host process connection string/QR, adds sdp, candidates from peer. Connection is failed or established if we were fast enough.
I cannot find any way to change the consent freshness timeout. Configuring it doesn't seem to be part of the API.
Is there a solution or special setup that I am missing to make my use case possible (high latency manual signaling)?
Or did the protocol changed in such way since consent freshness that not using a signaling server makes it impossible to establish the p2p connection?
Thanks a lot, I really hope there is a way to solve my problem.
The text was updated successfully, but these errors were encountered: