Skip to content
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

webrtc(browser-browser): specify init channel for connection establishment #578

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Sep 21, 2023

Connection establishment doesn't work if we don't create a channel before creating the SDP offer.
Not exactly very helpful but some info on this SO question: https://stackoverflow.com/questions/38867763/why-i-have-to-open-data-channel-before-send-peer-connection-offer/38872920#38872920

js-libp2p already does this: https://github.com/libp2p/js-libp2p/blob/master/packages/transport-webrtc/src/private-to-private/handler.ts#L116-L119

go-libp2p: https://github.com/libp2p/go-libp2p/blob/webrtcprivate/transport/p2p/transport/webrtcprivate/transport.go#L242

I think this should be a part of the spec.

@thomaseizinger
Copy link
Contributor

I think in Rust we handle this by including the relevant m-line?

https://github.com/libp2p/rust-libp2p/blob/484fc5693c0a7ad9ad2acb0a08445a7a4f5f7fd9/misc/webrtc-utils/src/sdp.rs#L84

@sukunrt sukunrt changed the title webrtc specify init channel for connection establishment webrtc(browser-browser): specify init channel for connection establishment Sep 21, 2023
@sukunrt
Copy link
Member Author

sukunrt commented Sep 21, 2023

I think that's for webrtc-direct. Can something similar can be done for webrtc browser-browser too?

@thomaseizinger
Copy link
Contributor

I think that's for webrtc-direct. Can something similar can be done for webrtc browser-browser too?

You are right, that is for webrtc-direct. We haven't implemented webrtc yet so I can't say.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for improving the specs.

@mxinden mxinden merged commit 0154bdf into master Sep 27, 2023
@mxinden mxinden deleted the sukun/webrtc-init branch September 27, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants