Switch Multiwindow from playback to live view

In a smart client plugin I use this command to bring the window to playback mode, it works fine.

data.MultiWindowCommand = “OpenFloatingWindow”;

data.PlaybackSupportedInFloatingWindow = true; // Playback Darstellung

But is there a simple command to switch to Live mode?

At the moment I close the window and open it again with this data:

data.MultiWindowCommand = “OpenFloatingWindow”;

data.PlaybackSupportedInFloatingWindow = false; // Live Darstellung

It’s not so elegant. Is there an easier way ?

Thanks and best regards

Tom

I experimented to find the right answer and verify my ideas..

If you in the Smart Client View and Windows tool plugin sample modify the code. In class MultiWindowUserControl, method OnFireCommand (line 109):

var result = EnvironmentManager.Instance.SendMessage(
	new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.MultiWindowCommand, data), 
	null, 
	null);
 
if (result != null && result.Count > 0)
{
	FQID fQID = result[0] as FQID;
	if (fQID != null)
	{
		// Mode.ClientPlayback or Mode.ClientLive
		EnvironmentManager.Instance.PostMessage(new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.ChangeModeCommand) {  Data = Mode.ClientPlayback } , fQID);
	}
}

To use this; in the Smart Client View and Windows tool plugin sample, on the MultiWindows tab, fillls out the fields, picks OpenFloatingWindow command, sets Allow Playback, the code above will make sure the new floating window is opened in playback mode.

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

I found it easiest to explain by just showing the code.

My conclusion is that if you have the FQID of the floating window you can send a ChangeModeCommand to change to and from playback mode.

Hi Bo, thanks for your detailed answer ! Now it works fine. I had seen this command before, but did not go this direction, because in the tooltip of the “ChangeModeCommand” is written: “Do not use this messagge in smart client plugins.” Now I used it, as you suggested and it works.

I also didn’t realize, that the workspace “Playback” must be created, when opening the window.

(data.PlaybackSupportedInFloatingWindow = true; // Playback Darstellung )

Otherwise it stays in lifemode, even when I send the command.

Thanks again and best regards

Tom

I too saw the remark you mention.

I think it should say something like “Do not use this message in smart client plugins when handling the main window, in that case use ShowWorkSpaceCommand instead.”

I will make sure Milestone makes corrections to the documentation.

Yes, its alway difficult to bring all the information in a tooltip, so it can be missunderstood easily. But by the way, I always find the tool tips in the Video SDK very useful and well done.