From 68984cd8586fa1cb9ac633441944e9b4f5f3970d Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Wed, 23 Oct 2019 16:46:53 +0300 Subject: [PATCH] Websocket secure? question mark? --- src/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)