From dbff58ebdd5e5e406da594a776e8724c574a310b Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Thu, 8 Sep 2022 04:39:32 +0200 Subject: [WebRTC] Expose more of the WebRTC API. Add get_gathering_state() returning the iceGatheringState of the connection. Add get_signaling_state() returning the signalingState of the connection. Improve JS library. --- .../webrtc/doc_classes/WebRTCPeerConnection.xml | 39 ++++++++++++++++++++++ .../doc_classes/WebRTCPeerConnectionExtension.xml | 10 ++++++ 2 files changed, 49 insertions(+) (limited to 'modules/webrtc/doc_classes') diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml index e99aeb4f51..4ecc71ddbb 100644 --- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml +++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml @@ -67,6 +67,18 @@ Returns the connection state. See [enum ConnectionState]. + + + + Returns the ICE [enum GatheringState] of the connection. This lets you detect, for example, when collection of ICE candidates has finished. + + + + + + Returns the [enum SignalingState] on the local end of the connection while connecting or reconnecting to another peer. + + @@ -165,5 +177,32 @@ The peer connection is closed (after calling [method close] for example). + + The peer connection was just created and hasn't done any networking yet. + + + The ICE agent is in the process of gathering candidates for the connection. + + + The ICE agent has finished gathering candidates. If something happens that requires collecting new candidates, such as a new interface being added or the addition of a new ICE server, the state will revert to gathering to gather those candidates. + + + There is no ongoing exchange of offer and answer underway. This may mean that the [WebRTCPeerConnection] is new ([constant STATE_NEW]) or that negotiation is complete and a connection has been established ([constant STATE_CONNECTED]). + + + The local peer has called [method set_local_description], passing in SDP representing an offer (usually created by calling [method create_offer]), and the offer has been applied successfully. + + + The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling [method set_remote_description]. + + + The offer sent by the remote peer has been applied and an answer has been created and applied by calling [method set_local_description]. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later. + + + A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling [method set_local_description]. + + + The [WebRTCPeerConnection] has been closed. + diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml b/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml index 3c4bf18a76..474d2f6a89 100644 --- a/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml +++ b/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml @@ -37,6 +37,16 @@ + + + + + + + + + + -- cgit v1.2.3