Skip to content

Commit

Permalink
Better test for websocket support
Browse files Browse the repository at this point in the history
Improves testing for websocket support. Tested on Android 4.4.2.
  • Loading branch information
brunobg committed Aug 31, 2015
1 parent acb2154 commit e40f222
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/jx_browser_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

1 comment on commit e40f222

@ktrzeciaknubisa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brunobg I needed to apply 4.4 version check for Android: a233942.

Please sign in to comment.