You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Register missing WebRTCDataChannelJS type
(cherry picked from commit a413656e07)
This commit is contained in:
committed by
Rémi Verschelde
parent
63f35d24c6
commit
022cbeb192
@@ -58,7 +58,7 @@ void WebRTCPeerConnectionJS::_on_error(void *p_obj) {
|
|||||||
|
|
||||||
void WebRTCPeerConnectionJS::_on_data_channel(void *p_obj, int p_id) {
|
void WebRTCPeerConnectionJS::_on_data_channel(void *p_obj, int p_id) {
|
||||||
WebRTCPeerConnectionJS *peer = static_cast<WebRTCPeerConnectionJS *>(p_obj);
|
WebRTCPeerConnectionJS *peer = static_cast<WebRTCPeerConnectionJS *>(p_obj);
|
||||||
peer->emit_signal("data_channel_received", Ref<WebRTCDataChannelJS>(new WebRTCDataChannelJS(p_id)));
|
peer->emit_signal("data_channel_received", Ref<WebRTCDataChannel>(memnew(WebRTCDataChannelJS(p_id))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebRTCPeerConnectionJS::close() {
|
void WebRTCPeerConnectionJS::close() {
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ extern int godot_js_rtc_pc_datachannel_create(int p_id, const char *p_label, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WebRTCPeerConnectionJS : public WebRTCPeerConnection {
|
class WebRTCPeerConnectionJS : public WebRTCPeerConnection {
|
||||||
|
GDCLASS(WebRTCPeerConnectionJS, WebRTCPeerConnection);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _js_id;
|
int _js_id;
|
||||||
ConnectionState _conn_state;
|
ConnectionState _conn_state;
|
||||||
|
|||||||
Reference in New Issue
Block a user