Users can use arrow keys to move their avatar around the screen. Position of avatar is communicated to other users in real time utilizing Dolby.io Communications API’s CommandService.
Features | Tech Stack |
---|---|
|
|
Getting Started
Key Concepts
To send a command to all participants in a session, call the send()
method of the Command object.
VoxeetSDK.command
.send({payload: 'hello world'})
.catch((err) => {
console.error(err);
});
To receive commands send in a session, add an event listener for the ‘received’ event dispatched by the Command object.
VoxeetSDK.command.on('received', (participant, message) => {
const dataParsed = JSON.parse(message);
console.log("Command received, message:", dataParsed.payload)
}
Initial State
Messages sent with the CommandService are non-durable and not persistent meaning that inactive participants who have not yet joined the conference will not receive messages sent prior to joining the session.