# Introduction

This guide describes how to work with the TrueConf MAUI VideoSDK for Desktop on Windows. This component should not be confused with TrueConf Mobile SDK, which also exists under .NET MAUI. TrueConf MAUI VideoSDK is a MAUI control (component) for creating enterprise applications with messenger and video communication TrueConf. It is essentially a wrapper around TrueConf VideoSDK, which implements its main functions.

To develop and use the application, you will need the TrueConf SDK extension in the license for your video conferencing server TrueConf Server or TrueConf Enterprise. For licensing details, please contact TrueConf managers:

# Requirements

System requirements for developing applications with TrueConf MAUI VideoSDK:

  1. Windows 10+

  2. .NET 8.0+

  3. IDE MS Visual Studio 2022 with the .NET MAUI extension installed.

  4. The purchased TrueConf SDK extension in the license on the video conferencing server that will be used to create test accounts and connect the application.

# How to start

To develop the application, follow these steps:

  1. Install TrueConf VideoSDK version 5.0 or higher. You don't need to activate TrueConf VideoSDK after installation.

  2. After installing the SDK, restart Visual Studio so that the IDE can detect the new package.

  3. Create a new .NET MAUI project in Visual Studio.

  4. Right-click on your project in Solution Explorer.

  5. Click on Manage NuGet Packages.

  6. In the package manager that opens, select the Browse tab and select Microsoft Visual Studio Offline Packages from the Package source list in the upper right corner.

  7. Find the TrueConf.VideoSDK.MAUI package in the search and click the Install button:

/docs/maui-videosdk/media/add_sdk/en.png

# How to use app created with MAUI SDK

In order for the application you have created to work on other PCs, you need to:

  1. Install TrueConf VideoSDK on the target PC, using the same version that was used for development.
  2. Activate the TrueConf SDK extension in the license on the video conferencing server to which the application will connect.

  3. Run your application.

# Example

We have posted an example application with TrueConf MAUI VideoSDK on GitHub, which demonstrates how to get started with the component: authorization and starting a video call (peer-to-peer session). The application code contains comments, and some explanations are provided below.

The application itself consists of one main window. When launched, it connects to the video communication server and authorizes with the specified credentials. The only button, Call, is used to make a video call to the subscriber.

# Authentication

Authorization is shown in Presentation → Views → Pages → MainPage.xaml.cs. For demonstration purposes, the variables for connecting to the server are specified directly in the code. Creating your own authorization window or transferring parameters in another way is left to the discretion of the corporate application programmer:

// Server to connect to
private const string _trueConfServer = "<server.trueconf.com>";
// TrueConf ID of a user in the server
private const string _trueConfId = "<trueconf_id>";
// Password of the user
private const string _password = "<password>";
// TrueConfID of a user to call to
private const string _callTo = "<call to trueconf_id>";

The connection to the server is established immediately after launch using the function _sdk.Methods.connectToServer(_trueConfServer).

After connecting to the server, the control changes its state, which is tracked by subscribing to the event _sdk.OnAppStateChanged. The function checks the new state and, if the connection to the server is successful, calls the function _sdk.Methods.login(_trueConfId, _password) for authorization:

private void OnAppStateChanged(object? sender, AppStateChangedEventArgs e)
{
    switch (e.NewState)
    {
        case 0: // No connection to server
        case 1: // Trying to connect to server
            break;
        case 2: // Connected, need to log in
            _sdk.Methods.login(_trueConfId, _password);
            break;
        case 4: // In waiting (receiving an invite or calling someone)
        case 5: // In conference
            ActionBtn.Text = "Reject";
            break;
        default:
            ActionBtn.Text = "Call";
            break;
    }
}

# Call

The call is triggered when the button is pressed, which invokes the _sdk.Methods.call(_callTo) method. Note that the control state is checked beforehand using _sdk.AppState:

private async void ActionBtn_Clicked(object sender, EventArgs e)
{
    if (_sdk == null)
    {
        // We show an alert this way, because MAUI doesn't allow internal alerts to be configured topmost of all child windows
        var alert = new AlertWindow("Error", "Application must be connected to TrueConf server and login to call.");
        this.Window.AddLogicalChild(alert);
        Application.Current?.OpenWindow(alert);
        return;
    }

    switch (_sdk.AppState)
    {
        case 0: // No connection to server
        case 1: // Trying to connect to server
        case 2: // Connected, need to log in
            var alert = new AlertWindow("Error", "Application must be connected to TrueConf server and login to call.");
            this.Window.AddLogicalChild(alert);
            Application.Current?.OpenWindow(alert);
            break;
        case 3: // Connected and logged in
            _sdk.Methods.call(_callTo);
            break;
        case 4: // In waiting (receiving an invite or calling someone)
            _sdk.Methods.hangUp();
            break;
        case 5: // In conference
            _sdk.Methods.hangUp();
            break;
        default:
            break;
    }
}

Incoming calls are answered automatically if the user is online. To answer a call, the _sdk.Methods.accept() function is called. Receiving a call is tracked by subscribing to the _sdk.Events.On_inviteReceived event. To handle the event, the OnInviteReceived function is called:

private void OnInviteReceived(object? sender, string jsonStr)
{
    // If we are in call or we are not doing anything we reject
    if (_sdk.AppState <= 3 || _sdk.AppState == 5)
    {
        // Reject an incoming call or invitation to a group conference
        _sdk.Methods.reject();
    }

    // Accept an incoming call or invitation to a group conference
    _sdk.Methods.accept(); 
}

# Terminology

# User Identifiers

  • PeerId - a unique identifier of a user (short form of TrueConf ID). It does not include the server address or an instance of the identifier. Its usage assumes operation with the current server to which TrueConf MAUI VideoSDK is connected. For example, if TrueConf MAUI VideoSDK is connected to the current.server, using the identifier user1 will automatically be converted internally to user1@current.server

  • CallId is a unique user identifier (TrueConf ID) with a server address but without an instance. Example: user@some.server

  • InstanceId - a unique identifier for a user (TrueConf ID) that includes the server address and instance. For example, user1@some.server/INSTANCE_ID. It is used for unambiguous identification because, for instance, the same user can be authorized on one server but from different applications: user1@some.server/INSTANCE_ID1, user1@some.server/INSTANCE_ID2

Read more about user roles and conference modes in our documentation:

# Automatic stepping up to the podium with VAD

A group conference with the role based mode may have additional functionality - Automatic access to the podium by VAD. VAD (voice activity detection) refers to the voice volume level. In this mode, each speaker automatically takes the podium until the permitted number of speakers is reached. When a speaker finishes speaking, they leave the podium. In this mode, all commands related to the podium will not work. Additionally, methods for managing the assignment of participants to the podium become available.

Last Updated: 09/12/2025