Skip to content

Commit

Permalink
Added support for switching between secure and non-secure WebSocket m…
Browse files Browse the repository at this point in the history
…ode.
  • Loading branch information
Animadei committed Mar 29, 2018
1 parent 77642bc commit 484cc29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/jsmpg-vnc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ document.body.className = ('ontouchstart' in window) ? 'mobile' : 'desktop';


// Setup the WebSocket connection and start the player
var client = new WebSocket( 'ws://' + window.location.host + '/ws' );
var client = new WebSocket(((window.location.protocol === 'https:') ? 'wss://' : 'ws://') + window.location.host + '/ws' );

var canvas = document.getElementById('videoCanvas');
var player = new jsmpeg(client, {canvas:canvas});
Expand Down

0 comments on commit 484cc29

Please sign in to comment.