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

@dolbyio/comms-sdk-web-extensions

v2.1.0

Published

Library of extensions for the Dolby.io Communication APIs SDK for web

Downloads

4

Readme

Build Package Publish Package npm License

Dolby.io Communications APIs SDK for Web Extensions

This project is a series of extensions for the Dolby.io Communications SDK for Web.

Install this project

Run the npm command to install the package @dolbyio/comms-sdk-web-extensions into your project:

npm install @dolbyio/comms-sdk-web-extensions --save

Capabilities

Private Zones

Using the Spatial Audio capability, you now have the possibility to create private zones. Those are areas in your audio scene where only people in the zone can talk to each other.

const zone = {
    origin: {
        x: 0,
        y: 0,
        z: 0,
    },
    dimension: {
        x: 100,
        y: 100,
        z: 100,
    },
    scale: {
        x: 10,
        y: 10,
        z: 10,
    },
};
// Create a new private zone with the rules set above in the zone object
const zoneId = await VoxeetSDKExt.privateZones.createZone(zone);

When using private zone, you MUST rely on the setSpatialPosition function from the privateZones object to move a participant at a different location.

// Set a participant position in that private zone
const position = { x: 22, y: 33, z: 44 };
await VoxeetSDKExt.privateZones.setSpatialPosition(participant, position);

// Update the zone origin
zone.origin = {
    x: 100,
    y: 50,
    z: 0,
};
await VoxeetSDKExt.privateZones.updateZone(zoneId, zone);

// Delete the zone
await VoxeetSDKExt.privateZones.deleteZone(zoneId);

Conference

Add the possibility to switch from a user to a listener and from a listener to a user. Get an HTML video element for a specified participant.

// Get an video HTML element for a specific participant
const videoElement = VoxeetSDKExt.conference.attachMediaStreamToHTMLVideoElement(participant);

// Switch the current user into a listener
await VoxeetSDKExt.conference.switchToListener();

// Switch the current listener into a user
await VoxeetSDKExt.conference.switchToUser({
    constraints: { video: false, audio: true },
});

Commands

Send a command to a specific participant in a conference.

Note: The commands are sent to all participants and filtered by this extension if the local participant is not in the target list.

// Listen to an incoming message for the local participant
VoxeetSDKExt.commands.on('received', (participant, message) => {
    console.log(`The participant ${participant.id} has sent the following message: ${message}`);
});

// Send a message to a couple of participants
await VoxeetSDKExt.commands.send('message', [participantA, participantB]);

// Send a message all the participants in the conference
await VoxeetSDKExt.commands.send('message', []);

Breakout Rooms

Create dynamic breakout rooms within a conference. By default all new participant join the main room. Then, you can create new breakout rooms and move participants into them.

// It's important to initialize the breakout room capability before using it
await VoxeetSDKExt.breakout.initialize();

// Create a new room and move participants into it
const room = {
    name: 'Video games',
    participants: [participantA, participantB, participantC],
};
const roomId = await VoxeetSDKExt.breakout.createRoom(room);

// Move a participant into that previously created room
await VoxeetSDKExt.breakout.moveTo(roomId, [participantD]);

// You can also move a participant back into the main room
await VoxeetSDKExt.breakout.moveToMainRoom([participantA]);

// And closing a room will move all the participant into the main room
await VoxeetSDKExt.breakout.closeRoom(roomId);

How to

Run tests:

npm run test

Create distribution package:

npm run build