Document tcp fallback (#961)
* Updated docs around TCP fallback * changed allowFallback to a pointer
This commit is contained in:
+11
-10
@@ -35,17 +35,14 @@ rtc:
|
|||||||
# this is useful for cloud environments such as AWS & Google where hosts have an internal IP
|
# this is useful for cloud environments such as AWS & Google where hosts have an internal IP
|
||||||
# that maps to an external one
|
# that maps to an external one
|
||||||
use_external_ip: true
|
use_external_ip: true
|
||||||
# when set to true, server will use a lite ice agent, that will speed up ice connection, but
|
# # when set, LiveKit will attempt to use a UDP mux so all UDP traffic goes through
|
||||||
# might cause connect issue if server running behind NAT.
|
# # a single port. This simplifies deployment, but mux will become an overhead for
|
||||||
# use_ice_lite: true
|
# # highly trafficked deployments.
|
||||||
# when set, LiveKit will attempt to use a UDP mux so all UDP traffic goes through
|
# # port_range_start & end must not be set for this config to take effect
|
||||||
# a single port. This simplifies deployment, but mux will become an overhead for
|
|
||||||
# highly trafficked deployments.
|
|
||||||
# port_range_start & end must not be set for this config to take effect
|
|
||||||
# udp_port: 7882
|
# udp_port: 7882
|
||||||
# optional settings
|
# # when set to true, server will use a lite ice agent, that will speed up ice connection, but
|
||||||
# # number of packets to buffer in the SFU, defaults to 500
|
# # might cause connect issue if server running behind NAT.
|
||||||
# packet_buffer_size: 500
|
# use_ice_lite: true
|
||||||
# # optional STUN servers for LiveKit clients to use. Clients will be configured to use these STUN servers automatically.
|
# # optional STUN servers for LiveKit clients to use. Clients will be configured to use these STUN servers automatically.
|
||||||
# # by default LiveKit clients use Google's public STUN servers
|
# # by default LiveKit clients use Google's public STUN servers
|
||||||
# stun_servers:
|
# stun_servers:
|
||||||
@@ -65,6 +62,10 @@ rtc:
|
|||||||
# # in the unlikely event of highly congested networks, SFU may choose to pause some tracks
|
# # in the unlikely event of highly congested networks, SFU may choose to pause some tracks
|
||||||
# # in order to allow others to stream smoothly. You can disable this behavior here
|
# # in order to allow others to stream smoothly. You can disable this behavior here
|
||||||
# allow_pause: true
|
# allow_pause: true
|
||||||
|
# # allows automatic connection fallback to TCP and TURN/TLS (if configured) when UDP has been unstable
|
||||||
|
# allow_tcp_fallback: false
|
||||||
|
# # number of packets to buffer in the SFU, defaults to 500
|
||||||
|
# packet_buffer_size: 500
|
||||||
# # minimum amount of time between pli/fir rtcp packets being sent to an individual
|
# # minimum amount of time between pli/fir rtcp packets being sent to an individual
|
||||||
# # producer. Increasing these times can lead to longer black screens when new participants join,
|
# # producer. Increasing these times can lead to longer black screens when new participants join,
|
||||||
# # while reducing them can lead to higher stream bitrate.
|
# # while reducing them can lead to higher stream bitrate.
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ type RTCConfig struct {
|
|||||||
|
|
||||||
CongestionControl CongestionControlConfig `yaml:"congestion_control,omitempty"`
|
CongestionControl CongestionControlConfig `yaml:"congestion_control,omitempty"`
|
||||||
|
|
||||||
|
// allow TCP and TURN/TLS fallback
|
||||||
|
AllowTCPFallback *bool `yaml:"allow_tcp_fallback,omitempty"`
|
||||||
|
|
||||||
// for testing, disable UDP
|
// for testing, disable UDP
|
||||||
ForceTCP bool `yaml:"force_tcp,omitempty"`
|
ForceTCP bool `yaml:"force_tcp,omitempty"`
|
||||||
|
|
||||||
// allow TCP fallback
|
|
||||||
AllowTCPFallback bool `yaml:"allow_tcp_fallback,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type TURNServer struct {
|
type TURNServer struct {
|
||||||
|
|||||||
@@ -268,6 +268,10 @@ func (r *RoomManager) StartSession(
|
|||||||
sid := livekit.ParticipantID(utils.NewGuid(utils.ParticipantPrefix))
|
sid := livekit.ParticipantID(utils.NewGuid(utils.ParticipantPrefix))
|
||||||
pLogger := rtc.LoggerWithParticipant(room.Logger, pi.Identity, sid, false)
|
pLogger := rtc.LoggerWithParticipant(room.Logger, pi.Identity, sid, false)
|
||||||
protoRoom := room.ToProto()
|
protoRoom := room.ToProto()
|
||||||
|
allowFallback := false
|
||||||
|
if r.config.RTC.AllowTCPFallback != nil {
|
||||||
|
allowFallback = *r.config.RTC.AllowTCPFallback
|
||||||
|
}
|
||||||
participant, err = rtc.NewParticipant(rtc.ParticipantParams{
|
participant, err = rtc.NewParticipant(rtc.ParticipantParams{
|
||||||
Identity: pi.Identity,
|
Identity: pi.Identity,
|
||||||
Name: pi.Name,
|
Name: pi.Name,
|
||||||
@@ -287,7 +291,7 @@ func (r *RoomManager) StartSession(
|
|||||||
ClientInfo: rtc.ClientInfo{ClientInfo: pi.Client},
|
ClientInfo: rtc.ClientInfo{ClientInfo: pi.Client},
|
||||||
Region: pi.Region,
|
Region: pi.Region,
|
||||||
AdaptiveStream: pi.AdaptiveStream,
|
AdaptiveStream: pi.AdaptiveStream,
|
||||||
AllowTCPFallback: r.config.RTC.AllowTCPFallback,
|
AllowTCPFallback: allowFallback,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user