add implicit_control to stats.
This commit is contained in:
parent
f4682d3f1c
commit
5be8319d8a
@ -68,8 +68,8 @@ func (WebRTC) Init(cmd *cobra.Command) error {
|
||||
}
|
||||
|
||||
// TODO: Should be moved to session config.
|
||||
cmd.PersistentFlags().Bool("implicit-control", false, "if enabled members can gain control implicitly")
|
||||
if err := viper.BindPFlag("implicit-control", cmd.PersistentFlags().Lookup("implicit-control")); err != nil {
|
||||
cmd.PersistentFlags().Bool("implicit_control", false, "if enabled members can gain control implicitly")
|
||||
if err := viper.BindPFlag("implicit_control", cmd.PersistentFlags().Lookup("implicit_control")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -130,5 +130,5 @@ func (s *WebRTC) Set() {
|
||||
}
|
||||
|
||||
// TODO: Should be moved to session config.
|
||||
s.ImplicitControl = viper.GetBool("implicit-control")
|
||||
s.ImplicitControl = viper.GetBool("implicit_control")
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ type Stats struct {
|
||||
LastUserLeftAt *time.Time `json:"last_user_left_at"`
|
||||
|
||||
ControlProtection bool `json:"control_protection"`
|
||||
ImplicitControl bool `json:"implicit_control"`
|
||||
}
|
||||
|
||||
type WebSocket interface {
|
||||
|
@ -316,6 +316,7 @@ func (ws *WebSocketHandler) Stats() types.Stats {
|
||||
LastUserLeftAt: ws.lastUserLeftAt,
|
||||
|
||||
ControlProtection: ws.conf.ControlProtection,
|
||||
ImplicitControl: ws.handler.webrtc.ImplicitControl(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user