diff --git a/fhem/contrib/DS_Starter/49_SSCamSTRM.pm b/fhem/contrib/DS_Starter/49_SSCamSTRM.pm index 2008578e4..f7175290b 100644 --- a/fhem/contrib/DS_Starter/49_SSCamSTRM.pm +++ b/fhem/contrib/DS_Starter/49_SSCamSTRM.pm @@ -73,6 +73,7 @@ sub SSCamSTRM_Initialize($) { "htmlattr ". "hideDisplayName:1,0 ". "popupWindowSize ". + "popupStreamTo:OK,1,2,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60 ". $readingFnAttributes; $hash->{FW_summaryFn} = "SSCamSTRM_FwFn"; $hash->{FW_detailFn} = "SSCamSTRM_FwFn"; @@ -122,7 +123,9 @@ sub SSCamSTRM_Get($@) { my $txt = SSCam_getclhash($hash); 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 $parentHash = $defs{$parent}; @@ -133,16 +136,13 @@ sub SSCamSTRM_Get($@) { my $out = ""; $out .= $htmlCode; $out .= ""; - for (my $k=1; (defined($hash->{HELPER}{CL}{$k})); $k++ ) { - if ($hash->{HELPER}{CL}{$k}->{COMP}) { - # CL zusammengestellt (Auslösung durch Notify) - asyncOutput($hash->{HELPER}{CL}{$k}, "$out"); - } else { - # Output wurde über FHEMWEB ausgelöst - return $htmlCode; - } - } - delete($hash->{HELPER}{CL}); + + if($to =~ /\d+/) { + map {FW_directNotify("#FHEMWEB:$_", "FW_errmsg('$out', $to)", "")} devspec2array("TYPE=FHEMWEB"); + } else { + map {FW_directNotify("#FHEMWEB:$_", "FW_okDialog('$out')", "")} devspec2array("TYPE=FHEMWEB"); + } + } } else { @@ -285,8 +285,10 @@ Dependend of the Streaming-Device state, different buttons are provided to start
@@ -349,12 +351,25 @@ Dependend of the Streaming-Device state, different buttons are provided to start
+ +
  • popupStreamTo [OK | 1 ... 60]
    + 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).. +

    + +
    +
  • +
  • popupWindowSize
    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. - It is also valid for the get-fenction "popupStream". + It is also valid for the get-function "popupStream".