Ver código fonte

Updated Readme with gathering state callback

Paul-Louis Ageneau 6 anos atrás
pai
commit
4ae3d51f96
1 arquivos alterados com 9 adições e 1 exclusões
  1. 9 1
      README.md

+ 9 - 1
README.md

@@ -57,9 +57,17 @@ MY_ON_RECV_DESCRIPTION_FROM_REMOTE([pc](string sdp) {
 MY_ON_RECV_CANDIDATE_FROM_REMOTE([pc](string candidate, string mid) {
     pc->addRemoteCandidate(rtc::Candidate(candidate, mid));
 });
+```
+
+### Observe the PeerConnection state
 
+```cpp
 pc->onStateChanged([](PeerConnection::State state) {
-	cout << "State: " << state << endl;
+    cout << "State: " << state << endl;
+});
+
+pc->onGatheringStateChanged([](PeerConnection::GatheringState state) {
+    cout << "Gathering state: " << state << endl;
 });
 
 ```