VideoKitClient

namespace VideoKit.Internal {
  /// <summary>
  /// VideoKit API client.
  /// </summary>
  class VideoKitClient { ... }
}

This is a singleton that manages the VideoKit global state in your Unity application.


Accessing the App's Instance

/// <summary>
/// VideoKit client for this project.
/// </summary>
static VideoKitClient? Instance { get; }

The singleton instance can be accessed with this property.


Inspecting the Client

The client holds information used to authenticate your developer account with VideoKit.

Querying the VideoKit API

/// <summary>
/// VideoKit API URL.
/// </summary>
string url { get; set; } = @"https://www.videokit.ai/api";

The url refers to the VideoKit API URL used by VideoKit when creating an app-wide session, and when making on-device predictions for AI features like human texture.

Inspecting the VideoKit Version

/// <summary>
/// VideoKit client version.
/// </summary>
const string Version { get; }

The VideoKit version can be accessed at runtime.


Accessing the Function Client

/// <summary>
/// VideoKit Function client.
/// </summary>
Function fxn { get; }

VideoKit maintains a Function client for powering its AI features. This client is authenticated with your VideoKit account information, giving you the ability to make predictions with VideoKit's private AI predictors.


Checking the Session Status

/// <summary>
/// Check the application VideoKit session status.
/// </summary>
Task<Status> CheckSession ();

This method is used to check the VideoKit authentication session status in your application, and initializes it it necessary.


Was this page helpful?