mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: raw ice candidate on Stream.getSelectedIceCandidateInfo
parent
4e0092614d
commit
abf143b60f
|
@ -113,10 +113,24 @@ export class WebRtcStats {
|
||||||
remoteCandidateId = stat.remoteCandidateId;
|
remoteCandidateId = stat.remoteCandidateId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const finalLocalCandidate = localCandidates[localCandidateId];
|
||||||
|
finalLocalCandidate.raw = this.stream.getLocalIceCandidateList().filter((c: RTCIceCandidate) => {
|
||||||
|
return (!!c.candidate &&
|
||||||
|
c.candidate.indexOf(finalLocalCandidate.ipAddress) > 0 &&
|
||||||
|
c.candidate.indexOf(finalLocalCandidate.portNumber) > 0) &&
|
||||||
|
c.candidate.indexOf(finalLocalCandidate.priority) > 0;
|
||||||
|
})[0].candidate;
|
||||||
|
const finalRemoteCandidate = remoteCandidates[remoteCandidateId];
|
||||||
|
finalRemoteCandidate.raw = this.stream.getRemoteIceCandidateList().filter((c: RTCIceCandidate) => {
|
||||||
|
return (!!c.candidate &&
|
||||||
|
c.candidate.indexOf(finalRemoteCandidate.ipAddress) > 0 &&
|
||||||
|
c.candidate.indexOf(finalRemoteCandidate.portNumber) > 0) &&
|
||||||
|
c.candidate.indexOf(finalRemoteCandidate.priority) > 0;
|
||||||
|
})[0].candidate;
|
||||||
resolve({
|
resolve({
|
||||||
googCandidatePair,
|
googCandidatePair,
|
||||||
localCandidate: localCandidates[localCandidateId],
|
localCandidate: finalLocalCandidate,
|
||||||
remoteCandidate: remoteCandidates[remoteCandidateId]
|
remoteCandidate: finalRemoteCandidate
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
reject('Selected ICE candidate info only available for Chrome');
|
reject('Selected ICE candidate info only available for Chrome');
|
||||||
|
|
Loading…
Reference in New Issue