PUBLIC

JavaScript RTCDataChannel : EventTarget

Details

Although WebRTC is a peer to peer protocol, the peers need some information about each other before they can communicate. Typically this is done with a Signaling Server, but any mechanism to transfer data can be used. The following demonstrates setting up the peer connection using the clipboard (via copy/paste) to transfer the connection data.

Offerer

This example demonstrates the peer that creates the offer.

Example:

Run

Results:

 

Answerer

This example demonstrates the peer that receives the offer and creates the answer.

Example:

Run

Results: