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 refactor. data channels, STUN/TURN support. #28964

Merged
merged 1 commit into from
May 21, 2019

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented May 17, 2019

A big refactor to the WebRTC module. API is now considered quite stable.

Highlights:

  • Renamed WebRTCPeer to WebRTCPeerConnection.
  • WebRTCPeerConnection no longer act as PacketPeer, it only handle the connection itself (a bit like TCP_Server)
  • Added new WebRTCDataChannel class which inherits from PacketPeer to handle data transfer.
  • Add WebRTCPeerConnection.initialize method to create a new connection with the desired configuration provided as dictionary (see MDN docs).
  • Add WebRTCPeerConnection.create_data_channel method to create a data channel for the given connection. The connection must be in STATE_NEW as specified by the standard (see MDN docs for options).
  • Add a data_channel_received signal to WebRTCPeerConnection for in-band (not negotiated) channels.
  • Renamed WebRTCPeerConnection offer_created signal to session_description_created.
  • Renamed WebRTCPeerConnection new_ice_candidate signal to ice_candidate_created
  • New GDNative bindings to set default WebRTC GDNative library.

EDIT:
webrtc-native release (binaries win/lin 32/64): https://github.com/Faless/webrtc-native/releases/tag/0.2.90
Demo project (with bundled libraries): https://github.com/Faless/webrtc-native-demo/releases/tag/0.2.90

EDIT2: Added doc screens
pc_docs
dc_docs

A big refactor to the WebRTC module. API is now considered quite stable.

Highlights:

- Renamed `WebRTCPeer` to `WebRTCPeerConnection`.
- `WebRTCPeerConnection` no longer act as `PacketPeer`, it only handle the connection itself (a bit like `TCP_Server`)
- Added new `WebRTCDataChannel` class which inherits from `PacketPeer` to handle data transfer.
- Add `WebRTCPeerConnection.initialize` method to create a new connection with the desired configuration provided as dictionary ([see MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#RTCConfiguration_dictionary)).
- Add `WebRTCPeerConnection.create_data_channel` method to create a data channel for the given connection. The connection must be in `STATE_NEW` as specified by the standard ([see MDN docs for options](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createDataChannel#RTCDataChannelInit_dictionary)).
- Add a `data_channel_received` signal to `WebRTCPeerConnection` for in-band (not negotiated) channels.
- Renamed `WebRTCPeerConnection` `offer_created` signal to `session_description_created`.
- Renamed `WebRTCPeerConnection` `new_ice_candidate` signal to `ice_candidate_created`
@Faless Faless added this to the 3.2 milestone May 17, 2019
@Faless Faless requested a review from karroffel as a code owner May 17, 2019 15:46
@Faless Faless changed the title WebRTC refactor. Data channels, STUN/TURN support. WebRTC refactor. data channels, STUN/TURN support. May 17, 2019
@mhilbrunner
Copy link
Member

Wow. This is big :) Good work.

@akien-mga akien-mga merged commit f626383 into godotengine:master May 21, 2019
@akien-mga
Copy link
Member

Thanks a lot!

@cc861010
Copy link

why there is no mac os version of binaries

@Faless
Copy link
Collaborator Author

Faless commented Aug 19, 2019

why there is no mac os version of binaries

Because I don't have a Mac to build it.
A Mac version will be provided for upcoming Betas/RCs (I'll try to get access to a Mac environment from some other dev).

@Faless Faless deleted the webrtc/channels_pr branch July 13, 2021 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants