mirror of
https://github.com/strukturag/nextcloud-spreed-signaling.git
synced 2023-10-21 07:33:40 -05:00
Assume one Janus server is only used by one signaling server / -proxy.
With that, we can notify publisher events locally instead of through NATS and can remove code that looks up publisher rooms by their ids on Janus.
This commit is contained in:
@@ -88,7 +88,6 @@ type ProxyServer struct {
|
||||
country string
|
||||
|
||||
url string
|
||||
nats signaling.NatsClient
|
||||
mcu signaling.Mcu
|
||||
stopped uint32
|
||||
|
||||
@@ -110,7 +109,7 @@ type ProxyServer struct {
|
||||
clientsLock sync.RWMutex
|
||||
}
|
||||
|
||||
func NewProxyServer(r *mux.Router, version string, config *goconf.ConfigFile, nats signaling.NatsClient) (*ProxyServer, error) {
|
||||
func NewProxyServer(r *mux.Router, version string, config *goconf.ConfigFile) (*ProxyServer, error) {
|
||||
hashKey := make([]byte, 64)
|
||||
if _, err := rand.Read(hashKey); err != nil {
|
||||
return nil, fmt.Errorf("Could not generate random hash key: %s", err)
|
||||
@@ -172,8 +171,6 @@ func NewProxyServer(r *mux.Router, version string, config *goconf.ConfigFile, na
|
||||
version: version,
|
||||
country: country,
|
||||
|
||||
nats: nats,
|
||||
|
||||
shutdownChannel: make(chan bool, 1),
|
||||
|
||||
upgrader: websocket.Upgrader{
|
||||
@@ -238,7 +235,7 @@ func (s *ProxyServer) Start(config *goconf.ConfigFile) error {
|
||||
for {
|
||||
switch mcuType {
|
||||
case signaling.McuTypeJanus:
|
||||
mcu, err = signaling.NewMcuJanus(s.url, config, s.nats)
|
||||
mcu, err = signaling.NewMcuJanus(s.url, config)
|
||||
default:
|
||||
return fmt.Errorf("Unsupported MCU type: %s", mcuType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user