MastaBaba
MastaBaba

Reputation: 1154

How to 'mute' using Voxeet?

I'm trying to get the Voxeet API up and running in the browser.

Their basic example works well, but now I would like to add a mute/unmute button.

I do not understand where and how to use the unmute/mute code, such that the participant objects(?) are available to mute/unmute.

Upvotes: 1

Views: 264

Answers (2)

Fabien
Fabien

Reputation: 151

with the Web SDK, to mute / unmute the local participant you can use the following code:

# Mute the local participant
VoxeetSDK.conference.mute(VoxeetSDK.session.participant, true);

# Unmute the local participant
VoxeetSDK.conference.mute(VoxeetSDK.session.participant, true);

# VoxeetSDK.session.participant <= represents the local participant.

Documentation: https://dolby.io/developers/interactivity-apis/reference/client-sdk/reference-javascript/conferenceservice#mute

Upvotes: 1

arnoldtm
arnoldtm

Reputation: 77

Mute

VoxeetSDK.conference.mute(VoxeetSDK.session.participant, VoxeetSDK.session.participant.isMuted);
let isMuted = VoxeetSDK.conference.toggleMute(VoxeetSDK.session.participant);
console.log(isMuted)
==> true

Unmute

VoxeetSDK.conference.mute(VoxeetSDK.session.participant, VoxeetSDK.session.participant);
let isMuted = VoxeetSDK.conference.toggleMute(VoxeetSDK.session.participant);
console.log(isMuted)
==> false

Upvotes: 1

Related Questions