How WebRTC Works?
To enable WebRTC communication, the following four steps are required:
Step 1: Access to media streams through webcam or microphone (carried out via GetUserMedia JavaScript API)
Step 2: Basic network–related information such as ports and IP addresses and this information needs to be shared with another browser through signalling (carried out via RTCPeerConnection JavaScript API)
Step 3: Info about the parameters of media data (carried out via RTCPeerConnection JavaScript API)
Step 4: Transfer media data (carried out via RTCDataChannel JavaScript API)