2.1.1 • Published 2 years ago

hifi-spatial-audio v2.1.1

Weekly downloads
65
License
MIT
Repository
github
Last release
2 years ago

High Fidelity Spatial Audio Client Library

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

Installation

NodeJS

npm install 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>

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.

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>
2.2.0-3

2 years ago

2.2.0-1

2 years ago

2.1.1-3

3 years ago

2.1.2-0

3 years ago

2.1.1

3 years ago

2.1.1-2

3 years ago

2.1.1-1

3 years ago

2.1.0

3 years ago

2.0.1-3

3 years ago

2.0.1-2

3 years ago

2.0.0

3 years ago

2.0.1-1

3 years ago

2.0.1-0

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.1-5

3 years ago

1.4.2-0

3 years ago

1.4.1-4

3 years ago

1.4.1-3

3 years ago

1.4.1-2

3 years ago

1.4.1-1

3 years ago

1.4.0

3 years ago

1.4.1-0

3 years ago

1.3.1-9

3 years ago

1.3.1-8

3 years ago

1.3.1-7

3 years ago

1.3.1-6

3 years ago

1.3.1-5

3 years ago

1.3.0

3 years ago

1.3.1-3

3 years ago

1.3.1-2

3 years ago

1.3.1-1

3 years ago

1.3.1-0

3 years ago

1.3.1-4

3 years ago

1.2.2-7

3 years ago

1.2.2-9

3 years ago

1.2.2-8

3 years ago

1.2.2-6

3 years ago

1.2.2-5

3 years ago

1.2.2-4

3 years ago

1.2.2-2

3 years ago

1.2.0

3 years ago

1.2.2-1

3 years ago

1.2.2-0

3 years ago

1.2.1

3 years ago

1.2.1-0

3 years ago

1.2.1-2

3 years ago

1.2.1-1

3 years ago

1.1.2-9

3 years ago

1.1.2-8

3 years ago

1.1.2-7

3 years ago

1.1.2-6

3 years ago

1.1.2-5

3 years ago

1.1.2-4

3 years ago

1.1.2-10

3 years ago

1.1.2-11

3 years ago

1.0.2-3

3 years ago

1.0.2-2

3 years ago

1.0.2-1

3 years ago

1.0.2-0

3 years ago

1.1.1

3 years ago

1.0.1-4

3 years ago

1.0.1-3

3 years ago

1.0.1-0

3 years ago

1.0.1-2

3 years ago

1.0.1-1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.1.2-3

3 years ago

1.1.2-2

3 years ago

1.1.2-1

3 years ago

0.9.1

3 years ago

1.1.2-0

3 years ago

0.9.2-6

3 years ago

0.9.2-3

3 years ago

0.9.2-2

3 years ago

0.9.2-5

3 years ago

1.1.1-2

3 years ago

0.9.2-4

3 years ago

1.1.1-1

3 years ago

1.1.1-0

3 years ago

0.9.2-1

3 years ago

0.9.2-0

3 years ago

0.9.1-4

3 years ago

0.9.1-3

3 years ago

0.9.1-2

3 years ago

0.9.1-1

3 years ago

0.9.0

3 years ago

0.8.1-3

3 years ago

0.8.1-2

3 years ago

0.8.1-5

3 years ago

0.8.1-4

3 years ago

0.9.1-0

3 years ago

0.8.1-1

3 years ago

0.8.1-0

3 years ago

0.7.6-1

3 years ago

0.7.6-3

3 years ago

0.7.6-2

3 years ago

0.8.0

3 years ago

0.7.5

3 years ago

0.7.6-0

3 years ago

0.7.5-0

3 years ago

0.7.5-2

3 years ago

0.7.5-1

3 years ago

0.7.4

3 years ago

0.7.3-0

3 years ago

0.7.3-1

3 years ago

0.7.2

3 years ago

0.7.2-2

3 years ago

0.7.2-1

3 years ago

0.7.1-2

3 years ago

0.7.1-1

3 years ago

0.7.1-0

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.7.2-0

3 years ago

0.6.1-8

3 years ago

0.6.1-7

3 years ago

0.6.1-6

3 years ago

0.6.1-5

3 years ago

0.6.1-4

3 years ago

0.6.1-2

3 years ago

0.5.1-16

3 years ago

0.6.1-1

3 years ago

0.6.1-0

3 years ago

0.6.0

3 years ago

0.5.1-13

3 years ago

0.5.1-14

3 years ago

0.5.1-15

3 years ago

0.5.1-11

3 years ago

0.5.1-12

3 years ago

0.5.1-10

3 years ago

0.5.1-9

3 years ago

0.4.4-7

3 years ago

0.4.4-6

3 years ago

0.5.1-0

3 years ago

0.5.1-2

3 years ago

0.5.1-1

3 years ago

0.5.1-8

3 years ago

0.5.1-7

3 years ago

0.5.1-4

3 years ago

0.5.1-3

3 years ago

0.5.1-6

3 years ago

0.5.1-5

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.4-2

3 years ago

0.4.4-1

3 years ago

0.4.4-5

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.8

3 years ago

0.2.3

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago