Fix typing errors in webrtc_signaling demo (#1096)

This commit is contained in:
Fabio Alessandrelli
2024-07-28 01:35:33 +02:00
committed by GitHub
parent 34d174e315
commit 8fd41702c6
4 changed files with 7 additions and 7 deletions

View File

@@ -97,13 +97,13 @@ func _peer_disconnected(id: int) -> void:
rtc_mp.remove_peer(id)
func _offer_received(id: int, offer: int) -> void:
func _offer_received(id: int, offer: String) -> void:
print("Got offer: %d" % id)
if rtc_mp.has_peer(id):
rtc_mp.get_peer(id).connection.set_remote_description("offer", offer)
func _answer_received(id: int, answer: int) -> void:
func _answer_received(id: int, answer: String) -> void:
print("Got answer: %d" % id)
if rtc_mp.has_peer(id):
rtc_mp.get_peer(id).connection.set_remote_description("answer", answer)

View File

@@ -25,8 +25,8 @@ signal connected(id: int, use_mesh: bool)
signal disconnected()
signal peer_connected(id: int)
signal peer_disconnected(id: int)
signal offer_received(id: int, offer: int)
signal answer_received(id: int, answer: int)
signal offer_received(id: int, offer: String)
signal answer_received(id: int, answer: String)
signal candidate_received(id: int, mid: String, index: int, sdp: String)
signal lobby_sealed()

View File

@@ -19,8 +19,8 @@ func _ready() -> void:
@rpc("any_peer", "call_local")
func ping(argument: String) -> void:
_log("[Multiplayer] Ping from peer %d: arg: %s" % [multiplayer.get_remote_sender_id(), argument])
func ping(argument: float) -> void:
_log("[Multiplayer] Ping from peer %d: arg: %f" % [multiplayer.get_remote_sender_id(), argument])
func _mp_server_connected() -> void:

View File

@@ -225,7 +225,7 @@ func _parse_msg(peer: Peer) -> bool:
if not lobbies.has(peer.lobby): # Lobby not found?
return false
var lobby: Peer = lobbies[peer.lobby]
var lobby: Lobby = lobbies[peer.lobby]
if msg.type == Message.SEAL:
# Client is sealing the room.