diff --git a/fhem/contrib/DS_Starter/49_SSCamSTRM.pm b/fhem/contrib/DS_Starter/49_SSCamSTRM.pm index f7175290b..5dd874b01 100644 --- a/fhem/contrib/DS_Starter/49_SSCamSTRM.pm +++ b/fhem/contrib/DS_Starter/49_SSCamSTRM.pm @@ -116,16 +116,21 @@ sub SSCamSTRM_Get($@) { return if(IsDisabled($name) || $hash->{MODEL} =~ /ptzcontrol|snapgallery/); my $getlist = "Unknown argument $opt, choose one of ". - "popupStream:noArg " + "popupStream " ; if ($opt eq "popupStream") { my $txt = SSCam_getclhash($hash); return $txt if($txt); - my $link = AnalyzePerlCommand(undef, $hash->{LINK}) if($hash->{LINK} =~ m/^{(.*)}$/s); - my $to = AttrVal($name, "popupStreamTo", 5); - $to = 1000 * $to if($to =~ /\d+/); + my $link = AnalyzePerlCommand(undef, $hash->{LINK}) if($hash->{LINK} =~ m/^{(.*)}$/s); + + # OK-Dialogbox oder Autoclose + my $todef = 5; + my $temp = AttrVal($name, "popupStreamTo", $todef); + my $to = $prop?$prop:$temp; + unless ($to =~ /^\d+$/ || lc($to) eq "ok") { $to = $todef; } + $to = ($to =~ /\d+/)?(1000 * $to):$to; my $parent = $hash->{PARENT}; my $parentHash = $defs{$parent}; @@ -142,7 +147,6 @@ sub SSCamSTRM_Get($@) { } else { map {FW_directNotify("#FHEMWEB:$_", "FW_okDialog('$out')", "")} devspec2array("TYPE=FHEMWEB"); } - } } else { @@ -171,6 +175,12 @@ sub SSCamSTRM_Attr($$$$) { readingsSingleUpdate($hash, "state", $val, 1); } + + if ($cmd eq "set") { + if ($aName =~ m/popupStreamTo/) { + unless ($aVal =~ /^\d+$/ || $aVal eq "OK") { $_[3] = 5; } + } + } return undef; } @@ -288,7 +298,8 @@ Dependend of the Streaming-Device state, different buttons are provided to start The current streaming content is depicted in a popup window. By setting attribute "popupWindowSize" the 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). + time automatically (default 5 seconds).
+ Optionally you can append "OK" or <Sekunden> directly to override the adjustment by attribute "popupStreamTo".
@@ -352,7 +363,7 @@ Dependend of the Streaming-Device state, different buttons are provided to start
-
  • popupStreamTo [OK | 1 ... 60]
    +
  • popupStreamTo [OK | <seconds>]
    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).. @@ -428,12 +439,14 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters