From b970bc6d3b0806a064377b29dfdce0c6dda5442b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 5 Feb 2023 11:55:36 +0100 Subject: [PATCH] yWeb/Y_Tools_Screenshot: try to fix screenshot w/o grab binary Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/136fd4ee89bbc441a867955c90a735f24ec25c46 Author: vanhofen Date: 2023-02-05 (Sun, 05 Feb 2023) Origin message was: ------------------ - yWeb/Y_Tools_Screenshot: try to fix screenshot w/o grab binary ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/y-web/Y_Tools_Screenshot.yhtm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/y-web/Y_Tools_Screenshot.yhtm b/data/y-web/Y_Tools_Screenshot.yhtm index 75b9e64ce..5d5105f79 100644 --- a/data/y-web/Y_Tools_Screenshot.yhtm +++ b/data/y-web/Y_Tools_Screenshot.yhtm @@ -15,7 +15,11 @@ var interval; function checkEnable() { enableOSD = (id('checkOSD').checked == true) ? 1 : 0; enableVideo = (id('checkVideo').checked == true) ? 1 : 0; + {=if-empty:{=var-get:grab=}~ + enablePiP = 0; + ~ enablePiP = (id('checkPiP').checked == true) ? 1 : 0; + =} if (enableOSD == 0 && enableVideo == 0) { alert("{=L:bc.screenshot.checkenable=}"); @@ -27,6 +31,7 @@ function checkEnable() { } return true; } + function rcsim(_key) { if (!checkEnable()) return; @@ -40,6 +45,7 @@ function rcsim(_key) { loadSyncURL("/control/rcem?" + _key); window.setTimeout("do_snapshot()", 750); } + function do_snapshot() { if (!checkEnable()) return; @@ -73,6 +79,7 @@ function do_snapshot() { do_showshot(filename); } + function do_showshot(_filename) { if (_filename == "") _filename = "screenshot"; @@ -82,6 +89,7 @@ function do_showshot(_filename) { jQuery('#shot').attr("src", "/tmp/"+_filename+".png?" + Math.random()); jQuery('#shot').show(); } + function do_clearshot() { jQuery('#shot').hide(); jQuery('#shot').attr("src", "");