Test for WebSocket, default to HTTP.
This commit is contained in:
1 parent
f9d6830ab5
commit
6a52434b12
1 file changed
+7
-3
@@ -103,9 +103,13 @@
|
||||
|
||||
var tunnel;
|
||||
|
||||
// TODO: Detect WebSocket and websocket-tunnel
|
||||
tunnel = new Guacamole.WebSocketTunnel("websocket-tunnel")
|
||||
//tunnel = new Guacamole.HTTPTunnel("tunnel")
|
||||
// If WebSocket available, try to use it.
|
||||
if (window.WebSocket)
|
||||
tunnel = new Guacamole.WebSocketTunnel("websocket-tunnel")
|
||||
|
||||
// If no WebSocket, then use HTTP.
|
||||
else
|
||||
tunnel = new Guacamole.HTTPTunnel("tunnel")
|
||||
|
||||
// Instantiate client
|
||||
var guac = new Guacamole.Client(tunnel);
|
||||
|
||||
Reference in new issue
Block a user