-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fails to parse (munged) SDP message #164
Comments
are those ice credentials correct formatted? |
seems like the parser wants a c line after the m line let sdp_offer = "v=0\r |
so the fix is probably to make the conn line optional either in session or mediadescription. |
Hi @thomaseizinger welcome to st0m! You're right. The spec says:
However the c-line is totally useless in WebRTC (str0m just writes |
I made a fix for this in #165 and with that I can parse the above SDP. @thomaseizinger I'm wondering, do you expect the c-line on session level to be used here? I notice you have no str0m doesn't currently use the c-line, but it would be trivially easy to extract a host candidate for the c-line as a fallback (if the value is anything but 127.0.0.1 or 0.0.0.0). |
Awesome, thank you for the quick fix!
I think so yes (I am not too familiar with the internals of WebRTC). We've specified our protocol here: https://github.com/libp2p/specs/blob/master/webrtc/webrtc-direct.md#browser-to-public-server See item 6:
Essentially, the setup we have is a publicly reachable node that listens for STUN requests and we want to establish a WebRTC connection to that same peer.
I think we will need that but I can report back once I continue my testing. |
Thanks, this is fixed, I can now parse the SDP! |
After feeding the SDP into it, I am getting the following output:
After that, it repeats (I am guessing because the browser attempts to open multiple connections).
@algesten Is this related to the above? Are things hanging because we don't extract candidates? |
So I think I fixed a few more things and now I am stuck here:
I am using the |
Maybe open a new issue with the topic use str0m in rust libp2p. In that one can you describe how the overall system looks like. Is the str0m side act like client/server or both? What are the other peers, only browsers or other webrtc implementations. Can you also try to replicate the problem you have with an integration test where you let one side of str0m behave like your other client. |
@thomaseizinger is that code supposed to "just work" with a valid webrtc peer? |
Done: #166
We use SDP munging but other than that, it is a compliant WebRTC use afaik. We do use the first channel for a dedicated handshake but I don't think that should be relevant. |
I am trialing to use this library for
rust-libp2p
as a replacement forwebrtc-rs
. The protocol we implement using WebRTC is using ice-lite and we rely on SDP munging.The SDP offer I am trying to feed into
str0m
errors on the parsing step.This is my SDP message:
The parser fails with:
We have this code working in multiple other languages and browser bindings. From my limited research, this SDP message is still correct. Is the parser perhaps too strict here?
Any help is much appreciated!
The text was updated successfully, but these errors were encountered: