Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Minor documentation fixes (#111)
Browse files Browse the repository at this point in the history
* Minor documentation fixes

* Fixing link

Co-authored-by: Thomas Gourgues <thomas.gourgues@gmail.com>
  • Loading branch information
mhelf-dolby and 4thlabs authored Jan 2, 2023
1 parent e058b48 commit 4e55b6f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 41 deletions.
11 changes: 5 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Dolby.io Communications .NET SDK and Unity plugin

With the .NET SDK and Virtual World plugin for Unity you can easily integrate Dolby quality spatial communications capabilities into your virtual world applications.
With the .NET SDK and Virtual World plugin for Unity, you can easily integrate Dolby quality spatial communications capabilities into your virtual world applications.

## Get Started

The Unity plugin is built on top of the .NET SDK with visual scripting support. Refer to this [article](https://api-references.dolby.io/comms-sdk-dotnet/documentation/unity/unity.html) for installing and using of the Unity plugin.
The Unity plugin is built on top of the .NET SDK with visual scripting support. Refer to this [article](https://api-references.dolby.io/comms-sdk-dotnet/documentation/unity/unity.html) for installing and using the Unity plugin.

The following guide presents an example of using the SDK to create a basic .NET audio-only conference application. The starter project that you can create by following this procedure provides the foundation upon which you can add additional features as you build out your application.

Expand All @@ -31,10 +31,9 @@ Use the following command to install the .NET SDK from NuGet into your .NET proj
dotnet add package DolbyIO.Comms.Sdk
```

>On MacOS, it is necessary to unquarantine SDK libraries. Otherwise, quarantine attributes prevent their usage. The simplest way to unquarantine is to strip the quarantine attributes recursively for all the files in the package. Follow the steps below:
>- Open **Terminal**
>- Assuming you have unzipped the SDK under `~/Downloads/dolbyio-comms-dotnet-sdk`
>- Run this command `xattr -d -r com.apple.quarantine ~/Downloads/dolbyio-comms-dotnet-sdk`
>On MacOS, it is necessary to unquarantine SDK libraries. Otherwise, quarantine attributes prevent their usage. The simplest way to unquarantine is to strip the quarantine attributes recursively for all the files in the package. Follow these steps:
>1. Open **Terminal**.
>2. Assuming you have unzipped the SDK under `~/Downloads/dolbyio-comms-dotnet-sdk`, run this command `xattr -d -r com.apple.quarantine ~/Downloads/dolbyio-comms-dotnet-sdk`.
#### 1. Initialize the SDK

Expand Down
22 changes: 11 additions & 11 deletions docs/documentation/unity/samples/demo.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Initialize and connect to a demo conference
The Demo conference node allows connecting to a conference that has several bots injecting audio, making it easier to test the connection and project setup during the prototyping phase. This example demonstrates how to initialize, authenticate and connect to a demo conference.
The Demo conference node allows connecting to a conference that has several bots injecting audio, making it easier to test the connection and project setup during the prototyping phase. This example demonstrates how to initialize, authenticate, and connect to a demo conference.

To start fresh, you can create a new project from Unity Hub using one of the provided templates, such as `Core 3D`. The following video shows the workflow.

Expand All @@ -9,25 +9,25 @@ To start fresh, you can create a new project from Unity Hub using one of the pro
This guide assumes you have already installed the plugin. If you have not done so, please refer to [this article](../unity.md#installation) for more information then come back to this guide.

### Step 1. Add the DolbyIO Manager and Script Machine components
Once you've added the `AppManager` GameObject to the scene, you can add the following two components to the `AppManager`.
Once you have added the `AppManager` GameObject to the scene, you can add the following two components to the `AppManager`:

- `DolbyIO Manager` provides access to the SDK functionalities.
- `Script Machine` is a component that contains the visual representation of a script that is a script graph.
- `DolbyIO Manager`: Provides access to the SDK functionalities.
- `Script Machine`: Contains the visual representation of a script that is a script graph.

### Step 2. Edit the script graph
The newly created script graph contains `On Start`, which is the initial triggering event. This event must be explicitly set as `coroutine` in order for it to work with the `Initialize` node.

Add the following nodes to the script graph:
- Unity **String** literal, alternatively, add [Get Token](../visualscripting/nodes.md#get-token) node.
- Unity **String** literal, alternatively, add the [Get Token](../visualscripting/nodes.md#get-token) node.
- [Initialize](../visualscripting/nodes.md#initialize).
- [Demo Conference](../visualscripting/nodes.md#demo-conference).

Connect the `On Start` event to the input trigger of `Initialize` node, of which the output trigger connects to the `Demo Conference` input trigger.
Connect the `On Start` event to the input trigger of the `Initialize` node, of which the output trigger connects to the `Demo Conference` input trigger.

To keep things simple for now, uncheck the `Spatial Audio` option in `Demo Conference` node. This is because unless you've provided your spatial position, the default platform behavior for spatial audio conference is `no rendering`, which means you won't hear any audio. Unchecking the `Spatial Audio` flag informs the platform to always render the audio for the local participant.
To keep things simple for now, uncheck the `Spatial Audio` option in the `Demo Conference` node. This is because unless you have provided your spatial position, the default platform behavior for the spatial audio conference is `no rendering`, which means you will not hear any audio. Unchecking the `Spatial Audio` flag informs the platform to always render the audio for the local participant.

### Step 3. Set up the Client Access Token
You should have signed up in Dolby.io by now. In the app that is automatically created for you in the dashboard, acquire a temporary Client Access Token and paste in the **String** literal then connect to the `Access Token` input of the `Initialize` node. For security reasons the token you acquired will expire in 12 hours, you will have to provide a new token after the expiration.
You should have signed up in Dolby.io by now. In the app that is automatically created for you in the dashboard, acquire a temporary Client Access Token and paste in the **String** literal. Then, connect to the `Access Token` input of the `Initialize` node. For security reasons, the token you acquired will expire in 12 hours. You will have to provide a new token after the expiration.

The following visual scripting example illustrates how to connect the nodes together once you acquired a Client Access Token from the dashboard.
<div style="text-align:left">
Expand All @@ -36,14 +36,14 @@ The following visual scripting example illustrates how to connect the nodes toge

Alternatively, you can add the [Get Token](../visualscripting/nodes.md#get-token) node to the graph, and pass the `App Key` and `App Secret` to the node. Connecting the output of the node to the `Access Token` input of the `Initialize` node will generate a Client Access Token from the Unity app and initialize the plugin.

> Please note using `Get Token` effectively includes the permanent app credential in your Unity app, which is not safe for production deployment. Please follow our [security best practices](https://docs.dolby.io/communications-apis/docs/guides-client-authentication) and setup a backend server to retrieve temporary access token on behalf of the Unity app.
> Please note using `Get Token` effectively includes the permanent app credential in your Unity app, which is not safe for production deployment. Please follow our [security best practices](https://docs.dolby.io/communications-apis/docs/guides-client-authentication) and set up a backend server to retrieve a temporary access token on behalf of the Unity app.
The following visual scripting example illustrates how to connect the nodes together if you decided to use the [Get Token](../visualscripting/nodes.md#get-token) node.
<div style="text-align:left">
<img style="padding:25px 0" src="~/images/samples/demo/get-token-initialize.png" width="450px">
</div>

Once this is all done, close the visual script editing window and run the app, if everything works you should be able to hear the audio coming from the Dolby.io service, this confirms you have properly configured the development environment with the Unity plugin installed ready to go.
Once this is all done, close the visual script editing window and run the app. If everything works, you should be able to hear the audio coming from the Dolby.io service that confirms you have properly configured the development environment with the Unity plugin installed and ready to go.

### Apple Silicon
If you are using Unity from a Apple Silicon Mac (e.g., M1), please be aware that currently the SDK is only distributed as x64 binary for Mac. You need to configure the Unity project under `File` > `Build Settings` and select `Intel 64bits` to make it work.
If you are using Unity from an Apple Silicon Mac (e.g., M1), please be aware that currently the SDK is only distributed as x64 binary for Mac. You need to configure the Unity project under `File` > `Build Settings` and select `Intel 64bits` to make it work.
9 changes: 4 additions & 5 deletions docs/documentation/unity/unity.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ Make sure that you have:

## Installation

You can install the Unity plugin from the Unity Package Manager. First download `dolbyio-comms-unity-plugin` archive in the [Release](https://github.com/DolbyIO/comms-sdk-dotnet/releases) page, and extract it to a suitable folder.
You can install the Unity plugin from the Unity Package Manager. First, download `dolbyio-comms-unity-plugin` archive in the [Release](https://github.com/DolbyIO/comms-sdk-dotnet/releases) page and extract it to a suitable folder.

Open the Package Manager from the Unity Editor and click the <img src="~/images/plus_sign.png" height="20px"/> sign in the upper left corner. Select "Add package from disk", and look for the `package.json` file located where you extracted the aforementioned plugin archive.

>On MacOS, it is necessary to unquarantine SDK libraries. Otherwise, quarantine attributes prevent their usage. The simplest way to unquarantine is to strip the quarantine attributes recursively for all the files in the package. Follow the steps below:
>- Open **Terminal**
>- Assuming you have unzipped the SDK under `~/Downloads/dolbyio-comms-unity-plugin`
>- Run this command `xattr -d -r com.apple.quarantine ~/Downloads/dolbyio-comms-unity-plugin`
>On MacOS, it is necessary to unquarantine SDK libraries. Otherwise, quarantine attributes prevent their usage. The simplest way to unquarantine is to strip the quarantine attributes recursively for all the files in the package. Follow these steps:
>1. Open **Terminal**.
>2. Assuming you have unzipped the SDK under `~/Downloads/dolbyio-comms-unity-plugin`, run this command `xattr -d -r com.apple.quarantine ~/Downloads/dolbyio-comms-unity-plugin`.
## Setting up the GameObject
The Unity plugin provides access to an instance of the SDK through a custom `DolbyIO Manager` manager. To add the SDK to Unity, follow these steps:
Expand Down
10 changes: 5 additions & 5 deletions docs/documentation/unity/visualscripting/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ Emitted when a conference participant has [changed](xref:DolbyIO.Comms.Services.
---
### On Active Speaker Change

Emitted when active speakers has [changed](xref:DolbyIO.Comms.Services.ConferenceService.ActiveSpeakerChange).
Emitted when active speakers have [changed](xref:DolbyIO.Comms.Services.ConferenceService.ActiveSpeakerChange).

<div style="text-align:left">
<img style="padding:25px 0" src="~/images/nodes/event-active-speaker.png" width="250px">
</div>

| Name | Direction | Type | Description |
|---|:---|:---|:---|
| **Participant Ids** | Output | List of Strings| The list of participant IDs that are currently speaking.|
| **Participant Ids** | Output | List of Strings| The list of IDs of participants who are currently speaking.|

---
### On Audio Device Added

Emitted when an audio device is [added](xref:DolbyIO.Comms.Services.MediaDeviceService.Added).
Emitted when an audio device has been [added](xref:DolbyIO.Comms.Services.MediaDeviceService.Added).

<div style="text-align:left">
<img style="padding:25px 0" src="~/images/nodes/event-audio-added.png" width="250px">
Expand All @@ -86,7 +86,7 @@ Emitted when the active audio device has [changed](xref:DolbyIO.Comms.Services.M
---
### On Signaling Channel Error

Emitted when an error occured when the SDK tries to connect to a conference.
Emitted when an error occurs when the SDK tries to connect to a conference.

<div style="text-align:left">
<img style="padding:25px 0" src="~/images/nodes/event-signaling-error.png" width="250px">
Expand All @@ -99,7 +99,7 @@ Emitted when an error occured when the SDK tries to connect to a conference.
---
### On Invalid Token Error

Emitted when the access token is invalid or has expired. You need to acquire a new token from the service to continue the operation.
Emitted when the access token is invalid or has expired. After receiving the error, you need to acquire a new token from the service to continue the operation.

<div style="text-align:left">
<img style="padding:25px 0" src="~/images/nodes/event-token-error.png" width="250px">
Expand Down
Loading

0 comments on commit 4e55b6f

Please sign in to comment.