Hello,
I need to set all the video stream to fill the entire space, so there is no black band.
In the smart client there is a parameter maintain image aspect ratio.
I did look for the related propertie “maintainimageaspectratio” and i set it to false with this code running as a background plugin on a SmartClient:
private void RefreshOverlay(ImageViewerAddOn imageViewerAddOn)
{
if (imageViewerAddOn.CameraFQID != null && imageViewerAddOn.CameraFQID.ObjectId != Guid.Empty)
{
List<Item> childs = imageViewerAddOn.WindowInformation.ViewAndLayoutItem.GetChildren();
int pos = 0;
foreach (Item child in childs)
{
if (child.Properties.ContainsKey("maintainimageaspectratio"))
{
if (child.Properties["maintainimageaspectratio"] == "True")
{
ClientControl.Instance.CallOnUiThread(() => child.Properties["maintainimageaspectratio"] = "False");
//imageViewerAddOn.WindowInformation.ViewAndLayoutItem.PropertiesModified();
//string properties = imageViewerAddOn.WindowInformation.ViewAndLayoutItem.ViewItemConfigurationString(pos);
ClientControl.Instance.CallOnUiThread(() => imageViewerAddOn.WindowInformation.ViewAndLayoutItem.InsertBuiltinViewItem(pos, ViewAndLayoutItem.CameraBuiltinId, child.Properties));
List<Item> x = ClientControl.Instance.GetSmartWallItems();
}
}
pos++;
}
}
}
This code doesn’t work perfectly, it works sometimes but not every time.
Is there a better way to do it, may be more on the server side ?
I did open a ticket for this on the support but they said that there is no way to do this for the SmartWall …
Regards,
Florent
