2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

49_SSCam: contrib 7.7.0

git-svn-id: https://svn.fhem.de/fhem/trunk@17940 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2018-12-09 18:42:54 +00:00
parent b08abe3df6
commit e75be366c0

View File

@ -73,6 +73,7 @@ sub SSCamSTRM_Initialize($) {
"htmlattr ". "htmlattr ".
"hideDisplayName:1,0 ". "hideDisplayName:1,0 ".
"popupWindowSize ". "popupWindowSize ".
"popupStreamTo:OK,1,2,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60 ".
$readingFnAttributes; $readingFnAttributes;
$hash->{FW_summaryFn} = "SSCamSTRM_FwFn"; $hash->{FW_summaryFn} = "SSCamSTRM_FwFn";
$hash->{FW_detailFn} = "SSCamSTRM_FwFn"; $hash->{FW_detailFn} = "SSCamSTRM_FwFn";
@ -122,7 +123,9 @@ sub SSCamSTRM_Get($@) {
my $txt = SSCam_getclhash($hash); my $txt = SSCam_getclhash($hash);
return $txt if($txt); return $txt if($txt);
my $link = AnalyzePerlCommand(undef, $hash->{LINK}) if($hash->{LINK} =~ m/^{(.*)}$/s); my $link = AnalyzePerlCommand(undef, $hash->{LINK}) if($hash->{LINK} =~ m/^{(.*)}$/s);
my $to = AttrVal($name, "popupStreamTo", 5);
$to = 1000 * $to if($to =~ /\d+/);
my $parent = $hash->{PARENT}; my $parent = $hash->{PARENT};
my $parentHash = $defs{$parent}; my $parentHash = $defs{$parent};
@ -133,16 +136,13 @@ sub SSCamSTRM_Get($@) {
my $out = "<html>"; my $out = "<html>";
$out .= $htmlCode; $out .= $htmlCode;
$out .= "</html>"; $out .= "</html>";
for (my $k=1; (defined($hash->{HELPER}{CL}{$k})); $k++ ) {
if ($hash->{HELPER}{CL}{$k}->{COMP}) { if($to =~ /\d+/) {
# CL zusammengestellt (Auslösung durch Notify) map {FW_directNotify("#FHEMWEB:$_", "FW_errmsg('$out', $to)", "")} devspec2array("TYPE=FHEMWEB");
asyncOutput($hash->{HELPER}{CL}{$k}, "$out"); } else {
} else { map {FW_directNotify("#FHEMWEB:$_", "FW_okDialog('$out')", "")} devspec2array("TYPE=FHEMWEB");
# Output wurde über FHEMWEB ausgelöst }
return $htmlCode;
}
}
delete($hash->{HELPER}{CL});
} }
} else { } else {
@ -285,8 +285,10 @@ Dependend of the Streaming-Device state, different buttons are provided to start
<ul> <ul>
<li><b>popupStream</b> <br> <li><b>popupStream</b> <br>
The current streaming content is depicted in an Ok-Popup window. By setting attribute "popupWindowSize" the The current streaming content is depicted in a popup window. By setting attribute "popupWindowSize" the
size of display can be adjusted. size of display can be adjusted. The attribute "popupStreamTo" determines the type of the popup window.
If "OK" is set, an OK-dialog window will be opened. A specified number in seconds closes the popup window after this
time automatically (default 5 seconds).
</li> </li>
</ul> </ul>
<br> <br>
@ -349,12 +351,25 @@ Dependend of the Streaming-Device state, different buttons are provided to start
</li> </li>
<br> <br>
<a name="popupStreamTo"></a>
<li><b>popupStreamTo [OK | 1 ... 60]</b><br>
The attribute "popupStreamTo" determines the type of the popup window which is opend by get-function "popupStream".
If "OK" is set, an OK-dialog window will be opened. A specified number in seconds closes the popup window after this
time automatically (default 5 seconds)..
<br><br>
<ul>
<b>Example: </b><br>
attr &lt;name&gt; popupStreamTo 10 <br>
</ul>
<br>
</li>
<a name="popupWindowSize"></a> <a name="popupWindowSize"></a>
<li><b>popupWindowSize</b><br> <li><b>popupWindowSize</b><br>
If the content of playback (Videostream or Snapshot gallery) is suitable, by clicking the content a popup window will If the content of playback (Videostream or Snapshot gallery) is suitable, by clicking the content a popup window will
appear. appear.
The size of display can be setup by this attribute. The size of display can be setup by this attribute.
It is also valid for the get-fenction "popupStream". It is also valid for the get-function "popupStream".
<br><br> <br><br>
<ul> <ul>
<b>Example: </b><br> <b>Example: </b><br>
@ -415,8 +430,10 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters
<ul> <ul>
<li><b>popupStream</b> <br> <li><b>popupStream</b> <br>
Der aktuelle Streaminhalt wird in einem Ok-Popup dargestellt. Mit dem Attribut "popupWindowSize" kann die Der aktuelle Streaminhalt wird in einem Popup-Fenster dargestellt. Mit dem Attribut "popupWindowSize" kann die
Darstellungsgröße eingestellt werden. Darstellungsgröße eingestellt werden. Das Attribut "popupStreamTo" legt die Art des Popup-Fensters fest.
Ist "OK" eingestellt, öffnet sich ein OK-Dialogfenster. Die angegebene Zahl in Sekunden schließt das Fenster nach dieser
Zeit automatisch (default 5 Sekunden).
</li> </li>
</ul> </ul>
<br> <br>
@ -425,7 +442,7 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters
<br> <br>
<a name="SSCamSTRMattr"></a> <a name="SSCamSTRMattr"></a>
<b>Attributes</b> <b>Attribute</b>
<br><br> <br><br>
<ul> <ul>
@ -479,6 +496,19 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters
</li> </li>
<br> <br>
<a name="popupStreamTo"></a>
<li><b>popupStreamTo [OK | 1 ... 60]</b><br>
Das Attribut "popupStreamTo" legt die Art des Popup-Fensters fest welches mit der get-Funktion "popupStream" geöffnet wird.
Ist "OK" eingestellt, öffnet sich ein OK-Dialogfenster. Die angegebene Zahl in Sekunden schließt das Fenster nach dieser
Zeit automatisch (default 5 Sekunden).
<br><br>
<ul>
<b>Beispiel: </b><br>
attr &lt;name&gt; popupStreamTo 10 <br>
</ul>
<br>
</li>
<a name="popupWindowSize"></a> <a name="popupWindowSize"></a>
<li><b>popupWindowSize</b><br> <li><b>popupWindowSize</b><br>
Bei geeigneten Wiedergabeinhalten (Videostream oder Schnappschußgalerie) öffnet ein Klick auf den Bildinhalt ein Bei geeigneten Wiedergabeinhalten (Videostream oder Schnappschußgalerie) öffnet ein Klick auf den Bildinhalt ein