summaryrefslogtreecommitdiff
path: root/modules/webrtc
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-01-28 15:35:25 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-01-28 15:35:40 +0100
commit7c3003fcbedf1eed3dac3ffe8ee740b5cf0efe3a (patch)
tree9dd0ae12ed6d2c1c6d07094ad9838130fddb1970 /modules/webrtc
parent38c6611b91f5ee7ded0c2c1d279ab7dcdc4f2f1c (diff)
Improve some signal bindings to use specific `Object` subtypes
Diffstat (limited to 'modules/webrtc')
-rw-r--r--modules/webrtc/doc_classes/WebRTCPeerConnection.xml2
-rw-r--r--modules/webrtc/webrtc_peer_connection.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
index 2f2c2c379d..416a674435 100644
--- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
+++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
@@ -117,7 +117,7 @@
</methods>
<signals>
<signal name="data_channel_received">
- <argument index="0" name="channel" type="Object" />
+ <argument index="0" name="channel" type="WebRTCDataChannel" />
<description>
Emitted when a new in-band channel is received, i.e. when the channel was created with [code]negotiated: false[/code] (default).
The object will be an instance of [WebRTCDataChannel]. You must keep a reference of it or it will be closed automatically. See [method create_data_channel].
diff --git a/modules/webrtc/webrtc_peer_connection.cpp b/modules/webrtc/webrtc_peer_connection.cpp
index 96cf518c06..7fdf26d3cd 100644
--- a/modules/webrtc/webrtc_peer_connection.cpp
+++ b/modules/webrtc/webrtc_peer_connection.cpp
@@ -69,7 +69,7 @@ void WebRTCPeerConnection::_bind_methods() {
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")));
- ADD_SIGNAL(MethodInfo("data_channel_received", PropertyInfo(Variant::OBJECT, "channel")));
+ ADD_SIGNAL(MethodInfo("data_channel_received", PropertyInfo(Variant::OBJECT, "channel", PROPERTY_HINT_RESOURCE_TYPE, "WebRTCDataChannel")));
BIND_ENUM_CONSTANT(STATE_NEW);
BIND_ENUM_CONSTANT(STATE_CONNECTING);