Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateCLIFlags(existingFlags []cli.Flag, hidden bool) ([]cli.Flag, error)
- func GetExternalIP(ctx context.Context, stunServers []string, localAddr net.Addr) (string, error)
- func GetLocalIPAddresses(includeLoopback bool) ([]string, error)
- type APIConfig
- type AudioConfig
- type CodecSpec
- type Config
- type CongestionControlConfig
- type CongestionControlProbeMode
- type EgressConfig
- type IPsConfig
- type IngressConfig
- type InterfacesConfig
- type LimitConfig
- type LoggingConfig
- type NodeSelectorConfig
- type PLIThrottleConfig
- type RTCConfig
- type RegionConfig
- type RoomConfig
- type StreamTrackerConfig
- type StreamTrackerFrameConfig
- type StreamTrackerPacketConfig
- type StreamTrackerType
- type StreamTrackersConfig
- type TURNConfig
- type TURNServer
- type VideoConfig
- type WebHookConfig
Constants ¶
View Source
const ( CongestionControlProbeModePadding CongestionControlProbeMode = "padding" CongestionControlProbeModeMedia CongestionControlProbeMode = "media" StreamTrackerTypePacket StreamTrackerType = "packet" StreamTrackerTypeFrame StreamTrackerType = "frame" StatsUpdateInterval = time.Second * 10 TelemetryStatsUpdateInterval = time.Second * 30 )
Variables ¶
View Source
var ( ErrKeyFileIncorrectPermission = errors.New("key file must have 0600 permission") ErrKeysNotSet = errors.New("one of key-file or keys must be provided") )
View Source
var DefaultStunServers = []string{
"stun.l.google.com:19302",
"stun1.l.google.com:19302",
}
Functions ¶
func GenerateCLIFlags ¶ added in v1.3.0
func GetExternalIP ¶ added in v0.10.5
GetExternalIP return external IP for localAddr from stun server. If localAddr is nil, a local address is chosen automatically, else the address will be used to validate the external IP is accessible from the outside.
func GetLocalIPAddresses ¶ added in v0.15.3
Types ¶
type APIConfig ¶ added in v1.3.2
type APIConfig struct {
// amount of time to wait for API to execute, default 2s
ExecutionTimeout time.Duration
// amount of time to wait before checking for operation complete
CheckInterval time.Duration
}
not exposed to YAML
func DefaultAPIConfig ¶ added in v1.3.2
func DefaultAPIConfig() APIConfig
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"`
}
type Config ¶
type Config struct {
Port uint32 `yaml:"port"`
BindAddresses []string `yaml:"bind_addresses"`
PrometheusPort uint32 `yaml:"prometheus_port,omitempty"`
Environment string `yaml:"environment,omitempty"`
RTC RTCConfig `yaml:"rtc,omitempty"`
Redis redisLiveKit.RedisConfig `yaml:"redis,omitempty"`
Audio AudioConfig `yaml:"audio,omitempty"`
Video VideoConfig `yaml:"video,omitempty"`
Room RoomConfig `yaml:"room,omitempty"`
TURN TURNConfig `yaml:"turn,omitempty"`
Egress EgressConfig `yaml:"egress,omitempty"`
Ingress IngressConfig `yaml:"ingress,omitempty"`
WebHook WebHookConfig `yaml:"webhook,omitempty"`
NodeSelector NodeSelectorConfig `yaml:"node_selector,omitempty"`
KeyFile string `yaml:"key_file,omitempty"`
Keys map[string]string `yaml:"keys,omitempty"`
Region string `yaml:"region,omitempty"`
// LogLevel is deprecated
LogLevel string `yaml:"log_level,omitempty"`
Logging LoggingConfig `yaml:"logging,omitempty"`
Limit LimitConfig `yaml:"limit,omitempty"`
Development bool `yaml:"development,omitempty"`
}
func (*Config) IsTURNSEnabled ¶ added in v1.2.1
func (*Config) ToCLIFlagNames ¶ added in v1.3.0
func (*Config) ValidateKeys ¶ added in v1.3.2
type CongestionControlConfig ¶ added in v0.15.2
type CongestionControlConfig struct {
Enabled bool `yaml:"enabled"`
AllowPause bool `yaml:"allow_pause"`
UseSendSideBWE bool `yaml:"send_side_bandwidth_estimation,omitempty"`
ProbeMode CongestionControlProbeMode `yaml:"padding_mode,omitempty"`
MinChannelCapacity int64 `yaml:"min_channel_capacity,omitempty"`
}
type CongestionControlProbeMode ¶ added in v0.15.5
type CongestionControlProbeMode string
type EgressConfig ¶ added in v1.3.3
type EgressConfig struct {
UsePsRPC bool `yaml:"use_psrpc"`
}
type IngressConfig ¶ added in v1.2.0
type IngressConfig struct {
RTMPBaseURL string `yaml:"rtmp_base_url"`
}
type InterfacesConfig ¶ added in v0.15.6
type LimitConfig ¶ added in v0.15.0
type LoggingConfig ¶ added in v0.15.3
type NodeSelectorConfig ¶ added in v0.12.3
type NodeSelectorConfig struct {
Kind string `yaml:"kind"`
SortBy string `yaml:"sort_by"`
CPULoadLimit float32 `yaml:"cpu_load_limit"`
SysloadLimit float32 `yaml:"sysload_limit"`
Regions []RegionConfig `yaml:"regions"`
}
type PLIThrottleConfig ¶ added in v0.9.14
type RTCConfig ¶
type RTCConfig struct {
UDPPort uint32 `yaml:"udp_port,omitempty"`
TCPPort uint32 `yaml:"tcp_port,omitempty"`
ICEPortRangeStart uint32 `yaml:"port_range_start,omitempty"`
ICEPortRangeEnd uint32 `yaml:"port_range_end,omitempty"`
NodeIP string `yaml:"node_ip,omitempty"`
NodeIPAutoGenerated bool `yaml:"-"`
STUNServers []string `yaml:"stun_servers,omitempty"`
TURNServers []TURNServer `yaml:"turn_servers,omitempty"`
UseExternalIP bool `yaml:"use_external_ip"`
UseICELite bool `yaml:"use_ice_lite,omitempty"`
Interfaces InterfacesConfig `yaml:"interfaces"`
IPs IPsConfig `yaml:"ips"`
EnableLoopbackCandidate bool `yaml:"enable_loopback_candidate"`
UseMDNS bool `yaml:"use_mdns"`
StrictACKs bool `yaml:"strict_acks"`
// Number of packets to buffer for NACK
PacketBufferSize int `yaml:"packet_buffer_size,omitempty"`
// Throttle periods for pli/fir rtcp packets
PLIThrottle PLIThrottleConfig `yaml:"pli_throttle,omitempty"`
CongestionControl CongestionControlConfig `yaml:"congestion_control,omitempty"`
// allow TCP and TURN/TLS fallback
AllowTCPFallback *bool `yaml:"allow_tcp_fallback,omitempty"`
// for testing, disable UDP
ForceTCP bool `yaml:"force_tcp,omitempty"`
// force a reconnect on a publication error
ReconnectOnPublicationError *bool `yaml:"reconnect_on_publication_error,omitempty"`
// force a reconnect on a subscription error
ReconnectOnSubscriptionError *bool `yaml:"reconnect_on_subscription_error,omitempty"`
}
type RegionConfig ¶ added in v0.13.5
type RegionConfig struct {
Name string `yaml:"name"`
Lat float64 `yaml:"lat"`
Lon float64 `yaml:"lon"`
}
RegionConfig lists available regions and their latitude/longitude, so the selector would prefer regions that are closer
type RoomConfig ¶ added in v0.10.1
type RoomConfig struct {
// enable rooms to be automatically created
AutoCreate bool `yaml:"auto_create"`
EnabledCodecs []CodecSpec `yaml:"enabled_codecs"`
MaxParticipants uint32 `yaml:"max_participants"`
EmptyTimeout uint32 `yaml:"empty_timeout"`
EnableRemoteUnmute bool `yaml:"enable_remote_unmute"`
MaxMetadataSize uint32 `yaml:"max_metadata_size"`
}
type StreamTrackerConfig ¶ added in v1.3.3
type StreamTrackerConfig struct {
StreamTrackerType StreamTrackerType `yaml:"stream_tracker_type,omitempty"`
BitrateReportInterval map[int32]time.Duration `yaml:"bitrate_report_interval,omitempty"`
PacketTracker map[int32]StreamTrackerPacketConfig `yaml:"packet_tracker,omitempty"`
FrameTracker map[int32]StreamTrackerFrameConfig `yaml:"frame_tracker,omitempty"`
}
type StreamTrackerFrameConfig ¶ added in v1.3.3
type StreamTrackerFrameConfig struct {
MinFPS float64 `yaml:"min_fps"`
}
type StreamTrackerPacketConfig ¶ added in v1.3.3
type StreamTrackerType ¶ added in v1.3.3
type StreamTrackerType string
type StreamTrackersConfig ¶ added in v1.3.3
type StreamTrackersConfig struct {
Video StreamTrackerConfig `yaml:"video"`
}
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"`
UDPPort int `yaml:"udp_port"`
RelayPortRangeStart uint16 `yaml:"relay_range_start,omitempty"`
RelayPortRangeEnd uint16 `yaml:"relay_range_end,omitempty"`
ExternalTLS bool `yaml:"external_tls"`
}
type TURNServer ¶ added in v0.15.4
type VideoConfig ¶ added in v0.15.6
type VideoConfig struct {
DynacastPauseDelay time.Duration `yaml:"dynacast_pause_delay,omitempty"`
StreamTracker StreamTrackersConfig `yaml:"stream_tracker,omitempty"`
}
type WebHookConfig ¶ added in v0.12.1
Click to show internal directories.
Click to hide internal directories.