浏览代码

Adds cross region info to jitsiRegionInfo.

master
damencho 9 年前
父节点
当前提交
40c0c622ee
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6
    6
      connection_optimization/external_connect.js

+ 6
- 6
connection_optimization/external_connect.js 查看文件

@@ -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);

正在加载...
取消
保存