npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@varius.io/hifi-spatial-audio

v1.0.1-2

Published

The High Fidelity Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.

Downloads

3

Readme

 

npm npm

GitHub Workflow Status (event) GitHub issues

Discord Twitter Follow

The High Fidelity Spatial Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.

Installation

NodeJS

npm i hifi-spatial-audio

Plain Web JavaScript

Import the latest version of the main library with:

<script src="https://hifi-spatial-audio-api.s3-us-west-2.amazonaws.com/releases/latest/HighFidelityAudio-latest.js"></script>

You'll Need a Developer Account

To use the Spatial Audio API, you'll need to sign up for a High Fidelity Developer Account. Sign up for free at account.highfidelity.com.

Documentation

API documentation is available at docs.highfidelity.com.

Examples

You'll find a bunch of examples that make use of this API in the Spatial-Audio-API-Examples GitHub Repository.

Walkthrough Guides

Walkthrough guides of sample applications written in plain Web JavaScript and written in NodeJS are available at highfidelity.com/api/guides.

Release Notes

Release notes for the Spatial Audio Client Library are available on the GitHub releases page.


Super QuickStart - Web JavaScript

Here's a super basic version of how to use the High Fidelity Spatial Audio Client Library in the Web JavaScript context:

<script src="https://hifi-spatial-audio-api.s3-us-west-2.amazonaws.com/releases/latest/HighFidelityAudio-latest.js"></script>
<script>
    // Set up the initial data for our user.
    // They'll be standing at the origin, facing "forward".
    let initialHiFiAudioAPIData = new HighFidelityAudio.HiFiAudioAPIData({
        position: new HighFidelityAudio.Point3D({ "x": 0, "y": 0, "z": 0 }),
        orientation: new HighFidelityAudio.OrientationQuat3D({ "w": 1, "x": 0, "y": 0, "z": 0 })
    });

    // Set up our `HiFiCommunicator` object, supplying our media stream and initial user data.
    let hifiCommunicator = new HighFidelityAudio.HiFiCommunicator({
        initialHiFiAudioAPIData: initialHiFiAudioAPIData
    });
    // `audioMediaStream` is obtained from a separate `getUserMedia()` call.
    await hifiCommunicator.setInputAudioMediaStream(audioMediaStream);

    // Connect to the High Fidelity Audio Spatial API Server by supplying your own JWT here.
    // Follow this guide to get a JWT: https://www.highfidelity.com/api/guides/misc/getAJWT
    // If you don't need a guide, obtain JWT credentials after signing up for a developer account at https://account.highfidelity.com/dev/account
    const HIFI_AUDIO_JWT = "";
    try {
        await hifiCommunicator.connectToHiFiAudioAPIServer(HIFI_AUDIO_JWT);
    } catch (e) {
        console.error(`Error connecting to High Fidelity:\n${e}`);
        return;
    }
</script>

Living on the Edge

If you'd like to use an experimental version of the Spatial Audio Client library built automatically from the tip of the main branch:

NodeJS

npm i hifi-spatial-audio@main

Plain Web JavaScript

Import the experimental version of the main library with:

<script src="https://hifi-spatial-audio-api.s3-us-west-2.amazonaws.com/releases/main/HighFidelityAudio-latest.js"></script>