diff --git a/src/player.js b/src/player.js index 75a4b70..1183191 100644 --- a/src/player.js +++ b/src/player.js @@ -91,7 +91,7 @@ function handleWebSocket (live) { if (ws) return - ws = new WebSocket(`ws://${location.host}`) + ws = new WebSocket(`ws${location.protocol.indexOf('s') !== -1 ? 's' : ''}://${location.host}`) ws.onerror = function(e) { console.error('Socket errored, retrying..', e) handleWebSocket(false)