summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-11-20 11:07:11 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-04-12 18:51:48 +0200
commit66a5166870587ef64c50d9e11f927ba1a5539577 (patch)
tree9051e8995a9dac739b6874298681d2c64505f51e
parent320960cd327e087f457fe4d697b401d5bf71fb95 (diff)
Register WebRTCPeerJS and WebRTCPeerGDNative
-rw-r--r--modules/webrtc/register_types.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/webrtc/register_types.cpp b/modules/webrtc/register_types.cpp
index e4487ddbe8..ee7a766bd9 100644
--- a/modules/webrtc/register_types.cpp
+++ b/modules/webrtc/register_types.cpp
@@ -31,8 +31,25 @@
#include "register_types.h"
#include "webrtc_peer.h"
+#ifdef JAVASCRIPT_ENABLED
+#include "emscripten.h"
+#include "webrtc_peer_js.h"
+#endif
+#ifdef WEBRTC_GDNATIVE_ENABLED
+#include "webrtc_peer_gdnative.h"
+#endif
+
void register_webrtc_types() {
+#ifdef JAVASCRIPT_ENABLED
+ WebRTCPeerJS::make_default();
+#elif defined(WEBRTC_GDNATIVE_ENABLED)
+ WebRTCPeerGDNative::make_default();
+#endif
+
ClassDB::register_custom_instance_class<WebRTCPeer>();
+#ifdef WEBRTC_GDNATIVE_ENABLED
+ ClassDB::register_class<WebRTCPeerGDNative>();
+#endif
}
void unregister_webrtc_types() {}