We’re building a custom Android wrapper around the Genesys Cloud Web Messaging and Voice SDKs. The goal is to expose a mute button in our native UI that directly controls the agent’s microphone state during an active call. I’ve been digging through the genesys-cloud npm package (specifically the @genesyscloud/genesys-cloud client) but the documentation for real-time media control is sparse.
I found a reference to conversation.audio.mute() in some older forum posts, but calling that method on the Conversation object instance throws TypeError: conversation.audio.mute is not a function. The object seems to exist, but the method isn’t attached.
const client = createClient();
const conversation = await client.conversations().getConversation(conversationId);
// This fails
conversation.audio.mute(true);
Is there a specific module I need to import, like @genesyscloud/genesys-cloud/lib/genesys-cloud-core? Or do I need to use the REST API endpoint PATCH /api/v2/interactions/instances/{id} with a JSON body like {"properties": [{"name": "mute", "value": true}]}? The REST approach feels heavy for a real-time toggle. Any working code snippets for muting/unmuting via the JS SDK would be appreciated.