Skip to content

Commit

Permalink
Fix Web platform checks in WebRTC signaling demo
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 committed Feb 1, 2024
1 parent b74261c commit 6638be4
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 6638be4

Please sign in to comment.