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

Projects
None yet
3 participants
@Faless
Copy link
Contributor

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

WebRTC refactor. Data channels, STUN/TURN support.
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

@Faless Faless changed the title WebRTC refactor. Data channels, STUN/TURN support. WebRTC refactor. data channels, STUN/TURN support. May 17, 2019

@mhilbrunner

This comment has been minimized.

Copy link
Member

commented May 17, 2019

Wow. This is big :) Good work.

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@akien-mga

This comment has been minimized.

Copy link
Member

commented May 21, 2019

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.