stats ice Candidates Count.

This commit is contained in:
Miroslav Šedivý
2022-06-30 23:50:47 +02:00
parent 8e80ef2c69
commit fc5c017666
2 changed files with 34 additions and 0 deletions

View File

@ -411,6 +411,14 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
if ok {
manager.metrics.SetTransportStats(session, data)
}
for _, entry := range stats {
// only remote ice candidate stats
candidate, ok := entry.(webrtc.ICECandidateStats)
if ok && candidate.Type == webrtc.StatsTypeRemoteCandidate {
manager.metrics.NewICECandidate(session, candidate.ID)
}
}
}
}()