Fix Web platform checks in WebRTC signaling demo (#1015)

The check to hide the "Listen" button on Web platforms was not updated
from the old 3.x name (HTML5).
This commit is contained in:
Fabio Alessandrelli
2024-02-07 23:05:12 +01:00
committed by GitHub
parent c423f3bfc6
commit ddf6d60ed4
2 changed files with 4 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ func _enter_tree():
)
func _ready():
if OS.get_name() == "HTML5":
if OS.get_name() == "Web":
$VBoxContainer/Signaling.hide()

View File

@@ -103,6 +103,9 @@ func _process(delta):
func listen(port):
if OS.get_name() == "Web":
OS.alert("Cannot create WebSocket servers in Web exports due to browsers' limitations.")
return
stop()
rand.seed = Time.get_unix_time_from_system()
tcp_server.listen(port)