FastPix.Unity.SDK 0.1.1

dotnet add package FastPix.Unity.SDK --version 0.1.1
                    
NuGet\Install-Package FastPix.Unity.SDK -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FastPix.Unity.SDK" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FastPix.Unity.SDK" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="FastPix.Unity.SDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FastPix.Unity.SDK --version 0.1.1
                    
#r "nuget: FastPix.Unity.SDK, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FastPix.Unity.SDK@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FastPix.Unity.SDK&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=FastPix.Unity.SDK&version=0.1.1
                    
Install as a Cake Tool

FastPix Unity SDK

A Unity-Native, Developer-Friendly SDK for Seamless Integration with the FastPix Platform API

Introduction

The FastPix Unity SDK simplifies integration with the FastPix platform directly within your Unity projects. It provides a interface for secure and efficient communication with the FastPix API, enabling easy management of media uploads, live streaming, on-demand content, playlists, video analytics, and signing keys for secure access and token management.

Key Features

Media API

  • Upload Media: Seamlessly upload media files from URLs or local devices.
  • Manage Media: List, fetch, update, and delete media assets with ease.
  • Playback IDs: Generate and manage playback IDs for secure and flexible media access.
  • Advanced Media Tools: Generate video summaries, chapters, named entities, subtitles, and perform content moderation.
  • Playlist Management: Create and manage playlists, add or remove media, and adjust playback order.
  • DRM Support: Configure and manage DRM settings for protected content.

Live API

  • Create & Manage Live Streams: Effortlessly create, list, update, and delete live streams.
  • Control Stream Access: Generate playback IDs to manage viewer access securely.
  • Stream Management: Enable, disable, or complete streams with fine-grained control.
  • Simulcast to Multiple Platforms: Broadcast live content to multiple platforms simultaneously.

Signing Keys

  • Create Signing Keys: Generate signing keys for secure token-based access.
  • List & Retrieve Keys: Fetch all keys or get details for a specific key.
  • Manage Keys: Delete or revoke signing keys to maintain secure access control.

Video Data API

  • View Analytics: List video views, get detailed view information, and track top-performing content.
  • Concurrent Viewer Insights: Access timeseries data for live and on-demand streams.
  • Custom Reporting: Filter viewers by dimensions, list breakdowns, and compare metrics across datasets.
  • Error Tracking & Diagnostics: Retrieve logs and analyze errors for proactive monitoring.

For detailed usage, refer to the FastPix API Reference.

Prerequisites:

Getting started with FastPix:

To get started with the FastPix Unity SDK, ensure you have the following:

  • The FastPix APIs are authenticated using an Access Token and a Secret Key. You must generate these credentials to use the SDK.

  • Follow the steps in the Authentication with Access Tokens guide to obtain your credentials.


Table of Contents

SDK Installation

The SDK can either be compiled using dotnet build and the resultant .dll file can be copied into your Unity project's Assets folder, or you can copy the source code directly into your project.

The SDK relies on Newtonsoft's JSON.NET Package which can be installed via the Unity Package Manager.

To do so open the Package Manager via Window > Package Manager and click the + button then Add package from git URL... and enter com.unity.nuget.newtonsoft-json and click Add.

SDK Example Usage

Example

using fastpix.io;
using fastpix.io.Models.Components;
using System.Collections.Generic;

var sdk = new Fastpix(security: new Security() {
        Username="your-access-token"
        Password = "secret-key",
    });

CreateMediaRequest req = new CreateMediaRequest() {
    Inputs = new List<fastpix.io.Models.Components.Input>() {
        Input.CreateVideoInput(
            new VideoInput() {
                Type = "video",
                Url = "https://static.fastpix.io/sample.mp4",
            },
        ),
    },
    Metadata = new Dictionary<string, string>() {
        { "key1", "value1" },
    },
    AccessPolicy = CreateMediaRequestAccessPolicy.Public,
    MaxResolution = CreateMediaRequestMaxResolution.OneThousandAndEightyp,
};


using(var res = await sdk.InputVideo.CreateMediaAsync(req))
{
    // handle response
}


Available Resources and Operations

<details open> <summary>Available methods</summary>

Dimensions

DRMConfigurations

Errors

InputVideo

