From 4d9e86ca0fcb5d99a08a6a27ecc79bfcd02eb950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 12 May 2022 10:57:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20We=20also=20recognize=20webrtcs:?= =?UTF-8?q?=20for=20webcam=20streams?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks for the heads-up, @cp2004 --- src/octoprint/static/js/app/helpers.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/octoprint/static/js/app/helpers.js b/src/octoprint/static/js/app/helpers.js index fc288aa1f..28f6e7a2b 100644 --- a/src/octoprint/static/js/app/helpers.js +++ b/src/octoprint/static/js/app/helpers.js @@ -1571,9 +1571,10 @@ var validateWebcamUrl = function (streamUrl) { } else if ( lower.startsWith("http:") || lower.startsWith("https:") || - lower.startsWith("webrtc:") + lower.startsWith("webrtc:") || + lower.startsWith("webrtcs:") ) { - // absolute & http/https/webrtc + // absolute & supported protocol toParse = streamUrl; } else { return false; @@ -1596,7 +1597,7 @@ var determineWebcamStreamType = function (streamUrl) { throw "Invalid streamUrl. Cannot determine stream type."; } - if (parsed.protocol === "webrtc:") { + if (parsed.protocol === "webrtc:" || parsed.protocol === "webrtcs:") { return "webrtc"; }