2
0
Эх сурвалжийг харах

Updated Readme with gathering state callback

Paul-Louis Ageneau 5 жил өмнө
parent
commit
4ae3d51f96
1 өөрчлөгдсөн 9 нэмэгдсэн , 1 устгасан
  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;
 });
 
 ```