mirror of
https://github.com/livekit/livekit.git
synced 2026-05-15 00:55:32 +00:00
Check for Firefox in rtc config. (#3336)
This commit is contained in:
+6
-5
@@ -118,12 +118,13 @@ func NewWebRTCConfig(conf *config.Config) (*WebRTCConfig, error) {
|
||||
PacketBufferSizeAudio: rtcConf.PacketBufferSizeAudio,
|
||||
},
|
||||
Publisher: publisherConfig,
|
||||
Subscriber: getSubscriberConfig(rtcConf.CongestionControl),
|
||||
Subscriber: getSubscriberConfig(rtcConf.CongestionControl.UseSendSideBWEInterceptor || rtcConf.CongestionControl.UseSendSideBWE),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *WebRTCConfig) UpdateCongestionControl(ccConf config.CongestionControlConfig) {
|
||||
c.Subscriber = getSubscriberConfig(ccConf)
|
||||
func (c *WebRTCConfig) UpdateCongestionControl(ccConf config.CongestionControlConfig, clientInfo ClientInfo) {
|
||||
enableTWCC := (ccConf.UseSendSideBWEInterceptor || ccConf.UseSendSideBWE) && !clientInfo.isFirefox()
|
||||
c.Subscriber = getSubscriberConfig(enableTWCC)
|
||||
}
|
||||
|
||||
func (c *WebRTCConfig) SetBufferFactory(factory *buffer.Factory) {
|
||||
@@ -131,7 +132,7 @@ func (c *WebRTCConfig) SetBufferFactory(factory *buffer.Factory) {
|
||||
c.SettingEngine.BufferFactory = factory.GetOrNew
|
||||
}
|
||||
|
||||
func getSubscriberConfig(ccConf config.CongestionControlConfig) DirectionConfig {
|
||||
func getSubscriberConfig(enableTWCC bool) DirectionConfig {
|
||||
subscriberConfig := DirectionConfig{
|
||||
RTPHeaderExtension: RTPHeaderExtensionConfig{
|
||||
Video: []string{
|
||||
@@ -154,7 +155,7 @@ func getSubscriberConfig(ccConf config.CongestionControlConfig) DirectionConfig
|
||||
},
|
||||
},
|
||||
}
|
||||
if ccConf.UseSendSideBWEInterceptor || ccConf.UseSendSideBWE {
|
||||
if enableTWCC {
|
||||
subscriberConfig.RTPHeaderExtension.Video = append(subscriberConfig.RTPHeaderExtension.Video, sdp.TransportCCURI)
|
||||
subscriberConfig.RTCPFeedback.Video = append(subscriberConfig.RTCPFeedback.Video, webrtc.RTCPFeedback{Type: webrtc.TypeRTCPFBTransportCC})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user