Hifi-Spatial-API-Example-Office
Hifi Spatial API Example Office - 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-global
to your~/.npmrc
(or another prefix)
- MacOS: If you encounter admin priviledge errors, add
- Run
npm install
in theutils
directory - Create your space on the High Fidelity’s Spatial Audio API Developer Console
- Create a JWT in that space.
- Create an admin JWT in that space.
- Edit
client\index.html
to setHIFI_AUDIO_JWT
to the client (non-admin) JWT. - 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
Install the audio environment
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>
Connect and Play
- Go to the URL to which you deployed the
client
directory. For example, (http://localhost:8080/)
Author
Roxanne Skelly