"ImageViewerWpfControl" does not show the live steaming.

“ImageViewerWpfControl” does not show the live steaming.

I wrote the code like below as PlaybackWpfUser example shows.

if (true != VideoOS.Platform.SDK.Environment.IsLoggedIn(uri))

  {

    return;

  }

  ivControl.Disconnect();

  ItemPickerForm form = new ItemPickerForm();

  form.KindFilter = Kind.Camera;

  form.AutoAccept = true;

  form.Init(Configuration.Instance.GetItems(ItemHierarchy.SystemDefined));

  if (form.ShowDialog() == WfDialogResult.OK)

  {

    ivControl.EnableVisibleLiveIndicator = EnvironmentManager.Instance.Mode == Mode.ClientLive;

    ivControl.MaintainImageAspectRatio = true;

    ivControl.SetVideoQuality(0, 1);

    ivControl.CameraFQID = form.SelectedItem.FQID;

    ivControl.Initialize();

    ivControl.Connect();

    ivControl.Selected = true;

    ivControl.StartLive();

  }

But ImageViewerWpfControl shows nothing but “ImageViewerWpfControl implematation not loaded” on the screen(viewer control).

What could I do for showing the streaming on ImageViewerWpfControl from VMS?

I found the way how does ImageViewerWpfControl let show the live streaming.

Without knowing the reason, I cleared the problem by letting the app start with Main function which is defined in App class in WPF based app project.

After several tries, I found how to use ImageViewerWpfControl correctly (at least my point of view…)

To use ImageViewerWpfControl, the init process must be done before MainWindow initializing components.

VideoOS.Platform.SDK.Environment.Initialize();

VideoOS.Platform.SDK.UI.Environment.Initialize();

Must be done before any work using ImageViewerWpfControl..

I am trying to clarify, if there is even more that you experienced perhaps you would like to share the details..(?)

As you wrote(Because my English is not good so I cannot fully understand the last sentence on your post. I`m sorry.) I had used the two Init functions on my code.

And what I found was the point where the init functions to be called is important for making “ImageViewerWpfControl” control work properly.

When “VideoOS.Platform.SDK.UI.Environment.Initialize()” is called after “InitializeComponent()” function is being called where in the window ImageViewerWpfControl is belonged to, ImageViewerWpfControl will not work as expected.

This is what I wanted to share.