How to change camera of an ImageViewerControl of the SmartClient ?

Hi,

I would like to change/switch the camera that is displayed in one of the ImageViewerControls of the SmartClient based on an action in a side panel plugin.

I tried to change the FQID in an ImageViewerAddOn but it does not display the new camera.

From the ImageViewerControl documentation I see that the camera shall be set before the Initialize() which probably means we cannot modify the camera being displayed afterwards (If we could get a reference to the right ImageViewerControl).

What is the right way to programmatically change the displayed camera in one of the Live subwindows ?

Many thanks.

Smart Client Insert Camera sample might be helpful, please see this link -

https://doc.developer.milestonesys.com/html/index.html?base=samples/scinsertcamera.html&tree=tree_1.html

This sample shows how to insert/change a selected camera on a given position in the current view.

Thanks Rie,

When clicking on my button, I need to replace the currently selected camera (obtained from SelectedCameraChangedIndication) by another one.

For this, I need the tile index of the selected camera in order to send my EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.SetCameraInViewCommand, new SetCameraInViewCommandData() message with the new camera guid.

Is there a way to know the viewItem that is currently selected and/or the current association between viewItem indexes (or guids) and the cameras inside them ?

With the MessageId.SmartClient.SelectedViewChangedIndication I can get the initial correspondance between Index and displayed cameraGuid. However, this callback is not refreshed when we drag and drop a new camera.

Thanks.

Hi,

I could finally found the CurrentCameraId property in the “View” item (guid available in the ViewItemConfigurationString(index).

Is there a way to get the viewItem index that is currently selected in order to switch the camera only in that tile rather than in all tiles where the camera might also be displayed ?

Thanks

I found a similar question, please see this Q and A -

https://developer.milestonesys.com/s/question/0D53X000078opgRSAQ/find-out-the-selected-child-index-in-a-viewitem-

Thanks Rie, I will check