Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent.prototype.isMute() #917

Closed
mfulton26 opened this issue Aug 20, 2024 · 7 comments
Closed

Agent.prototype.isMute() #917

mfulton26 opened this issue Aug 20, 2024 · 7 comments

Comments

@mfulton26
Copy link

There's Agent.prototype.mute() and Agent.prototype.unmute() but no Agent.prototype.isMute().

Can we get an isMute() (or isMuted()) method on Agent to query if the local media stream is muted or not?

@andywang219
Copy link
Contributor

Hi!

As a workaround for now, you could do the following:

// get the agent's connection
const agentConnection = contact.getAgentConnection();

// use voiceConnection.isMute()
if (agentConnection.isMute()) {
...
}

voiceConnection.isMute()

@mfulton26
Copy link
Author

voiceConnection.isMute()

@andywang219, I don't think that works, it checks if the connection is muted server side; I want to check to see if it is muted client side (which is what Agent.prototype.mute() does)

@andywang219
Copy link
Contributor

We've actually started using the value that is returned in voiceConnection.isMute() to mute the agent's local media stream now. This allows us to maintain the mute state for the agent across all instances (ie. across different browsers).

One other workaround I can think of is calling getUserMedia() to grab all available local media streams for the agent, look for the media stream that is active, and then checking to see if its muted.

@mfulton26
Copy link
Author

using voiceConnect.isMute() sounds appropriate then (except I can't query it unless I'm on an actual call… I'm guessing that doesn't matter though if new calls start as unmuted)

I wasn't aware that getUserMedia() can be used to list active streams… is that a thing? also, if the media stream is active in the CCP iframe then I don't think my app would have access to it… I'm not sure though, I haven't tested it

Copy link

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment to keep this active.

Copy link

It has been a while and we are closing this for now. Please reopen if this is still an issue

@mfulton26
Copy link
Author

It has been a while and we are closing this for now. Please reopen if this is still an issue

I do not have permissions to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants