summaryrefslogtreecommitdiffstats
path: root/modules/webrtc/library_godot_webrtc.js
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2021-07-20 11:44:40 -0500
committerDavid Snopek <dsnopek@gmail.com>2021-07-20 12:58:39 -0500
commitabb45f5fe7a1d5a44511675ee8695cc3859698b1 (patch)
treefe1e1ca683c10b22b44b977bd6fa73dd76a10434 /modules/webrtc/library_godot_webrtc.js
parentbb037de95c78946746579b6d36fce78cd9b24065 (diff)
downloadredot-engine-abb45f5fe7a1d5a44511675ee8695cc3859698b1.tar.gz
Add get_buffered_amount() to WebRTCDataChannel
Diffstat (limited to 'modules/webrtc/library_godot_webrtc.js')
-rw-r--r--modules/webrtc/library_godot_webrtc.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/webrtc/library_godot_webrtc.js b/modules/webrtc/library_godot_webrtc.js
index 5269117686..a0a6c21be3 100644
--- a/modules/webrtc/library_godot_webrtc.js
+++ b/modules/webrtc/library_godot_webrtc.js
@@ -166,6 +166,11 @@ const GodotRTCDataChannel = {
return GodotRTCDataChannel.get_prop(p_id, 'negotiated', 65535);
},
+ godot_js_rtc_datachannel_get_buffered_amount__sig: 'ii',
+ godot_js_rtc_datachannel_get_buffered_amount: function (p_id) {
+ return GodotRTCDataChannel.get_prop(p_id, 'bufferedAmount', 0);
+ },
+
godot_js_rtc_datachannel_label_get__sig: 'ii',
godot_js_rtc_datachannel_label_get: function (p_id) {
const ref = IDHandler.get(p_id);