DolbyIO.Rest
1.1.0
Prefix Reserved
See the version list below for details.
dotnet add package DolbyIO.Rest --version 1.1.0
NuGet\Install-Package DolbyIO.Rest -Version 1.1.0
<PackageReference Include="DolbyIO.Rest" Version="1.1.0" />
paket add DolbyIO.Rest --version 1.1.0
#r "nuget: DolbyIO.Rest, 1.1.0"
// Install DolbyIO.Rest as a Cake Addin
#addin nuget:?package=DolbyIO.Rest&version=1.1.0
// Install DolbyIO.Rest as a Cake Tool
#tool nuget:?package=DolbyIO.Rest&version=1.1.0
Dolby.io REST APIs Client for .NET
.NET wrapper for the dolby.io REST Communications, Streaming and Media APIs.
Install this SDK
If you want to use NuGet, use the following command:
dotnet add package DolbyIO.Rest
Authentication
To get an access token that will be used by your server to perform backend operations like creating a conference, use the following code. This is only for the Communications and Media APIs.
using DolbyIO.Rest;
const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";
JwtToken jwt;
using (DolbyIOClient client = new DolbyIOClient())
{
jwt = await client.Authentication.GetApiAccessTokenAsync(APP_KEY, APP_SECRET);
}
Communications Examples
Get a Client Access Token
To get an access token that will be used by the client SDK for an end user to open a session against dolby.io, use the following code:
using DolbyIO.Rest;
using DolbyIO.Rest.Models;
const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";
JwtToken jwt;
using (DolbyIOClient client = new DolbyIOClient())
{
jwt = await client.Communications.Authentication.GetClientAccessTokenAsync(APP_KEY, APP_SECRET);
}
Create a conference
To create a Dolby Voice conference, you first must retrieve an API Access Token, then use the following code to create the conference.
using DolbyIO.Rest;
using DolbyIO.Rest.Communications.Models;
using DolbyIO.Rest.Models;
const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";
using DolbyIOClient client = new DolbyIOClient();
JwtToken jwt = await client.Authentication.GetApiAccessTokenAsync(APP_KEY, APP_SECRET);
CreateConferenceOptions options = new CreateConferenceOptions
{
Alias = "Conference Name",
OwnerExternalId = "Fabien"
};
Conference conference = await client.Conferences.CreateAsync(jwt, options);
Real-time Streaming Examples
Get a publish token
using System;
using DolbyIO.Rest;
using DolbyIO.Rest.Models;
using Newtonsoft.Json;
const string API_SECRET = "api_secret";
using DolbyIOClient client = new DolbyIOClient();
PublishResponse response = await client.Streaming.Director.PublishAsync(API_SECRET, "stream_name");
Console.WriteLine($"Token: {response.Data.Jwt}");
Get a subscribe token
using System;
using DolbyIO.Rest;
using DolbyIO.Rest.Models;
using Newtonsoft.Json;
const string API_SECRET = "api_secret";
using DolbyIOClient client = new DolbyIOClient();
SubscribeResponse response = await client.Streaming.Director.SubscribeAsync(API_SECRET, "stream_name", "stream_account_id");
Console.WriteLine($"Token: {response.Data.Jwt}");
Media Examples
Start an enhance job
To start an enhance job, use the following code:
using System;
using DolbyIO.Rest;
using DolbyIO.Rest.Models;
using Newtonsoft.Json;
const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";
using DolbyIOClient client = new DolbyIOClient();
JwtToken jwt = await client.Authentication.GetApiAccessTokenAsync(APP_KEY, APP_SECRET);
string jobDescription = JsonConvert.SerializeObject(new {
content = new { type = "podcast" },
input = "dlb://in/file.mp4",
output = "dlb://out/file.mp4"
});
string jobId = await client.Media.Enhance.StartAsync(jwt, jobDescription);
Console.WriteLine($"Job ID: {jobId}");
Product | Versions 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.