From ae89e817a25282b06b0cc4cf070056e0e99c8b6e Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 21 Oct 2022 09:22:40 -0600 Subject: [PATCH] Support wss if made from https --- web/src/components/WebRtcPlayer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/WebRtcPlayer.jsx b/web/src/components/WebRtcPlayer.jsx index 5fa47842a..b3961d009 100644 --- a/web/src/components/WebRtcPlayer.jsx +++ b/web/src/components/WebRtcPlayer.jsx @@ -3,7 +3,7 @@ import { h } from 'preact'; let ws; function initStream(camera) { - if (location.protocol == 'https') { + if (location.protocol == 'https:') { ws = new WebSocket(`wss://${window.location.host}/go2rtc/api/ws?src=${camera}`); } else { ws = new WebSocket(`ws://${window.location.host}/go2rtc/api/ws?src=${camera}`);