Client Tools
We have provided the following client tools to get started with the Aimi Player API. Note these examples are simple reference implementations designed to demonstrate working with the API using different frameworks - to get new users working with the API as quickly as possible. Example code is likely to be written for clarity or instructional purposes rather than optimization for the framework or target platform.
Unity
A Unity project containing a simple scene and C# script demonstrating how to integrate with the Aimi Player API via HTTP requests. The example shows how Unity coroutines can be chained together to create the login flow and also to create simple repeating background tasks. Asynchronous HTTP GET and POST request wrappers are also provided to prevent blocking the main thread. A blocking call is used to ensure the stream is closed OnDestroy.
Quickstart
If using Unity Hub select "add project from disk" and select the unity-client directory. This will install all of the required dependencies automatically.

Select the AimiInteractiveStreamScene from the Project/Assets menu:

Select Canvas from the scene:

With Canvas selected, add your Access Token (containing your API Key) to the Inspector:

Now run the scene using the Play icon, you should see the Circular Spectrum visualizer:

The "Start Aimi Stream" button will create a new session on the server, connect and request player start experience 1815. The visualizer should activate when audio begins playing. The other UI elements should become unlocked when playback starts. These can be used to send requests to the server to control the player.
The Console will log a stream of debug messages, be sure to watch this for connection and UI state changes. Additionally, the Unity WebRTC package includes a very handy statistics panel via the Window menu:

For example currentRoundTripTime can be used to track latency:

Troubleshooting
Sometimes Unity's Audio engine (FMOD) will lose audio configuration when switching hardware devices, toggling between application windows or simply starting and stopping a scene repeatedly. In this case you will not hear any audio or see any visualization - even though the connection state is indicating everything is working - as FMOD will not be able to render audio. On MacOS a simple way to quickly resolve this without restarting Unity is to reset the audio daemon in the terminal:
sudo pkill coreaudiod
You may or may not see this as it's quite easy to miss the notification this has occurred when restarting a scene and clearing the console - so if audio is not working, consider the above.