Hifi-Spatial-API-Example-Mansion

Hifi Spatial API Example Mansion - a spooky audio environment featuring:
- The High Fidelity web spatial audio api
- The High Fidelity nodejs spatial audio api
- The High Fidelity RESTful audio environment management api
Usage
Setup
- Install NodeJS v14.15.x
- Install npm
- MacOS: If you encounter admin priviledge errors, add
prefix=/Users/yourusername/.npm-globalto your~/.npmrc(or another prefix)
- MacOS: If you encounter admin priviledge errors, add
- Run
npm installin theutilsdirectory - Run
npm installin theworkerdirectory - Create your space on the High Fidelity’s Spatial Audio API Developer Console
- Create a JWT in that space with the username
worker. - Create a JWT in that space with the username
mansion. - Create an admin JWT in that space.
- Edit
client\index.htmlto setHIFI_AUDIO_JWTto the JWT you created for the usernamemansion. - Deploy the
clientdirectory to your webserver of choice.- For example, to use the node webserver, change to the
clientdirectory, typenpm install -g http-server, then typehttp-server
- For example, to use the node webserver, change to the
Install the audio environment
This installs attenuation zones for each room by using the High Fidelity RESTful audio environment management api
- Go into the
utilsdirectory. - Type
npm run update:zones -- -s <your space id> -j <your admin JWT>
Run the workers
- go into the
workersdirectory. - Type
npm run start -- -j <your worker JWT> -n 5
Connect and Play
- Go to the URL to which you deployed the
clientdirectory. For example, (http://localhost:8080/)
Author
Roxanne Skelly