Implicit control gain (#108)
* add client side implicit hosting. * add server side implicit hosting. * update changelog. * allow clipboard & keybaord access.
This commit is contained in:
@ -22,6 +22,8 @@ type WebRTC struct {
|
||||
NAT1To1IPs []string
|
||||
TCPMUX int
|
||||
UDPMUX int
|
||||
|
||||
ImplicitControl bool
|
||||
}
|
||||
|
||||
func (WebRTC) Init(cmd *cobra.Command) error {
|
||||
@ -65,6 +67,12 @@ func (WebRTC) Init(cmd *cobra.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: Should be moved to session config.
|
||||
cmd.PersistentFlags().Bool("implicitcontrol", false, "if enabled members can gain control implicitly")
|
||||
if err := viper.BindPFlag("implicitcontrol", cmd.PersistentFlags().Lookup("implicitcontrol")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -120,4 +128,7 @@ func (s *WebRTC) Set() {
|
||||
s.EphemeralMin = min
|
||||
s.EphemeralMax = max
|
||||
}
|
||||
|
||||
// TODO: Should be moved to session config.
|
||||
s.ImplicitControl = viper.GetBool("implicitcontrol")
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ type SessionManager interface {
|
||||
ClearHost()
|
||||
Has(id string) bool
|
||||
Get(id string) (Session, bool)
|
||||
SetControlLocked(locked bool)
|
||||
CanControl(id string) bool
|
||||
Members() []*Member
|
||||
Admins() []*Member
|
||||
Destroy(id string)
|
||||
|
@ -13,6 +13,7 @@ type WebRTCManager interface {
|
||||
CreatePeer(id string, session Session) (Peer, error)
|
||||
ICELite() bool
|
||||
ICEServers() []webrtc.ICEServer
|
||||
ImplicitControl() bool
|
||||
}
|
||||
|
||||
type Peer interface {
|
||||
|
Reference in New Issue
Block a user