diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-09-13 17:10:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-13 17:10:38 +0200 |
commit | f6b36f54e50cff518b4085cf665405ad1b5f6d44 (patch) | |
tree | 27f36d7fddbc5551aa87df3dfcb856ed9a5c75ca /modules/webrtc/webrtc_peer_connection.cpp | |
parent | 22a09fef5d56fc7c37d70118532509076ebd7b12 (diff) | |
parent | dbff58ebdd5e5e406da594a776e8724c574a310b (diff) |
Merge pull request #65659 from Faless/rtc/4.x_expose_more
[WebRTC] Expose more of the WebRTC API.
Diffstat (limited to 'modules/webrtc/webrtc_peer_connection.cpp')
-rw-r--r-- | modules/webrtc/webrtc_peer_connection.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/webrtc/webrtc_peer_connection.cpp b/modules/webrtc/webrtc_peer_connection.cpp index d885b9262b..5aa891d35c 100644 --- a/modules/webrtc/webrtc_peer_connection.cpp +++ b/modules/webrtc/webrtc_peer_connection.cpp @@ -69,6 +69,8 @@ void WebRTCPeerConnection::_bind_methods() { ClassDB::bind_method(D_METHOD("close"), &WebRTCPeerConnection::close); ClassDB::bind_method(D_METHOD("get_connection_state"), &WebRTCPeerConnection::get_connection_state); + ClassDB::bind_method(D_METHOD("get_gathering_state"), &WebRTCPeerConnection::get_gathering_state); + ClassDB::bind_method(D_METHOD("get_signaling_state"), &WebRTCPeerConnection::get_signaling_state); ADD_SIGNAL(MethodInfo("session_description_created", PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::STRING, "sdp"))); ADD_SIGNAL(MethodInfo("ice_candidate_created", PropertyInfo(Variant::STRING, "media"), PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::STRING, "name"))); @@ -80,6 +82,17 @@ void WebRTCPeerConnection::_bind_methods() { BIND_ENUM_CONSTANT(STATE_DISCONNECTED); BIND_ENUM_CONSTANT(STATE_FAILED); BIND_ENUM_CONSTANT(STATE_CLOSED); + + BIND_ENUM_CONSTANT(GATHERING_STATE_NEW); + BIND_ENUM_CONSTANT(GATHERING_STATE_GATHERING); + BIND_ENUM_CONSTANT(GATHERING_STATE_COMPLETE); + + BIND_ENUM_CONSTANT(SIGNALING_STATE_STABLE); + BIND_ENUM_CONSTANT(SIGNALING_STATE_HAVE_LOCAL_OFFER); + BIND_ENUM_CONSTANT(SIGNALING_STATE_HAVE_REMOTE_OFFER); + BIND_ENUM_CONSTANT(SIGNALING_STATE_HAVE_LOCAL_PRANSWER); + BIND_ENUM_CONSTANT(SIGNALING_STATE_HAVE_REMOTE_PRANSWER); + BIND_ENUM_CONSTANT(SIGNALING_STATE_CLOSED); } WebRTCPeerConnection::WebRTCPeerConnection() { |