What the exception says is that this should be on the UI thread but is not.
Please try using –
virtual void VideoOS.Platform.ClientControl.CallOnUiThread (Action actionToBeInvoked)
-when using this message.