ImageViewerAddOn how to get playback state

Hi,

We have a SmartClient client background plugin that has registered for

ClientControl.Instance.NewImageViewerControlEvent += Instance_NewImageViewerControlEvent;

now in this function

private void Instance_NewImageViewerControlEvent(ImageViewerAddOn imageViewerAddOn)
{

We can get client window is in live/playback or setup using this if(imageViewerAddOn.WindowInformation.Mode == Mode.ClientPlayback)

// how to get playback handler state, like playforward/playstop status, here.

registering for the PlaybackChangedHandler is later, but how to get the current playback state here?

}

thanks,

Vega

You cannot read playback mode when the ImageViewerAddOn is using the main Smart Client playback controller. In that case, only messaging (e.g. like SmartClient.GetCurrentPlaybackTimeRequest) is available.

If you are using your own / independent PlaybackController, you can get the playback mode like this:

FQID fqid =
    ClientControl.Instance.GetPlaybackController(windowInformation);

PlaybackController pc =
    ClientControl.Instance.GetPlaybackController(fqid);

var mode = pc.PlaybackMode; // Forward, Stop, Reverse, Custom