Skip to content

Commit

Permalink
Fix Web platform checks in WebRTC signaling demo (#1015)
Browse files Browse the repository at this point in the history
The check to hide the "Listen" button on Web platforms was not updated
from the old 3.x name (HTML5).
  • Loading branch information
Faless authored Feb 7, 2024
1 parent c423f3b commit ddf6d60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion networking/webrtc_signaling/demo/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func _enter_tree():
)

func _ready():
if OS.get_name() == "HTML5":
if OS.get_name() == "Web":
$VBoxContainer/Signaling.hide()


Expand Down
3 changes: 3 additions & 0 deletions networking/webrtc_signaling/server/ws_webrtc_server.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ddf6d60

Please sign in to comment.