RTC Ice_servers configuration on web_sys - solved

Just had the same problem as described here:

This is what I came up with - but probably this can be optimized somewhat:

#[derive(Serialize, Deserialize)]
struct IceServer{
    urls: String,

let mut config = RtcConfiguration::new();
let servers_obj = vec![IceServer{
    urls: "stun:stun.l.google.com:19302".to_string()
let servers = JsValue::from_serde(&servers_obj)?;
let rp_conn = RtcPeerConnection::new_with_configuration(&config)?;

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.