From 729b1e9941c0eeb0d51608c313ae2096ce13b2ba Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 11 May 2019 01:46:27 +0200 Subject: 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` --- modules/webrtc/doc_classes/WebRTCDataChannel.xml | 95 +++++++++++++++ modules/webrtc/doc_classes/WebRTCPeer.xml | 109 ----------------- .../webrtc/doc_classes/WebRTCPeerConnection.xml | 129 +++++++++++++++++++++ 3 files changed, 224 insertions(+), 109 deletions(-) create mode 100644 modules/webrtc/doc_classes/WebRTCDataChannel.xml delete mode 100644 modules/webrtc/doc_classes/WebRTCPeer.xml create mode 100644 modules/webrtc/doc_classes/WebRTCPeerConnection.xml (limited to 'modules/webrtc/doc_classes') diff --git a/modules/webrtc/doc_classes/WebRTCDataChannel.xml b/modules/webrtc/doc_classes/WebRTCDataChannel.xml new file mode 100644 index 0000000000..dcc14d4ddb --- /dev/null +++ b/modules/webrtc/doc_classes/WebRTCDataChannel.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/webrtc/doc_classes/WebRTCPeer.xml b/modules/webrtc/doc_classes/WebRTCPeer.xml deleted file mode 100644 index 18d1345623..0000000000 --- a/modules/webrtc/doc_classes/WebRTCPeer.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml new file mode 100644 index 0000000000..8b14c60deb --- /dev/null +++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3