main.gd 347 B

12345678910111213141516
  1. extends Control
  2. func _ready():
  3. if OS.get_name() == "HTML5":
  4. $VBoxContainer/Signaling.hide()
  5. func _on_listen_toggled(button_pressed):
  6. if button_pressed:
  7. $Server.listen(int($VBoxContainer/Signaling/Port.value))
  8. else:
  9. $Server.stop()
  10. func _on_LinkButton_pressed():
  11. OS.shell_open("https://github.com/godotengine/webrtc-native/releases")