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

Audio mute/unmute #266

Closed
lazarmitic opened this issue Mar 25, 2021 · 8 comments
Closed

Audio mute/unmute #266

lazarmitic opened this issue Mar 25, 2021 · 8 comments

Comments

@lazarmitic
Copy link

Is there a way to mute my mic when using networked-audio-source component. For example I want to add UI element that will allow user to mute his mic.

@vincentfretin
Copy link
Member

vincentfretin commented Mar 25, 2021

Since #261 was merged (networked-aframe 0.8.0), we have an API for the easyrtc adapter (the same api exists in the janus adapter), you can call:

NAF.connection.adapter.enableMicrophone(false)

We forgot to document it though, so I leave the issue open until we add it to the README.

In the easyrtc adapter only (not janus adapter), you have the same for the camera:

NAF.connection.adapter.enableCamera(false)

Add in the documentation:

  • enableMicrophone(enabled)
  • enableCamera(enabled)
  • the video:true option to networked-scene

@lazarmitic
Copy link
Author

Thanks!

@lazarmitic
Copy link
Author

I just noticed that:

  1. One client is connected and his mic is mutted.
  2. Second client connects, he will be able to speak to first client.
  3. First client unmutes his microphone and tries to speak, second client does not hear him.

I noticed that when second client connects, getMediaStream never resolves and _setMediaStream is never called.

Everything works fine if I don't mute the mic of first client.

I also notices some issues when more then two clients are connected. I will post detailed repro steps when I find out what's going on.

@lazarmitic
Copy link
Author

It seems that if I unmute my mic, I have to call some function to nitify other clients so that they can resolve getMediaStream

vincentfretin added a commit that referenced this issue Mar 27, 2021
@vincentfretin
Copy link
Member

This should be fixed in master now.

@lazarmitic
Copy link
Author

Thanks, when can I expect 0.8.1 version to be available :)

@vincentfretin
Copy link
Member

The documentation was updated and 0.8.2 is released.

@lazarmitic
Copy link
Author

Thanks! :D

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

2 participants