config

package
v1.10.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 12 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExternalIP added in v0.10.5

func GetExternalIP(stunServers []string) (string, error)

func GetLocalIPAddress added in v0.10.5

func GetLocalIPAddress() (string, error)

Types

type AudioConfig

type AudioConfig struct {
	// minimum level to be considered active, 0-127, where 0 is loudest
	ActiveLevel uint8 `yaml:"active_level"`
	// percentile to measure, a participant is considered active if it has exceeded the ActiveLevel more than
	// MinPercentile% of the time
	MinPercentile uint8 `yaml:"min_percentile"`
	// interval to update clients, in ms
	UpdateInterval uint32 `yaml:"update_interval"`
	// smoothing for audioLevel values sent to the client.
	// audioLevel will be an average of `smooth_intervals`, 0 to disable
	SmoothIntervals uint32 `yaml:"smooth_intervals"`
}

func GetAudioConfig

func GetAudioConfig(conf *Config) AudioConfig

type CodecSpec added in v0.10.1

type CodecSpec struct {
	Mime     string `yaml:"mime"`
	FmtpLine string `yaml:"fmtp_line"`
}

type Config

type Config struct {
	Port           uint32            `yaml:"port"`
	PrometheusPort uint32            `yaml:"prometheus_port"`
	RTC            RTCConfig         `yaml:"rtc"`
	Redis          RedisConfig       `yaml:"redis"`
	Audio          AudioConfig       `yaml:"audio"`
	Room           RoomConfig        `yaml:"room"`
	TURN           TURNConfig        `yaml:"turn"`
	KeyFile        string            `yaml:"key_file"`
	Keys           map[string]string `yaml:"keys"`
	LogLevel       string            `yaml:"log_level"`

	Development bool `yaml:"development"`
}

func NewConfig

func NewConfig(confString string, c *cli.Context) (*Config, error)

func (*Config) HasRedis

func (conf *Config) HasRedis() bool

type PLIThrottleConfig added in v0.9.14

type PLIThrottleConfig struct {
	LowQuality  time.Duration `yaml:"low_quality"`
	MidQuality  time.Duration `yaml:"mid_quality"`
	HighQuality time.Duration `yaml:"high_quality"`
}

type RTCConfig

type RTCConfig struct {
	UDPPort           uint32 `yaml:"udp_port"`
	TCPPort           uint32 `yaml:"tcp_port"`
	ICEPortRangeStart uint32 `yaml:"port_range_start"`
	ICEPortRangeEnd   uint32 `yaml:"port_range_end"`
	NodeIP            string `yaml:"node_ip"`
	// for testing, disable UDP
	ForceTCP      bool     `yaml:"force_tcp"`
	StunServers   []string `yaml:"stun_servers"`
	UseExternalIP bool     `yaml:"use_external_ip"`

	// Number of packets to buffer for NACK
	PacketBufferSize int `yaml:"packet_buffer_size"`

	// Max bitrate for REMB
	MaxBitrate uint64 `yaml:"max_bitrate"`

	// Throttle periods for pli/fir rtcp packets
	PLIThrottle PLIThrottleConfig `yaml:"pli_throttle"`
}

type RedisConfig

type RedisConfig struct {
	Address  string `yaml:"address"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

type RoomConfig added in v0.10.1

type RoomConfig struct {
	EnabledCodecs   []CodecSpec `yaml:"enabled_codecs"`
	MaxParticipants uint32      `yaml:"max_participants"`
	EmptyTimeout    uint32      `yaml:"empty_timeout"`
}

type TURNConfig

type TURNConfig struct {
	Enabled  bool   `yaml:"enabled"`
	Domain   string `yaml:"domain"`
	CertFile string `yaml:"cert_file"`
	KeyFile  string `yaml:"key_file"`
	TLSPort  int    `yaml:"tls_port"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL