Explorar o código

Updated Readme with gathering state callback

Paul-Louis Ageneau %!s(int64=6) %!d(string=hai) anos
pai
achega
4ae3d51f96
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  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;
 });
 
 ```