Open tylerlong opened 9 months ago
Suggested change:
function ipAddressFromSdp(sdp: string) {
const m = sdp.match(/^IN (IP4|IP6) ([^ ]+)$/);
if (!m) return undefined;
return m[2];
}
Or
function ipAddressFromSdp(sdp: string) {
const m = sdp.match(/^IN (IP4|IP6) ([^ ]+)$/);
if (!m) return '0.0.0.0';
return m[2];
}
According to https://www.ietf.org/rfc/rfc3605.txt
is valid. In such case, there is no IP address.