yWeb: add pip to screenshot page

Origin commit data
------------------
Branch: ni/coolstream
Commit: 4a5ecd52c3
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-01-29 (Sun, 29 Jan 2023)

Origin message was:
------------------
- yWeb: add pip to screenshot page

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-01-29 21:33:33 +01:00
parent a983cdadfe
commit 859a9008e1
4 changed files with 20 additions and 5 deletions

View File

@@ -8,16 +8,22 @@
//<![CDATA[
var enableOSD;
var enableVideo;
var enablePiP;
var interval;
function checkEnable() {
enableOSD = (document.getElementById('checkOSD').checked == true) ? 1 : 0;
enableVideo = (document.getElementById('checkVideo').checked == true) ? 1 : 0;
enablePiP = (document.getElementById('checkPiP').checked == true) ? 1 : 0;
if (enableOSD == 0 && enableVideo == 0) {
alert("{=L:bc.screenshot.checkenable=}");
return false;
}
if (enableVideo == 0 && enablePiP == 1) {
alert(unescape("{=L:bc.screenshot.checkpip=}"));
return false;
}
return true;
}
function rcsim(_key) {
@@ -48,12 +54,16 @@ function do_snapshot() {
if ("{=var-get:grab=}" != "")
{
var pip_opts = "";
if (enableVideo == 1 && enablePiP == 1)
pip_opts = "-x 1 ";
if (enableOSD == 1 && enableVideo == 1)
stb_exec_tools("fbshot grab -q -p /tmp/"+filename+".png");
stb_exec_tools("fbshot grab -q -p "+pip_opts+"/tmp/"+filename+".png");
else if (enableVideo == 1)
stb_exec_tools("fbshot grab -q -p -v "+pip_opts+"/tmp/"+filename+".png");
else if (enableOSD == 1)
stb_exec_tools("fbshot grab -q -p -o /tmp/"+filename+".png");
else if (enableVideo == 1)
stb_exec_tools("fbshot grab -q -p -v /tmp/"+filename+".png");
}
else if ("{=var-get:fbshot=}" != "" && enableVideo == 0)
stb_exec_tools("fbshot fbshot /tmp/"+filename+".png");
@@ -125,6 +135,9 @@ function do_reload(){
{=L:filename=}: <input type="text" value="screenshot" id="filename" size="10" />
OSD: <input id="checkOSD" name="checkOSD" type="checkbox" {=if-empty:{=osd=}~~checked="checked"=} />
TV: <input id="checkVideo" name="checkVideo" type="checkbox" {=if-empty:{=video=}~~checked="checked"=} />
{=if-empty:{=var-get:grab=}~~
PiP: <input id="checkPiP" name="checkPiP" type="checkbox" {=if-empty:{=pip=}~~checked="checked"=} />
=}
</form>
</div>
<div class="clear"></div>

View File

@@ -1,3 +1,3 @@
version=3.0.2
date=14.01.2023
version=3.0.3
date=29.01.2023
info=NI-Neutrino-Webinterface

View File

@@ -126,6 +126,7 @@ bc.screenshot.create=Schnappschuss
bc.screenshot.delete=Schnappschuss l&ouml;schen
bc.screenshot.wait_text=Schnappschuss wird erstellt
bc.screenshot.checkenable=OSD und/oder TV muss aktiviert sein!
bc.screenshot.checkpip=F%FCr PiP muss TV aktiviert sein!
bc.screenshot.reload_desc=Reload-Intervall in Sekunden
# ===== Boxcontrol - Others

View File

@@ -126,6 +126,7 @@ bc.screenshot.create=Screenshot
bc.screenshot.delete=Delete screenshot
bc.screenshot.wait_text=Create screenshot
bc.screenshot.checkenable=OSD and/or TV must be enabled!
bc.screenshot.checkpip=PiP requires TV enabled!
bc.screenshot.reload_desc=Reload interval in seconds
# ===== Boxcontrol - Others