fn extract_candidates(sdp: &String) -> Vec<String> {
    let lines = sdp.lines().collect::<Vec<_>>();
    lines
        .iter()
        .filter(|l| l.starts_with(PREFIX_ATTRIBUTE_CANDIDATE))
        .map(|l| l.trim_start_matches(PREFIX_ATTRIBUTE).to_string())
        .collect::<Vec<_>>()
}
/// Parses the given sdp for all ice candidates
/// Returns a vec of simple strings, with the leading a= removed. 
/// For, example, the following sdp:
///     a=rtcp:9 IN IP4 0.0.0.0
///     a=candidate:3719404024 1 udp 2122260223 192.168.0.91 55827 typ host generation 0 network-id 1 network-cost 10
///     a=ice-ufrag:avZ6
/// yields vec!["candidate:3719404024 1 udp 2122260223 192.168.0.91 55827 typ host generation 0 network-id 1 network-cost 10"]
/// Ice candidates need to be added to webrtcbin with a media line index, but we're forcing max-bundle, which means
/// all streams are transmitted over the same connection, which ultimately will be the first media; media line index will be always
/// be zero in max-bundle
Parses the given sdp for all ice candidates
Returns a vec of simple strings, with the leading a= removed.
Parses the given sdp for all ice candidates Returns a vec of simple strings with the leading a = removed .
fn extract_candidates(sdp: &String) -> Vec<String> {
    let lines = sdp.lines().collect::<Vec<_>>();
    lines
        .iter()
        .filter(|l| l.starts_with(PREFIX_ATTRIBUTE_CANDIDATE))
        .map(|l| l.trim_start_matches(PREFIX_ATTRIBUTE).to_string())
        .collect::<Vec<_>>()
}
fn extract_candidates ( sdp : & String ) -> Vec < String > { let lines = sdp . lines ( ) . collect :: < Vec < _ > > ( ) ; lines . iter ( ) . filter ( | l | l . starts_with ( PREFIX_ATTRIBUTE_CANDIDATE ) ) . map ( | l | l . trim_start_matches ( PREFIX_ATTRIBUTE ) . to_string ( ) ) . collect :: < Vec < _ > > ( ) }
Parses the given sdp for all ice candidates
Returns a vec of simple strings, with the leading a= removed.
Parses the given sdp for all ice candidates Returns a vec of simple strings with the leading a = removed .
sdp
&String
sdp
&String