Skip to content

Commit

Permalink
Merge pull request #58 from Animadei/master
Browse files Browse the repository at this point in the history
Added support for switching between secure and non-secure WebSocket mode
  • Loading branch information
phoboslab authored Apr 21, 2022
2 parents 77642bc + 484cc29 commit 9066bba
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 9066bba

Please sign in to comment.