mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Test for WebSocket, default to HTTP.
This commit is contained in:
@@ -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