mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
49_SSCamSTRM: click on content in stream device or snap gallery opens a popup window
git-svn-id: https://svn.fhem.de/fhem/trunk@17881 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5834221233
commit
e079296db7
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: 49_SSCamSTRM: click on content in stream device or snap gallery
|
||||
opens a popup window
|
||||
- new: 70_LaMetric2: add official module for LaMetric Smart Clock
|
||||
- feature: 73_AutoShuttersControl: change ReadingsVal to ReadingsNum for
|
||||
read position Reading, add setDriveReading for wiggle
|
||||
|
@ -45,6 +45,7 @@ use HttpUtils;
|
||||
|
||||
# Versions History intern
|
||||
our %SSCam_vNotesIntern = (
|
||||
"7.5.0" => "02.12.2018 sub SSCam_StreamDev and SSCam_composegallery changed to use popup window ",
|
||||
"7.4.1" => "26.11.2018 sub composegallery deleted, SSCam_composegallery changed to get information for SSCam_refresh ",
|
||||
"7.4.0" => "24.11.2018 new set command \"createReadingsGroup\", versionNotes can process lists like \"2,6\", changed compatibility check, use SnapId when get information after took snapshot and sscam state-event ",
|
||||
"7.3.3" => "18.11.2018 change rights decsption in commandRef ",
|
||||
@ -5067,13 +5068,8 @@ sub SSCam_camop_parse ($) {
|
||||
my $stmkey = $sk[1];
|
||||
$stmkey =~ tr/"//d;
|
||||
# Quotes in StmKey entfernen falls noQuotesForSID gesezt
|
||||
$mjpegHttp =~ tr/"//d if(AttrVal($name, "noQuotesForSID",0));
|
||||
|
||||
# Readings löschen falls sie nicht angezeigt werden sollen (showStmInfoFull)
|
||||
#if (!AttrVal($name,"showStmInfoFull",0)) {
|
||||
# delete($defs{$name}{READINGS}{StmKeymjpegHttp});
|
||||
#delete($defs{$name}{READINGS}{StmKeyUnicstOverHttp});
|
||||
#}
|
||||
# $mjpegHttp =~ tr/"//d if(AttrVal($name, "noQuotesForSID",0));
|
||||
$mjpegHttp =~ tr/"//d;
|
||||
|
||||
# Streaminginfos in Helper speichern
|
||||
$hash->{HELPER}{STMKEYMJPEGHTTP} = $mjpegHttp if($mjpegHttp);
|
||||
@ -6177,7 +6173,7 @@ return;
|
||||
}
|
||||
|
||||
######################################################################################
|
||||
# Stream einer Kamera - Kamera Liveview weblink device
|
||||
# Funktion für SSCamSTRM-Devices - Kamera Liveview weblink device
|
||||
# API: SYNO.SurveillanceStation.VideoStreaming
|
||||
# Methode: GetLiveViewPath
|
||||
######################################################################################
|
||||
@ -6235,6 +6231,7 @@ sub SSCam_StreamDev($$$) {
|
||||
|
||||
my $ha = AttrVal($camname, "htmlattr", 'width="500" height="325"'); # HTML Attribute der Cam
|
||||
$ha = AttrVal($strmdev, "htmlattr", $ha); # htmlattr mit htmattr Streaming-Device übersteuern
|
||||
my $pws = AttrVal($strmdev, "popupWindowSize", ''); # Größe eines Popups
|
||||
my $StmKey = ReadingsVal($camname,"StmKey",undef);
|
||||
|
||||
$ret = "";
|
||||
@ -6264,7 +6261,7 @@ sub SSCam_StreamDev($$$) {
|
||||
if($apiaudiostmmaxver) { # keine API "SYNO.SurveillanceStation.AudioStream" mehr ab API v2.8
|
||||
$audiolink = "$proto://$serveraddr:$serverport/webapi/$apiaudiostmpath?api=$apiaudiostm&version=$apiaudiostmmaxver&method=Stream&cameraId=$camid&_sid=$sid";
|
||||
}
|
||||
$ret .= "<td><img src=$link $ha><br>";
|
||||
$ret .= "<td><img src=$link $ha onClick=\"FW_okDialog('<img src=$link $pws>')\"><br>";
|
||||
if(ReadingsVal($camname, "Record", "Stop") eq "Stop") {
|
||||
# Aufnahmebutton endlos Start
|
||||
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdrecendless')\">$imgrecendless </a>";
|
||||
@ -6334,7 +6331,7 @@ sub SSCam_StreamDev($$$) {
|
||||
|
||||
if($link && $wltype =~ /image|iframe|video|base64img|embed|hls/) {
|
||||
if($wltype =~ /image/) {
|
||||
$ret .= "<td><img src=$link $ha><br>";
|
||||
$ret .= "<td><img src=$link $ha onClick=\"FW_okDialog('<img src=$link $pws>')\"><br>";
|
||||
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdstop')\">$imgstop </a>";
|
||||
$ret .= $imgblank;
|
||||
if($hash->{HELPER}{RUNVIEW} =~ /live_fw/) {
|
||||
@ -6363,7 +6360,7 @@ sub SSCam_StreamDev($$$) {
|
||||
}
|
||||
|
||||
} elsif ($wltype =~ /iframe/) {
|
||||
$ret .= "<td><iframe src=$link $ha controls autoplay>
|
||||
$ret .= "<td><iframe src=$link $ha controls autoplay onClick=\"FW_okDialog('<img src=$link $pws>')\">
|
||||
Iframes disabled
|
||||
</iframe><br>";
|
||||
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdstop')\">$imgstop </a>";
|
||||
@ -6396,12 +6393,12 @@ sub SSCam_StreamDev($$$) {
|
||||
$ret .= "</td>";
|
||||
}
|
||||
} elsif($wltype =~ /base64img/) {
|
||||
$ret .= "<td><img src='data:image/jpeg;base64,$link' $ha><br>";
|
||||
$ret .= "<td><img src='data:image/jpeg;base64,$link' $ha onClick=\"FW_okDialog('<img src=data:image/jpeg;base64,$link $pws>')\"><br>";
|
||||
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdstop')\">$imgstop </a>";
|
||||
$ret .= "</td>";
|
||||
|
||||
} elsif($wltype =~ /embed/) {
|
||||
$ret .= "<td><embed src=$link $ha></td>";
|
||||
$ret .= "<td><embed src=$link $ha onClick=\"FW_okDialog('<img src=$link $pws>')\"></td>";
|
||||
|
||||
} elsif($wltype =~ /hls/) {
|
||||
$ret .= "<td><video $ha controls autoplay>
|
||||
@ -6456,6 +6453,7 @@ return $ret;
|
||||
|
||||
###############################################################################
|
||||
# Schnappschußgalerie zusammenstellen
|
||||
# Verwendung durch SSCamSTRM-Devices
|
||||
###############################################################################
|
||||
sub SSCam_composegallery ($;$$) {
|
||||
my ($name,$strmdev,$model) = @_;
|
||||
@ -6482,6 +6480,7 @@ sub SSCam_composegallery ($;$$) {
|
||||
my $imgdosnap = "<img src=\"$FW_ME/www/images/sscam/black_btn_DOSNAP.png\">";
|
||||
|
||||
my $ha = AttrVal($name, "snapGalleryHtmlAttr", AttrVal($name, "htmlattr", 'width="500" height="325"'));
|
||||
my $pws = AttrVal($strmdev, "popupWindowSize", ""); # Größe eines Popups
|
||||
|
||||
# falls "SSCam_composegallery" durch ein SSCamSTRM-Device aufgerufen wird
|
||||
my $devWlink = "";
|
||||
@ -6521,7 +6520,7 @@ sub SSCam_composegallery ($;$$) {
|
||||
|
||||
foreach my $key (@as) {
|
||||
$ct = $allsnaps->{$key}{createdTm};
|
||||
my $html = sprintf("<td>$ct<br /> <img $gattr src=\"data:image/jpeg;base64,$allsnaps->{$key}{imageData}\" /> </td>" );
|
||||
my $html = sprintf("<td>$ct<br> <img src=\"data:image/jpeg;base64,$allsnaps->{$key}{imageData}\" $gattr onClick=\"FW_okDialog('<img src=data:image/jpeg;base64,$allsnaps->{$key}{imageData} $pws>')\"> </td>" );
|
||||
|
||||
$cell++;
|
||||
|
||||
|
@ -34,6 +34,7 @@ use warnings;
|
||||
|
||||
# Versions History intern
|
||||
our %SSCamSTRM_vNotesIntern = (
|
||||
"1.5.0" => "02.12.2018 new attribute \"popupWindowSize\" ",
|
||||
"1.4.1" => "31.10.2018 attribute \"autoLoop\" changed to \"autoRefresh\", new attribute \"autoRefreshFW\" ",
|
||||
"1.4.0" => "29.10.2018 readingFnAttributes added ",
|
||||
"1.3.0" => "28.10.2018 direct help for attributes, new attribute \"autoLoop\" ",
|
||||
@ -68,6 +69,7 @@ sub SSCamSTRM_Initialize($) {
|
||||
"forcePageRefresh:1,0 ".
|
||||
"htmlattr ".
|
||||
"hideDisplayName:1,0 ".
|
||||
"popupWindowSize ".
|
||||
$readingFnAttributes;
|
||||
$hash->{FW_summaryFn} = "SSCamSTRM_FwFn";
|
||||
$hash->{FW_detailFn} = "SSCamSTRM_FwFn";
|
||||
@ -274,12 +276,23 @@ Dependend of the Streaming-Device state, different buttons are provided to start
|
||||
|
||||
<a name="htmlattr"></a>
|
||||
<li><b>htmlattr</b><br>
|
||||
Additional HTML tags to manipulate the streaming device. <br>
|
||||
<ul>
|
||||
Additional HTML tags to manipulate the streaming device.
|
||||
<br><br>
|
||||
<ul>
|
||||
<b>Example: </b><br>
|
||||
attr <name> htmlattr width="480" height="560" <br>
|
||||
attr <name> htmlattr width=480 height=560 <br>
|
||||
</ul>
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<a name="popupWindowSize"></a>
|
||||
<li><b>popupWindowSize</b><br>
|
||||
If the content of playback (Videostream or Snapshot gallery) is suitable, by clicking the content a popup window will appear.
|
||||
The size of display can be setup by this attribute.
|
||||
<br><br>
|
||||
<ul>
|
||||
<b>Example: </b><br>
|
||||
attr <name> popupWindowSize width=1000 height=625 <br>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@ -378,10 +391,23 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters
|
||||
|
||||
<a name="htmlattr"></a>
|
||||
<li><b>htmlattr</b><br>
|
||||
Zusätzliche HTML Tags zur Darstellungsänderung im Streaming Device. <br>
|
||||
Zusätzliche HTML Tags zur Darstellungsänderung im Streaming Device.
|
||||
<br><br>
|
||||
<ul>
|
||||
<b>Beispiel: </b><br>
|
||||
attr <name> htmlattr width="480" height="560" <br>
|
||||
attr <name> htmlattr width=480 height=560 <br>
|
||||
</ul>
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<a name="popupWindowSize"></a>
|
||||
<li><b>popupWindowSize</b><br>
|
||||
Bei geeigneten Wiedergabeinhalten (Videostream oder Schnappschußgalerie) öffnet ein Klick auf den Bildinhalt ein
|
||||
Popup-Fenster mit diesem Inhalt. Die Darstellungsgröße kann mit diesem Attribut eingestellt werden.
|
||||
<br><br>
|
||||
<ul>
|
||||
<b>Beispiel: </b><br>
|
||||
attr <name> popupWindowSize width=1000 height=625 <br>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user