diff --git a/mediasoupclient/src/api/transport.rs b/mediasoupclient/src/api/transport.rs index b223ee7d..d31972b5 100644 --- a/mediasoupclient/src/api/transport.rs +++ b/mediasoupclient/src/api/transport.rs @@ -57,11 +57,13 @@ impl From for PeerConnectionState { } #[cfg(not(target_arch = "wasm32"))] + // In native, we need to look directly at the ICE connection state change it seems? + // Similar mapping to https://github.com/versatica/mediasoup-client/blob/a813c39bde5c9493436d2f6c7af7fa310a96decd/src/handlers/Firefox60.ts#L213 fn from(s: ffi::transport::ConnectionState) -> Self { match s.0.as_str() { "new" => PeerConnectionState::New, - "connecting" => PeerConnectionState::Connecting, - "connected" => PeerConnectionState::Connected, + "checking" => PeerConnectionState::Connecting, + "connected" | "completed" => PeerConnectionState::Connected, "failed" => PeerConnectionState::Failed, "disconnected" => PeerConnectionState::Disconnected, "closed" => PeerConnectionState::Closed,