Preview: Thinfinity VirtualUI session recording

Thinfinity VirtualUI session recordingComing soon, Thinfinity VirtualUI web-enabled applications will allow you to save application sessions and replay them later.
There are many scenarios for session recording: reproduction of issues, application demos, and tutorials, technical support, audit monitoring, e-learning, etc. In this opportunity, we will review a similar Thinfinity VirtualUI feature that helps developers record sessions of their own VirtualUI web-enabled applications.
To enable this feature, VirtualUI includes a new Recorder component, available for all its supported programming languages. Using this component in your application, you can save each application session totally or partially. Afterward, you will be able to play this session in the browser within the VirtualUI web interface, or by implementing your own custom session player using the SDK.

Recording a Session

Set the Filename property of the VirtualUI.Recorder component and call its Rec() method to record an application session.
The Filename property value can include a full path, but must not include the file extension, as it will be stored automatically as .dat and .idx files.

Set the Filename property as follows:
Delphi code

VirtualUI.Recorder.Filename := 'C:\Sessions\VirtualUISession';

C++ code

VirtualUI m_VirtualUI = new VirtualUI();

C# code

private VirtualUI vui = new VirtualUI();
vui.Recorder.Filename = "C:\\Sessions\\VirtualUISession";

As with any recorder, you can start and stop recording any time you wish. You can specify more than one track for each session. These tracks are indicated in the session recording and allow you to, for example, store different application operations. Call the Rec() method and pass the track name as an argument:
Delphi code

VirtualUI.Recorder.Rec('Track 1');

C++ code

m_VirtualUI->Recorder()->Rec(L"Track 1");

C# code

vui.Recorder.Rec(“Track 1”);

In order to stop the recording, call the Stop method:
Delphi code


C++ code


C# code


Afterwards, you can start another recording with the Rec() method. If you keep the same track name, the recording will resume and the session will be stored after the previous session in the same file, in a new track. Change the track name to avoid ending up with two tracks that have the same name in the same session recording.

The OnRecorderChanged event

Use the VirtualUI.OnRecorderChanged event to listen for any change in the Recorder status.
These are the possible status values:

State It reports the Recorder state:
Inactive 0 No action is being made.
Recording 1 A session is being recorded.
Playing 2 A session is being played.

The following examples show how to assign an event handler to this event in the most used languages:
Delphi code

procedure TMainForm.RecorderChanged(Sender: TObject);
var msg: string;
  msg := '';
  case VirtualUI.Recorder.State of
    Inactive: msg := 'Recorder is inactive';
    Playing: msg := 'Recorder is Playing';
    Recording: msg := 'Recording session';
VirtualUI.OnRecorderChanged := Mainform.RecorderChanged;

C++ code

void RecorderChanged(void) {
  CString stateStr;
  switch (m_VirtualUI->Recorder()->State()) {
    case Inactive: stateStr = _T("Recorder is inactive"); break;
    case Playing: stateStr = _T("Recorder is Playing"); break;
    case Recording: stateStr = _T("Recording session"); break;
  MessageBox(0, stateStr, L"OnRecorderChanged called", 0);
m_VirtualUI->OnRecorderChanged = RecorderChanged;

C# code

private void RecorderChanged(object sender, RecorderChangedArgs e)
    string message = "";
    switch (vui.Recorder.State) {
        case RecorderState.Inactive:
            message = "Recorder is inactive";
        case RecorderState.Playing:
            message = "Recorder is playing";
        case RecorderState.Recording:
            message = "Recording session";
    MessageBox.Show(message, "OnRecorderChanged called");
vui.OnRecorderChanged += RecorderChanged;

As you can see, with a few lines of code, you will be able to save sessions of a Thinfinity VirtualUI web-enabled application. In an upcoming post we will explain how to play a Thinfinity VirtualUI session recording.

You may wish to review our article about remote desktop session recording to learn how to record and play Thinfinity Remote Desktop Server sessions.

Leave a comment

Cookie Preferences
Privacy and Cookie Policies
Cybele Software implements specific policies to enhance your browsing experience while respecting your privacy. When you visit Cybele Software's website, the site uses cookies to personalize your experience. These small files remember your preferences and the details of your repeated visits, aligning closely with Cybele's Privacy Policy.

You have complete control over the cookies used during your visit:
- Accepting All Cookies: You can agree to the use of all cookies by clicking “Accept All.” This provides a smoother, more integrated experience.
- Customizing Cookie Settings: If you prefer to manage your preferences, you can click on "Cookie Settings." This allows you to give controlled consent by selecting which types of cookies you agree to activate.
- Opting Out: You also have the option to opt-out entirely from non-essential cookies. It's important to note that choosing this option might impact your experience on the website, potentially limiting certain functionalities and features.
These features ensure that you can tailor your browsing according to your personal preferences and privacy concerns.