Create client config manager in room manager constructor. (#3718)
* Create client config manager in room manager constructor. Remove it from wire to be consistent with cloud which does hot reload. * disable advanced codecs on iOS when using JS SDK
This commit is contained in:
@@ -48,6 +48,21 @@ var StaticConfigurations = []ConfigurationItem{
|
|||||||
},
|
},
|
||||||
Merge: true,
|
Merge: true,
|
||||||
},
|
},
|
||||||
|
// disable advanced codecs when publishing using JS SDK from iOS,
|
||||||
|
// seeing publish failures (no DD header extension found) when Chrome Mobile publishes VP9,
|
||||||
|
// being defensive and disabling advanced codecs
|
||||||
|
{
|
||||||
|
Match: &ScriptMatch{Expr: `c.os == "ios" && c.sdk == "js"`},
|
||||||
|
Configuration: &livekit.ClientConfiguration{
|
||||||
|
DisabledCodecs: &livekit.DisabledCodecs{
|
||||||
|
Publish: []*livekit.Codec{
|
||||||
|
{Mime: mime.MimeTypeVP9.String()},
|
||||||
|
{Mime: mime.MimeTypeAV1.String()},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Merge: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Match: &ScriptMatch{Expr: `(c.device_model == "xiaomi 2201117ti" && c.os == "android") ||
|
Match: &ScriptMatch{Expr: `(c.device_model == "xiaomi 2201117ti" && c.os == "android") ||
|
||||||
((c.browser == "firefox" || c.browser == "firefox mobile") && (c.os == "linux" || c.os == "android"))`},
|
((c.browser == "firefox" || c.browser == "firefox mobile") && (c.os == "linux" || c.os == "android"))`},
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ func NewLocalRoomManager(
|
|||||||
router routing.Router,
|
router routing.Router,
|
||||||
roomAllocator RoomAllocator,
|
roomAllocator RoomAllocator,
|
||||||
telemetry telemetry.TelemetryService,
|
telemetry telemetry.TelemetryService,
|
||||||
clientConfManager clientconfiguration.ClientConfigurationManager,
|
|
||||||
agentClient agent.Client,
|
agentClient agent.Client,
|
||||||
agentStore AgentStore,
|
agentStore AgentStore,
|
||||||
egressLauncher rtc.EgressLauncher,
|
egressLauncher rtc.EgressLauncher,
|
||||||
@@ -125,7 +124,7 @@ func NewLocalRoomManager(
|
|||||||
roomAllocator: roomAllocator,
|
roomAllocator: roomAllocator,
|
||||||
roomStore: roomStore,
|
roomStore: roomStore,
|
||||||
telemetry: telemetry,
|
telemetry: telemetry,
|
||||||
clientConfManager: clientConfManager,
|
clientConfManager: clientconfiguration.NewStaticClientConfigurationManager(clientconfiguration.StaticConfigurations),
|
||||||
egressLauncher: egressLauncher,
|
egressLauncher: egressLauncher,
|
||||||
agentClient: agentClient,
|
agentClient: agentClient,
|
||||||
agentStore: agentStore,
|
agentStore: agentStore,
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import (
|
|||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
"github.com/livekit/livekit-server/pkg/agent"
|
"github.com/livekit/livekit-server/pkg/agent"
|
||||||
"github.com/livekit/livekit-server/pkg/clientconfiguration"
|
|
||||||
"github.com/livekit/livekit-server/pkg/config"
|
"github.com/livekit/livekit-server/pkg/config"
|
||||||
"github.com/livekit/livekit-server/pkg/routing"
|
"github.com/livekit/livekit-server/pkg/routing"
|
||||||
"github.com/livekit/livekit-server/pkg/sfu"
|
"github.com/livekit/livekit-server/pkg/sfu"
|
||||||
@@ -51,7 +50,6 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
|
|||||||
wire.Bind(new(ServiceStore), new(ObjectStore)),
|
wire.Bind(new(ServiceStore), new(ObjectStore)),
|
||||||
createKeyProvider,
|
createKeyProvider,
|
||||||
createWebhookNotifier,
|
createWebhookNotifier,
|
||||||
createClientConfiguration,
|
|
||||||
createForwardStats,
|
createForwardStats,
|
||||||
getNodeStatsConfig,
|
getNodeStatsConfig,
|
||||||
routing.CreateRouter,
|
routing.CreateRouter,
|
||||||
@@ -237,10 +235,6 @@ func getSIPConfig(conf *config.Config) *config.SIPConfig {
|
|||||||
return &conf.SIP
|
return &conf.SIP
|
||||||
}
|
}
|
||||||
|
|
||||||
func createClientConfiguration() clientconfiguration.ClientConfigurationManager {
|
|
||||||
return clientconfiguration.NewStaticClientConfigurationManager(clientconfiguration.StaticConfigurations)
|
|
||||||
}
|
|
||||||
|
|
||||||
func getLimitConf(config *config.Config) config.LimitConfig {
|
func getLimitConf(config *config.Config) config.LimitConfig {
|
||||||
return config.Limit
|
return config.Limit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ package service
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/livekit/livekit-server/pkg/agent"
|
"github.com/livekit/livekit-server/pkg/agent"
|
||||||
"github.com/livekit/livekit-server/pkg/clientconfiguration"
|
|
||||||
"github.com/livekit/livekit-server/pkg/config"
|
"github.com/livekit/livekit-server/pkg/config"
|
||||||
"github.com/livekit/livekit-server/pkg/routing"
|
"github.com/livekit/livekit-server/pkg/routing"
|
||||||
"github.com/livekit/livekit-server/pkg/sfu"
|
"github.com/livekit/livekit-server/pkg/sfu"
|
||||||
@@ -133,7 +132,6 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
clientConfigurationManager := createClientConfiguration()
|
|
||||||
client, err := agent.NewAgentClient(messageBus)
|
client, err := agent.NewAgentClient(messageBus)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -142,7 +140,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
|
|||||||
timedVersionGenerator := utils.NewDefaultTimedVersionGenerator()
|
timedVersionGenerator := utils.NewDefaultTimedVersionGenerator()
|
||||||
turnAuthHandler := NewTURNAuthHandler(keyProvider)
|
turnAuthHandler := NewTURNAuthHandler(keyProvider)
|
||||||
forwardStats := createForwardStats(conf)
|
forwardStats := createForwardStats(conf)
|
||||||
roomManager, err := NewLocalRoomManager(conf, objectStore, currentNode, router, roomAllocator, telemetryService, clientConfigurationManager, client, agentStore, rtcEgressLauncher, timedVersionGenerator, turnAuthHandler, messageBus, forwardStats)
|
roomManager, err := NewLocalRoomManager(conf, objectStore, currentNode, router, roomAllocator, telemetryService, client, agentStore, rtcEgressLauncher, timedVersionGenerator, turnAuthHandler, messageBus, forwardStats)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -303,10 +301,6 @@ func getSIPConfig(conf *config.Config) *config.SIPConfig {
|
|||||||
return &conf.SIP
|
return &conf.SIP
|
||||||
}
|
}
|
||||||
|
|
||||||
func createClientConfiguration() clientconfiguration.ClientConfigurationManager {
|
|
||||||
return clientconfiguration.NewStaticClientConfigurationManager(clientconfiguration.StaticConfigurations)
|
|
||||||
}
|
|
||||||
|
|
||||||
func getLimitConf(config2 *config.Config) config.LimitConfig {
|
func getLimitConf(config2 *config.Config) config.LimitConfig {
|
||||||
return config2.Limit
|
return config2.Limit
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user