Hello everyone!
In my WPF application, I use multiple VideoOS.Platform.Client.ImageViewerWpfControl instances on a single view to display and control video playback. I have a couple of questions about how to handle certain visual states of the control.
1. Black screen with “Connected to camera” text
When I create an ImageViewerWpfControl and display it for the first time, or when I switch its mode between ClientLive and ClientPlayback using the following code:
var message = new VideoOS.Platform.Messaging.Message(
VideoOS.Platform.Messaging.MessageId.System.ModeChangeCommand,
Mode.ClientPlayback /* or Mode.ClientLive */
);
EnvironmentManager.Instance.SendMessage(message, _playbackControlFQID);
…I briefly see a black screen with the text “Connected to camera” before the video appears. The same happens when I first call imageViewer.StartBrowse() and then switch to ClientLive mode — again, a short black screen appears with the same text.
Question:
Is there any way to avoid showing this black screen or detect when the video stream is actually ready and displaying frames (not the “Connected to camera” overlay)?
Are there any events, statuses, or internal states I can use to know when the control is fully initialized and showing video?
(see screenshot 1 — “Connected to camera” overlay)
2. Gray screen with “Before recordings” / “After recordings” text
When the ImageViewerWpfControl is in ClientPlayback mode and I seek to a time when no recording exists, the control shows the last displayed frame, but it turns gray and displays text like “Before recordings” or “After recordings”.
Question:
Is there a way to programmatically detect when the control enters this state?
I would like to display my own overlay or layout instead of the gray frame with text.
(see screenshot 2 — “Before recordings” state)