So I played around with the HG Program "Generic IP Camera" and the associated Widget "homegenie/generic/camerainput" and think I found a way to get it to work but as I'm a novice with JavaScript / HTML (not to mention HG) I am not sure of the best way to implement it.
So in the Program "Generic IP Camera", on the Startup Code tab, I added this:
AddFeature("Media.IpCamera", "Sensor", "IpCamera.Orientation", "Orientation (Blank for Landscape, 1 for Portrait)", "text")
under the line for the URL. I was aiming for a sort of toggle - off for regular display, on to rotate 90 degrees (which is basically what I need)
I wanted to then incorporate this new field, which I believe would be referenced as IpCamera.Orientation, to alter the Style attribute for the image in the Widget on the HTML Tab.
In the "homegenie/generic/camerainput" Widget, on the HTML tab, on line 4 is this: ** See the Side note below on how I found this line if you are interested.
style="background-color:black;width:100%;height:172px;cursor:pointer;"
If we want to rotate the image 90% then this line would need to be:
style="background-color:black;width:100%;height:172px;cursor:pointer;transform:rotate(90deg);"
So that brings me to where I am now. It does not appear it is as simple as adding an IF statement in the HTML code to display one version of style or the other based on the IpCamera.Orientation field (or even better to add the transform part or not based on this).
Sounds like it needs to be done as part of the javascript - like is done for the:
data-ui-field="camerapicturepreview"
So I am trying to figure out how to add a new variable / data-ui-field in the javascript to populate with one or the other of the style lines and then use that new variable in the HTML code for the the style part of line 4.
*Side note - while in HG on the Widget editor you can click the "bound to device" dropdown and pick one of your entries. I did this for camera with the image I wanted to rotate, and then clicked Run / Preview. That displays my camera in the preview window. In Chrome (and likely other browsers, but I'm not certain) if you then right click with the mouse on the image and chose Inspect from the dropdown it will display in a side panel the HTML code that is running. Moving your cursor over a line in the HTML code displayed will highlight the associated part of the web page it corresponds to. This is how I found the line of code in the widget that needed to be modified.