InVideoAIFeatures

LivePlayback

ManageLiveStream

ManageVideos

Metrics

Playback

Playlist

SigningKeys

SimulcastStream

StartLiveStream

Views

</details>

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default, an API error will raise a fastpix.io.Models.Errors.APIException exception, which has the following properties:

Property Type Description
Message string The error message
StatusCode int The raw HTTP response
RawResponse HttpResponseMessage The raw HTTP response
Body string The response content

When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the CreateMediaAsync method throws the following exceptions:

Error Type Status Code Content Type
fastpix.io.Models.Errors.BadRequestException 400 application/json
fastpix.io.Models.Errors.InvalidPermissionException 401 application/json
fastpix.io.Models.Errors.ForbiddenException 403 application/json
fastpix.io.Models.Errors.ValidationErrorResponse 422 application/json
fastpix.io.Models.Errors.APIException 4XX, 5XX */*

Example

using fastpix.io;
using fastpix.io.Models.Components;
using System;
using fastpix.io.Models.Errors;
using System.Collections.Generic;
using FastPixInput = fastpix.io.Models.Components.Input;
using FastPixSecurity = fastpix.io.Models.Components.Security;

var sdk = new Fastpix(security: new FastPixSecurity() {
        username="your-access-token"
        Password = "secret-key",
    });

CreateMediaRequest req = new CreateMediaRequest() {
    Inputs = new List<FastPixInput>() {
        Input.CreateVideoInput(
            new VideoInput() {
                Type = "video",
                Url = "https://static.fastpix.io/sample.mp4",
            },
        ),
    },
    Metadata = new Dictionary<string, string>() {
        { "key1", "value1" },
    },
    AccessPolicy = CreateMediaRequestAccessPolicy.Public,
    MaxResolution = CreateMediaRequestMaxResolution.OneThousandAndEightyp,
};

try
{
    using(var res = await sdk.InputVideo.CreateMediaAsync(req))
    {
            // handle response
    }
}
catch (Exception ex)
{
    if (ex is BadRequestException)
    {
        // handle exception
    }
    else if (ex is InvalidPermissionException)
    {
        // handle exception
    }
    else if (ex is ForbiddenException)
    {
        // handle exception
    }
    else if (ex is ValidationErrorResponse)
    {
        // handle exception
    }
    else if (ex is fastpix.io.Models.Errors.APIException)
    {
        // handle exception
    }
}

Server Selection

Override Server URL Per-Client

The default server can be overridden globally by passing a URL to the serverUrl: string optional parameter when initializing the SDK client instance. For example:

using fastpix.io;
using fastpix.io.Models.Components;
using System.Collections.Generic;
using FastPixInput = fastpix.io.Models.Components.Input;
using FastPixSecurity = fastpix.io.Models.Components.Security;

var sdk = new Fastpix(
    serverUrl: "https://api.fastpix.io/v1/",
    security: new FastPixSecurity() {
        username="your-access-token"
        Password = "secret-key",
    });

CreateMediaRequest req = new CreateMediaRequest() {
    Inputs = new List<FastPixInput>() {
        Input.CreateVideoInput(
            new VideoInput() {
                Type = "video",
                Url = "https://static.fastpix.io/sample.mp4",
            },
        ),
    },
    Metadata = new Dictionary<string, string>() {
        { "key1", "value1" },
    },
    AccessPolicy = CreateMediaRequestAccessPolicy.Public,
    MaxResolution = CreateMediaRequestMaxResolution.OneThousandAndEightyp,
};


using(var res = await sdk.InputVideo.CreateMediaAsync(req))
{
    // handle response
}


Development

Maturity

This SDK is currently in beta, and breaking changes may occur between versions even without a major version update. To avoid unexpected issues, we recommend pinning your dependency to a specific version. This ensures consistent behavior unless you intentionally update to a newer release.

Detailed Usage

For a complete understanding of each API's functionality, including request and response details, parameter descriptions, and additional examples, please refer to the FastPix API Reference.

The API reference provides comprehensive documentation for all available endpoints and features, ensuring developers can integrate and utilize FastPix APIs efficiently.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 198 10/1/2025
0.1.0 198 9/29/2025

For support, contact support@fastpix.io