Traveller, Adventurer, Geek, Passionate about Algorithm, founder of webtutsplus.com, Entrepreneur, and explorer, connect me https://twitter.com/Nilmadhabmondal
How is the offer created?
The Offer is created using pc.createOffer(setLocalAndSendMessage, handleCreateOfferError); where pc is an object of RTCPeerConnection .
How handleIceCandidate function works?
Browser starts creating candidates as soon as we create an object of RTCPeerConnection. To handle these candidates, we must pass a handler function to this RTCPeerConnection Object as follows
pc.onicecandidate = handleIceCandidate; , where pc is an object of RTCPeerConnection .
Whenever a candidate is created by the browser, the handleIceCandidate function will be called
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You have asked me two things:-
How is the offer created?
The Offer is created using pc.createOffer(setLocalAndSendMessage, handleCreateOfferError); where pc is an object of RTCPeerConnection .
How handleIceCandidate function works?
Browser starts creating candidates as soon as we create an object of RTCPeerConnection. To handle these candidates, we must pass a handler function to this RTCPeerConnection Object as follows
pc.onicecandidate = handleIceCandidate; , where pc is an object of RTCPeerConnection .
Whenever a candidate is created by the browser, the handleIceCandidate function will be called