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
- Install NodeJS v14.15.x
- Install npm
- MacOS: If you encounter admin priviledge errors, add
prefix=/Users/yourusername/.npm-global
to your~/.npmrc
(or another prefix)
- MacOS: If you encounter admin priviledge errors, add
- Run
npm install
in theutils
directory - Run
npm install
in theworker
directory - 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.html
to setHIFI_AUDIO_JWT
to the JWT you created for the usernamemansion
. - Deploy the
client
directory to your webserver of choice.- For example, to use the node webserver, change to the
client
directory, typenpm install -g http-server
, then typehttp-server
- For example, to use the node webserver, change to the
This installs attenuation zones for each room by using the High Fidelity RESTful audio environment management api
- Go into the
utils
directory. - Type
npm run update:zones -- -s <your space id> -j <your admin JWT>
- go into the
workers
directory. - Type
npm run start -- -j <your worker JWT> -n 5
- Go to the URL to which you deployed the
client
directory. For example, (http://localhost:8080/)
Roxanne Skelly