From e40f222890ec792f09d99630069f14d5aa3f25ea Mon Sep 17 00:00:00 2001 From: brunobg Date: Mon, 31 Aug 2015 12:47:08 -0300 Subject: [PATCH] Better test for websocket support Improves testing for websocket support. Tested on Android 4.4.2. --- backend/jx_browser_client.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/jx_browser_client.txt b/backend/jx_browser_client.txt index 17b2335..44408da 100755 --- a/backend/jx_browser_client.txt +++ b/backend/jx_browser_client.txt @@ -16,6 +16,7 @@ jxcore.ieVersion=0; jxcore.isIE = /MSIE/i.test(_ua); jxcore.isAndroid = /Android/i.test(_ua); + jxcore.hasWebsocket = ('WebSocket' in window || 'MozWebSocket' in window); jxcore.isIOS = /Mobile/i.test(_ua) && /Apple/i.test(_ua); jxcore.isOpera = /Opera/i.test(_ua); jxcore.isChrome = /Chrome/i.test(_ua); @@ -577,7 +578,7 @@ return false; } - if(jxcore.SocketURL==null || jxcore.isAndroid || (jxcore.isIE && jxcore.ieVersion<9)) { + if(jxcore.SocketURL==null || !jxcore.hasWebsocket || (jxcore.isIE && jxcore.ieVersion<9)) { jxcore.SocketDisabled = true; return false; }