Agents enabled check (#2227)

* agents enabled check

* participant -> publisher

* nil check client

* add NumConnections

* add lock around agent check

* do not launch agents against other agents

* regen

* don't need atomic anymore

* update protocol
This commit is contained in:
David Colburn
2023-11-07 19:19:07 -08:00
committed by GitHub
parent 302facc60d
commit 57643a42ed
15 changed files with 385 additions and 91 deletions
+7
View File
@@ -1034,6 +1034,13 @@ func (p *ParticipantImpl) IsRecorder() bool {
return p.grants.Video.Recorder
}
func (p *ParticipantImpl) IsAgent() bool {
p.lock.RLock()
defer p.lock.RUnlock()
return p.grants.Video.Agent
}
func (p *ParticipantImpl) VerifySubscribeParticipantInfo(pID livekit.ParticipantID, version uint32) {
if !p.IsReady() {
// we have not sent a JoinResponse yet. metadata would be covered in JoinResponse