Reputation: 1260
I have few doubt about webrtc peer to peer implementation.
When I check sample code I found that
// send any ice candidates to the other peer
pc.onicecandidate = ({candidate}) => signaling.send({candidate});
........................
........................
signaling.onmessage =...........
......................
if (candidate) {
await pc.addIceCandidate(candidate);
I tested that without exchanging icecandidate the video stream works.
Does it create any problem in certain condition.
Upvotes: 1
Views: 355
Reputation: 552
ICE Candidate will help to find the shortest path to the peer. Also onIceCandidate will trigger on both peer.
Note: I tried without sending candidate to other peer that is not works for me.
Upvotes: 1