Action Manager that represent the user.
Color to be used to represend this peer.
WebRTC connection to the peer.
Data channel between the two peers to send message.
If isOfferer, this peer is the one asking to connect, i.e. is a new peer.
Id of the peer
SignalingChannel to use during the ICE framework.
List of possible color for the peers.
Current index in the list of color.
Instanciate the WebRTC connection.
Listen to messages received through the signaling channel.
When the data channel is open, emit an event that a new user is connected and send the current state of the application.
Reconstructs events receive from a peer then emit them.
event to reconstruc.
Sends a message through the data channel to the peer.
Message to send.
Sends action event throught the data channel to the peer if the action was done by the user.
Action event to send.
Sends current state of the application to newly connected peer.
Sends an event through the data channel to the peer.
Event to send.
Create and set the local description for the RTCPeerConnection. Then send the description to the peer.
RTCSessionDescriptionInit to use to create the local description.
Create and set the remote description for the RTCPeerConnection. If the description is an offer, then send an answer to the peer.
RTCSessionDescriptionInit to use to create the remote description.
Set the color of the peer.
Setup the data channel to use for communication between the peers.
Setups action event handlers.
Generated using TypeDoc
A class to represent a Peer. Functions config(), setLocalDescription() and listenToMsg() are based on the code from https://github.com/ScaleDrone/webrtc-text-chat-tutorial/blob/master/script.js .