Skip to content
Snippets Groups Projects
Unverified Commit 34b64ecd authored by Leon's avatar Leon Committed by GitHub
Browse files

Update README.md

parent a7ff8322
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ componentDidUpdate(prevProps, prevState) { ...@@ -81,7 +81,7 @@ componentDidUpdate(prevProps, prevState) {
} }
this.webrtc.on('receivedPeerData', (type, state, peer) => { this.webrtc.on('receivedPeerData', (type, state, peer) => {
if(type === 'stateUpdate') this.setState({ peerState: state }); if (type === 'stateUpdate') this.setState({ peerState: state });
}); });
``` ```
...@@ -272,6 +272,8 @@ webrtc.on('connectionReady', (sessionId) => { ...@@ -272,6 +272,8 @@ webrtc.on('connectionReady', (sessionId) => {
`'connectionReady', sessionId` - emitted when the signaling connection emits the `'connectionReady', sessionId` - emitted when the signaling connection emits the
`connect` event, with the unique id for the session. `connect` event, with the unique id for the session.
`'receivedPeerData', type, payload, peer` - emitted when a peer sends data via `shout` or `whisper`
`'createdPeer', peer` - emitted three times: `'createdPeer', peer` - emitted three times:
- when joining a room with existing peers, once for each peer - when joining a room with existing peers, once for each peer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment