Explorar el Código

Adds cross region info to jitsiRegionInfo.

dev1
damencho hace 9 años
padre
commit
40c0c622ee
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6
    6
      connection_optimization/external_connect.js

+ 6
- 6
connection_optimization/external_connect.js Ver fichero

@@ -40,13 +40,13 @@ function createConnectionExternally(webserviceUrl, success_callback,
40 40
                 try {
41 41
                     var data = JSON.parse(xhttp.responseText);
42 42
 
43
+                    var proxyRegion = xhttp.getResponseHeader('X-Proxy-Region');
44
+                    var jitsiRegion = xhttp.getResponseHeader('X-Jitsi-Region');
43 45
                     window.jitsiRegionInfo = {
44
-                        "ProxyRegion" :
45
-                            xhttp.getResponseHeader('X-Proxy-Region'),
46
-                        "Region" :
47
-                            xhttp.getResponseHeader('X-Jitsi-Region'),
48
-                        "Shard" :
49
-                            xhttp.getResponseHeader('X-Jitsi-Shard')
46
+                        "ProxyRegion" : proxyRegion,
47
+                        "Region" : jitsiRegion,
48
+                        "Shard" : xhttp.getResponseHeader('X-Jitsi-Shard'),
49
+                        "CrossRegion": proxyRegion !== jitsiRegion ? 1 : 0
50 50
                     };
51 51
 
52 52
                     success_callback(data);

Loading…
Cancelar
Guardar