From a51245eb7600c3b233140c8edb06bed5f63c2e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 1 Mar 2022 15:22:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Heads-up=20that=20webrtc=20is=20?= =?UTF-8?q?still=20considered=20beta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After a discussion on discord, better warn users that they might have to expect disruption here down the line while things are getting figured out. --- src/octoprint/static/js/app/viewmodels/settings.js | 5 ++++- .../snippets/settings/webcam/webcamStreamUrl.jinja2 | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/settings.js b/src/octoprint/static/js/app/viewmodels/settings.js index 5ae24af21..fcde5d057 100644 --- a/src/octoprint/static/js/app/viewmodels/settings.js +++ b/src/octoprint/static/js/app/viewmodels/settings.js @@ -311,6 +311,9 @@ $(function () { self.webcam_ffmpegPathOk(false); self.webcam_ffmpegPathBroken(false); }; + self.webcam_streamType = ko.pureComputed(function () { + return determineWebcamStreamType(self.webcam_streamUrl()); + }); self.server_onlineCheckText = ko.observable(); self.server_onlineCheckOk = ko.observable(false); @@ -442,7 +445,7 @@ $(function () { var text = gettext( "If you see your webcam stream below, the entered stream URL is ok." ); - var streamType = determineWebcamStreamType(self.webcam_streamUrl()); + var streamType = self.webcam_streamType(); var webcam_element; var webrtc_peer_connection; if (streamType == "mjpg") { diff --git a/src/octoprint/templates/snippets/settings/webcam/webcamStreamUrl.jinja2 b/src/octoprint/templates/snippets/settings/webcam/webcamStreamUrl.jinja2 index 5bb9b25c3..3839d826e 100644 --- a/src/octoprint/templates/snippets/settings/webcam/webcamStreamUrl.jinja2 +++ b/src/octoprint/templates/snippets/settings/webcam/webcamStreamUrl.jinja2 @@ -5,6 +5,9 @@ - {% trans %}Needs to be reachable from the browser displaying the OctoPrint UI, used to embed the webcam stream into the page.{% endtrans %} + +

{% trans %}Needs to be reachable from the browser displaying the OctoPrint UI, used to embed the webcam stream into the page.{% endtrans %}

+

{% trans %}Heads-up! WebRTC support is still in beta and subject to change, monitor the changelog of future versions closely for heads-ups regarding the WebRTC support in OctoPrint.{% endtrans %}

+