mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
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:
committed by
GitHub
parent
c423f3bfc6
commit
ddf6d60ed4
@@ -9,7 +9,7 @@ func _enter_tree():
|
||||
)
|
||||
|
||||
func _ready():
|
||||
if OS.get_name() == "HTML5":
|
||||
if OS.get_name() == "Web":
|
||||
$VBoxContainer/Signaling.hide()
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user