Hidden participants (#65)

Enables hidden recording and/or forwarding participants
This commit is contained in:
David Colburn
2021-07-19 18:33:28 -05:00
committed by GitHub
parent 87dfb2b117
commit 4bab395ac9
14 changed files with 165 additions and 16 deletions
+6
View File
@@ -39,6 +39,7 @@ type ParticipantParams struct {
Stats *RoomStatsReporter
ThrottleConfig config.PLIThrottleConfig
EnabledCodecs []*livekit.Codec
Hidden bool
}
type ParticipantImpl struct {
@@ -195,6 +196,7 @@ func (p *ParticipantImpl) ToProto() *livekit.ParticipantInfo {
Metadata: p.metadata,
State: p.State(),
JoinedAt: p.ConnectedAt().Unix(),
Hidden: p.Hidden(),
}
p.lock.RLock()
@@ -583,6 +585,10 @@ func (p *ParticipantImpl) CanSubscribe() bool {
return p.permission == nil || p.permission.CanSubscribe
}
func (p *ParticipantImpl) Hidden() bool {
return p.params.Hidden
}
func (p *ParticipantImpl) SubscriberPC() *webrtc.PeerConnection {
return p.subscriber.pc
}