I have been running Legacy Janus for a while. Historically, I have had multiple servers each running a local janus instance and “cameras” were located on “clients” that could be reached from the server. Something like:
ServerA – client1 – camera1
--client2 – camera2
ServerB – client3 – camera3
--client4 – camera4
A user’s browser would connect to either ServerA or ServerB depending on which camera it was accessing.
In this world things were simple and the janus.js “server” was always /janus…
I am interested in maintaining the notion of different servers tied to different clients but I would like the UI to go through a single server (serverX). But, ServerX cannot address clients (or their cameras) that are off of ServerA/B.
I was thinking I could set the janus.js “server” to be https://server(A|B)/janus… but I think that might create CORS issues when getting webpages from ServerX and I am unclear how to configure serverA/B to avoid this. But on the surface, this seems like it could be closest to what I want if CORS can be figured out.
I was also considering forwarding all the janus GET/POST operations for serverX to the relevant server (serverA or serverB). There are no CORS issues since all requests are to Server X but I am not even sure if this can result in janus on serverA sending data to a browser with webpages served from ServerX.
So, basically I am just looking for some insight/guidance as to how to organize this. I think I am confused on how janus on serverA/B interacts with a browser talking to serverX.
In my simple case, I could restrict all janus clients to be connected to serverX and things would work, but I would like to explore a more general solution first.